From 29ea798cff795833b67ac1c9e41cc063ea36df10 Mon Sep 17 00:00:00 2001 From: tombuildsstuff <git@tom.ibuildstuff.eu> Date: Fri, 1 Jul 2022 08:57:04 +0100 Subject: [PATCH 1/3] dependencies: updating to `v0.20220701.1073833` of `github.com/hashicorp/go-azure-sdk` * upgraded github.com/hashicorp/go-azure-helpers v0.34.0 => v0.35.0 * upgraded github.com/hashicorp/go-azure-sdk v0.20220628.1190740 => v0.20220701.1073833 --- go.mod | 4 +- go.sum | 8 +- .../go-azure-helpers/polling/poller.go | 25 ++++++ .../2021-04-01-preview/tenants/README.md | 22 +++--- .../tenants/method_create_autorest.go | 2 +- .../tenants/method_delete_autorest.go | 2 +- .../2017-08-01/servers/README.md | 45 ++++------- .../servers/method_create_autorest.go | 2 +- .../servers/method_delete_autorest.go | 2 +- .../servers/method_resume_autorest.go | 2 +- .../servers/method_suspend_autorest.go | 2 +- .../servers/method_update_autorest.go | 2 +- .../2020-06-01/configurationstores/README.md | 30 +++---- .../method_create_autorest.go | 2 +- .../method_delete_autorest.go | 2 +- .../method_update_autorest.go | 2 +- .../2020-10-01/attestationproviders/README.md | 11 ++- .../cognitiveservicesaccounts/README.md | 43 +++++----- .../method_accountscreate_autorest.go | 2 +- .../method_accountsdelete_autorest.go | 2 +- .../method_accountsupdate_autorest.go | 2 +- .../method_deletedaccountspurge_autorest.go | 2 +- .../2020-08-20/communicationservice/README.md | 25 +++--- .../method_createorupdate_autorest.go | 2 +- .../method_delete_autorest.go | 2 +- .../2022-05-13/confidentialledger/README.md | 27 +++---- .../method_ledgercreate_autorest.go | 2 +- .../method_ledgerdelete_autorest.go | 2 +- .../method_ledgerupdate_autorest.go | 2 +- .../2022-04-01/resourceguards/README.md | 21 ++++- .../2021-09-03-preview/application/README.md | 8 +- .../applicationgroup/README.md | 9 ++- .../2021-09-03-preview/desktop/README.md | 6 +- .../2021-09-03-preview/hostpool/README.md | 10 ++- .../2021-09-03-preview/scalingplan/README.md | 10 ++- .../2021-09-03-preview/sessionhost/README.md | 7 +- .../2021-09-03-preview/workspace/README.md | 9 ++- .../2020-07-01/monitorsresource/README.md | 21 ++--- .../method_monitorscreate_autorest.go | 2 +- .../method_monitorsdelete_autorest.go | 2 +- .../elastic/2020-07-01/rules/README.md | 13 ++- .../rules/method_tagrulesdelete_autorest.go | 2 +- .../2021-11-01-preview/apps/README.md | 30 +++---- .../apps/method_createorupdate_autorest.go | 2 +- .../apps/method_delete_autorest.go | 2 +- .../apps/method_update_autorest.go | 2 +- .../2021-12-01-preview/loadtests/README.md | 15 ++-- .../loadtests/method_delete_autorest.go | 2 +- .../2018-11-30/managedidentity/README.md | 10 ++- .../maps/2021-02-01/accounts/README.md | 11 ++- .../maps/2021-02-01/creators/README.md | 8 +- .../2021-01-01/resource/README.md | 15 +++- .../2017-04-01/namespaces/README.md | 22 ++++-- .../namespaces/method_delete_autorest.go | 2 +- .../2017-04-01/notificationhubs/README.md | 17 +++- .../2019-01-01-preview/dashboard/README.md | 9 ++- .../tenantconfiguration/README.md | 7 +- .../2021-01-01/capacities/README.md | 43 ++++------ .../capacities/method_create_autorest.go | 2 +- .../capacities/method_delete_autorest.go | 2 +- .../capacities/method_resume_autorest.go | 2 +- .../capacities/method_suspend_autorest.go | 2 +- .../capacities/method_update_autorest.go | 2 +- .../2018-09-01/privatezones/README.md | 27 +++---- .../method_createorupdate_autorest.go | 2 +- .../privatezones/method_delete_autorest.go | 2 +- .../privatezones/method_update_autorest.go | 2 +- .../2018-09-01/recordsets/README.md | 9 ++- .../2018-09-01/virtualnetworklinks/README.md | 26 ++---- .../method_createorupdate_autorest.go | 2 +- .../method_delete_autorest.go | 2 +- .../method_update_autorest.go | 2 +- .../purview/2021-07-01/account/README.md | 29 +++---- .../account/method_createorupdate_autorest.go | 2 +- .../account/method_delete_autorest.go | 2 +- .../account/method_update_autorest.go | 2 +- .../2022-01-01/databases/README.md | 55 ++++--------- .../databases/method_create_autorest.go | 2 +- .../databases/method_delete_autorest.go | 2 +- .../databases/method_export_autorest.go | 2 +- .../databases/method_forceunlink_autorest.go | 2 +- .../databases/method_import_autorest.go | 2 +- .../method_regeneratekey_autorest.go | 2 +- .../databases/method_update_autorest.go | 2 +- .../2022-01-01/redisenterprise/README.md | 79 ++++++------------- .../redisenterprise/method_create_autorest.go | 2 +- .../method_databasescreate_autorest.go | 2 +- .../method_databasesdelete_autorest.go | 2 +- .../method_databasesexport_autorest.go | 2 +- .../method_databasesforceunlink_autorest.go | 2 +- .../method_databasesimport_autorest.go | 2 +- .../method_databasesregeneratekey_autorest.go | 2 +- .../method_databasesupdate_autorest.go | 2 +- .../redisenterprise/method_delete_autorest.go | 2 +- .../redisenterprise/method_update_autorest.go | 2 +- .../2017-04-01/hybridconnections/README.md | 13 ++- .../relay/2017-04-01/namespaces/README.md | 28 ++++--- .../method_createorupdate_autorest.go | 2 +- .../namespaces/method_delete_autorest.go | 2 +- .../search/2020-03-13/adminkeys/README.md | 5 +- .../search/2020-03-13/querykeys/README.md | 6 +- .../search/2020-03-13/services/README.md | 16 ++-- .../method_createorupdate_autorest.go | 2 +- .../2021-05-01/managedcluster/README.md | 21 ++--- .../method_createorupdate_autorest.go | 2 +- .../managedcluster/method_delete_autorest.go | 2 +- .../2021-05-01/nodetype/README.md | 41 +++------- .../method_createorupdate_autorest.go | 2 +- .../nodetype/method_delete_autorest.go | 2 +- .../nodetype/method_deletenode_autorest.go | 2 +- .../nodetype/method_reimage_autorest.go | 2 +- .../nodetype/method_restart_autorest.go | 2 +- .../2022-02-01/sqlvirtualmachines/README.md | 42 ++++------ .../method_createorupdate_autorest.go | 2 +- .../method_delete_autorest.go | 2 +- .../method_redeploy_autorest.go | 2 +- .../method_startassessment_autorest.go | 2 +- .../method_update_autorest.go | 2 +- .../2018-08-01/endpoints/README.md | 7 +- .../geographichierarchies/README.md | 4 +- .../2018-08-01/profiles/README.md | 10 ++- .../videoanalyzer/README.md | 27 ++++++- .../2020-03-20/authorizations/README.md | 19 ++--- .../method_createorupdate_autorest.go | 2 +- .../authorizations/method_delete_autorest.go | 2 +- .../vmware/2020-03-20/clusters/README.md | 26 ++---- .../method_createorupdate_autorest.go | 2 +- .../clusters/method_delete_autorest.go | 2 +- .../clusters/method_update_autorest.go | 2 +- .../vmware/2020-03-20/privateclouds/README.md | 28 +++---- .../method_createorupdate_autorest.go | 2 +- .../privateclouds/method_delete_autorest.go | 2 +- .../privateclouds/method_update_autorest.go | 2 +- .../web/2016-06-01/connections/README.md | 10 ++- .../web/2016-06-01/managedapis/README.md | 5 +- vendor/modules.txt | 4 +- 136 files changed, 593 insertions(+), 647 deletions(-) diff --git a/go.mod b/go.mod index b6887dd8a4e7..e560ff5aba9b 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,8 @@ require ( github.com/gofrs/uuid v4.0.0+incompatible github.com/google/go-cmp v0.5.8 github.com/google/uuid v1.1.2 - github.com/hashicorp/go-azure-helpers v0.34.0 - github.com/hashicorp/go-azure-sdk v0.20220628.1190740 + github.com/hashicorp/go-azure-helpers v0.35.0 + github.com/hashicorp/go-azure-sdk v0.20220701.1073833 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.2 github.com/hashicorp/go-version v1.4.0 diff --git a/go.sum b/go.sum index 67eccc71eafe..27cdd84c9053 100644 --- a/go.sum +++ b/go.sum @@ -257,10 +257,10 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg= -github.com/hashicorp/go-azure-helpers v0.34.0 h1:Lvk3IgwFT51WVu1IK5rpUMd+rKnRylg9vMTt6Qx6xn4= -github.com/hashicorp/go-azure-helpers v0.34.0/go.mod h1:gcutZ/Hf/O7YN9M3UIvyZ9l0Rxv7Yrc9x5sSfM9cuSw= -github.com/hashicorp/go-azure-sdk v0.20220628.1190740 h1:jI/MGHxnXhx8hFyI+gIHIvmDntQxVphjHMynZP7GTJ8= -github.com/hashicorp/go-azure-sdk v0.20220628.1190740/go.mod h1:jPd83zRme0J5C+rUQaU6bzrWg/AS5WN1TiilFzRoKU0= +github.com/hashicorp/go-azure-helpers v0.35.0 h1:/Jpm37dzTmSHobt9SuC8bK6/jSoWw5FdxB9WIqQFXbI= +github.com/hashicorp/go-azure-helpers v0.35.0/go.mod h1:gcutZ/Hf/O7YN9M3UIvyZ9l0Rxv7Yrc9x5sSfM9cuSw= +github.com/hashicorp/go-azure-sdk v0.20220701.1073833 h1:cwutAQhHojIpJR0a7gyf4884A4KX3Un1lj9SUZDRdxE= +github.com/hashicorp/go-azure-sdk v0.20220701.1073833/go.mod h1:yjQPw8DCOtQR8E8+FNaTxF6yz+tyQGkDNiVAGCNoLOo= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= diff --git a/vendor/github.com/hashicorp/go-azure-helpers/polling/poller.go b/vendor/github.com/hashicorp/go-azure-helpers/polling/poller.go index 0060dcd7f445..d08c4889e02a 100644 --- a/vendor/github.com/hashicorp/go-azure-helpers/polling/poller.go +++ b/vendor/github.com/hashicorp/go-azure-helpers/polling/poller.go @@ -4,9 +4,11 @@ import ( "context" "fmt" "net/http" + "strings" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/lang/response" ) type LongRunningPoller struct { @@ -16,9 +18,12 @@ type LongRunningPoller struct { future *azure.Future ctx context.Context client autorest.Client + method string } // NewLongRunningPollerFromResponse creates a new LongRunningPoller from the HTTP Response +// this is deprecated and replaced by NewPollerFromResponse. Can be removed once all the +// embedded SDKs have been removed. func NewLongRunningPollerFromResponse(ctx context.Context, resp *http.Response, client autorest.Client) (LongRunningPoller, error) { poller := LongRunningPoller{ ctx: ctx, @@ -32,6 +37,21 @@ func NewLongRunningPollerFromResponse(ctx context.Context, resp *http.Response, return poller, nil } +// NewPollerFromResponse creates a new LongRunningPoller from the HTTP Response +func NewPollerFromResponse(ctx context.Context, resp *http.Response, client autorest.Client, method string) (LongRunningPoller, error) { + poller := LongRunningPoller{ + ctx: ctx, + client: client, + method: method, + } + future, err := azure.NewFutureFromResponse(resp) + if err != nil { + return poller, err + } + poller.future = &future + return poller, nil +} + // PollUntilDone polls until this Long Running Poller is completed func (fw *LongRunningPoller) PollUntilDone() error { if fw.future == nil { @@ -40,5 +60,10 @@ func (fw *LongRunningPoller) PollUntilDone() error { err := fw.future.WaitForCompletionRef(fw.ctx, fw.client) fw.HttpResponse = fw.future.Response() + if strings.EqualFold(fw.method, "DELETE") { + if response.WasNotFound(fw.HttpResponse) { + err = nil + } + } return err } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/README.md index d1fc08361592..5a2c76106c34 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-pre ```go client := tenants.NewTenantsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := tenants.CheckNameAvailabilityRequest{ // ... } + read, err := client.CheckNameAvailability(ctx, id, payload) if err != nil { // handle the error @@ -53,11 +51,8 @@ payload := tenants.CreateTenant{ // ... } -future, err := client.Create(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -68,11 +63,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := tenants.NewB2CDirectoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "directoryValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -83,6 +75,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := tenants.NewB2CDirectoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "directoryValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -98,6 +91,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := tenants.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -114,6 +108,7 @@ for _, item := range items { ```go ctx := context.TODO() id := tenants.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -135,6 +130,7 @@ payload := tenants.UpdateTenant{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_create_autorest.go index c72de3efe174..6f1bcafe1818 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_create_autorest.go @@ -74,6 +74,6 @@ func (c TenantsClient) senderForCreate(ctx context.Context, req *http.Request) ( return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_delete_autorest.go index 0106a1bab129..336482ec7a8a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c TenantsClient) senderForDelete(ctx context.Context, req *http.Request) ( return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/README.md index 5de47a130ab4..100464da03bb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017 ```go client := servers.NewServersClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := servers.CheckServerNameAvailabilityParameters{ // ... } + read, err := client.CheckNameAvailability(ctx, id, payload) if err != nil { // handle the error @@ -53,11 +51,8 @@ payload := servers.AnalysisServicesServer{ // ... } -future, err := client.Create(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -68,11 +63,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -83,6 +75,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + read, err := client.DissociateGateway(ctx, id) if err != nil { // handle the error @@ -98,6 +91,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + read, err := client.GetDetails(ctx, id) if err != nil { // handle the error @@ -113,6 +107,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := servers.NewSubscriptionID() + read, err := client.List(ctx, id) if err != nil { // handle the error @@ -128,6 +123,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := servers.NewResourceGroupID() + read, err := client.ListByResourceGroup(ctx, id) if err != nil { // handle the error @@ -143,6 +139,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + read, err := client.ListGatewayStatus(ctx, id) if err != nil { // handle the error @@ -158,6 +155,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + read, err := client.ListSkusForExisting(ctx, id) if err != nil { // handle the error @@ -173,11 +171,8 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") -future, err := client.Resume(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.ResumeThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -188,11 +183,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") -future, err := client.Suspend(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.SuspendThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -208,11 +200,8 @@ payload := servers.AnalysisServicesServerUpdateParameters{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_create_autorest.go index 054c9e9e70d4..0c71d5e49646 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_create_autorest.go @@ -74,6 +74,6 @@ func (c ServersClient) senderForCreate(ctx context.Context, req *http.Request) ( return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_delete_autorest.go index 381ce68df819..f4e5bea63be1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c ServersClient) senderForDelete(ctx context.Context, req *http.Request) ( return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_resume_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_resume_autorest.go index ea0cfc658756..3892983b9c6f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_resume_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_resume_autorest.go @@ -73,6 +73,6 @@ func (c ServersClient) senderForResume(ctx context.Context, req *http.Request) ( return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_suspend_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_suspend_autorest.go index b4b5f6b512f6..659062d29245 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_suspend_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_suspend_autorest.go @@ -73,6 +73,6 @@ func (c ServersClient) senderForSuspend(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_update_autorest.go index cc56502ba53b..2f88f6584307 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_update_autorest.go @@ -74,6 +74,6 @@ func (c ServersClient) senderForUpdate(ctx context.Context, req *http.Request) ( return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/README.md index 723ff52a44fa..a63d482d089a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020 ```go client := configurationstores.NewConfigurationStoresClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := configurationstores.ConfigurationStore{ // ... } -future, err := client.Create(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := configurationstores.NewConfigurationStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configStoreValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := configurationstores.NewConfigurationStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configStoreValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := configurationstores.NewSubscriptionID() + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -94,6 +87,7 @@ for _, item := range items { ```go ctx := context.TODO() id := configurationstores.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -115,6 +109,7 @@ payload := configurationstores.ListKeyValueParameters{ // ... } + read, err := client.ListKeyValue(ctx, id, payload) if err != nil { // handle the error @@ -130,6 +125,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := configurationstores.NewConfigurationStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configStoreValue") + // alternatively `client.ListKeys(ctx, id)` can be used to do batched pagination items, err := client.ListKeysComplete(ctx, id) if err != nil { @@ -151,6 +147,7 @@ payload := configurationstores.RegenerateKeyParameters{ // ... } + read, err := client.RegenerateKey(ctx, id, payload) if err != nil { // handle the error @@ -171,11 +168,8 @@ payload := configurationstores.ConfigurationStoreUpdateParameters{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_create_autorest.go index 2acc9286913d..584ebb8933eb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_create_autorest.go @@ -74,6 +74,6 @@ func (c ConfigurationStoresClient) senderForCreate(ctx context.Context, req *htt return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_delete_autorest.go index c410409febb7..aaff0f3cd6d6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c ConfigurationStoresClient) senderForDelete(ctx context.Context, req *htt return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_update_autorest.go index c58a47162039..970cc76c2972 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2020-06-01/configurationstores/method_update_autorest.go @@ -74,6 +74,6 @@ func (c ConfigurationStoresClient) senderForUpdate(ctx context.Context, req *htt return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/README.md index 7960f704c0fe..c9413d8e9056 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-0 ```go client := attestationproviders.NewAttestationProvidersClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := attestationproviders.AttestationServiceCreationParams{ // ... } + read, err := client.Create(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := attestationproviders.NewAttestationProvidersID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := attestationproviders.NewAttestationProvidersID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := attestationproviders.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + read, err := client.GetDefaultByLocation(ctx, id) if err != nil { // handle the error @@ -93,6 +94,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := attestationproviders.NewSubscriptionID() + read, err := client.List(ctx, id) if err != nil { // handle the error @@ -108,6 +110,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := attestationproviders.NewResourceGroupID() + read, err := client.ListByResourceGroup(ctx, id) if err != nil { // handle the error @@ -123,6 +126,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := attestationproviders.NewSubscriptionID() + read, err := client.ListDefault(ctx, id) if err != nil { // handle the error @@ -143,6 +147,7 @@ payload := attestationproviders.AttestationServicePatchParams{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/README.md index a245bb2d2ebc..7e7d5dafd0be 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/ ```go client := cognitiveservicesaccounts.NewCognitiveServicesAccountsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := cognitiveservicesaccounts.Account{ // ... } -future, err := client.AccountsCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.AccountsCreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") -future, err := client.AccountsDelete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.AccountsDeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.AccountsGet(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewSubscriptionID() + // alternatively `client.AccountsList(ctx, id)` can be used to do batched pagination items, err := client.AccountsListComplete(ctx, id) if err != nil { @@ -94,6 +87,7 @@ for _, item := range items { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewResourceGroupID() + // alternatively `client.AccountsListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.AccountsListByResourceGroupComplete(ctx, id) if err != nil { @@ -110,6 +104,7 @@ for _, item := range items { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.AccountsListKeys(ctx, id) if err != nil { // handle the error @@ -125,6 +120,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.AccountsListSkus(ctx, id) if err != nil { // handle the error @@ -140,6 +136,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.AccountsListUsages(ctx, id, cognitiveservicesaccounts.DefaultAccountsListUsagesOperationOptions()) if err != nil { // handle the error @@ -160,6 +157,7 @@ payload := cognitiveservicesaccounts.RegenerateKeyParameters{ // ... } + read, err := client.AccountsRegenerateKey(ctx, id, payload) if err != nil { // handle the error @@ -180,11 +178,8 @@ payload := cognitiveservicesaccounts.Account{ // ... } -future, err := client.AccountsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.AccountsUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -200,6 +195,7 @@ payload := cognitiveservicesaccounts.CheckDomainAvailabilityParameter{ // ... } + read, err := client.CheckDomainAvailability(ctx, id, payload) if err != nil { // handle the error @@ -220,6 +216,7 @@ payload := cognitiveservicesaccounts.CheckSkuAvailabilityParameter{ // ... } + read, err := client.CheckSkuAvailability(ctx, id, payload) if err != nil { // handle the error @@ -235,6 +232,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewDeletedAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "example-resource-group", "accountValue") + read, err := client.DeletedAccountsGet(ctx, id) if err != nil { // handle the error @@ -250,6 +248,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewSubscriptionID() + // alternatively `client.DeletedAccountsList(ctx, id)` can be used to do batched pagination items, err := client.DeletedAccountsListComplete(ctx, id) if err != nil { @@ -266,11 +265,8 @@ for _, item := range items { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewDeletedAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "example-resource-group", "accountValue") -future, err := client.DeletedAccountsPurge(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeletedAccountsPurgeThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -281,6 +277,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := cognitiveservicesaccounts.NewSubscriptionID() + // alternatively `client.ResourceSkusList(ctx, id)` can be used to do batched pagination items, err := client.ResourceSkusListComplete(ctx, id) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountscreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountscreate_autorest.go index 12eb5c41c0d0..265d03e0329c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountscreate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountscreate_autorest.go @@ -74,6 +74,6 @@ func (c CognitiveServicesAccountsClient) senderForAccountsCreate(ctx context.Con return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsdelete_autorest.go index 2b97a1af6bef..b2e86ca8f3ad 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsdelete_autorest.go @@ -73,6 +73,6 @@ func (c CognitiveServicesAccountsClient) senderForAccountsDelete(ctx context.Con return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsupdate_autorest.go index 52775e391f1c..d4434e7be10e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsupdate_autorest.go @@ -74,6 +74,6 @@ func (c CognitiveServicesAccountsClient) senderForAccountsUpdate(ctx context.Con return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountspurge_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountspurge_autorest.go index dba570c710e2..cea4509f7c79 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountspurge_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountspurge_autorest.go @@ -73,6 +73,6 @@ func (c CognitiveServicesAccountsClient) senderForDeletedAccountsPurge(ctx conte return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/README.md index 5d68cbb183e7..9bb1cd8e963d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08 ```go client := communicationservice.NewCommunicationServiceClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := communicationservice.NameAvailabilityParameters{ // ... } + read, err := client.CheckNameAvailability(ctx, id, payload) if err != nil { // handle the error @@ -53,11 +51,8 @@ payload := communicationservice.CommunicationServiceResource{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -68,11 +63,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := communicationservice.NewCommunicationServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "communicationServiceValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -83,6 +75,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := communicationservice.NewCommunicationServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "communicationServiceValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -103,6 +96,7 @@ payload := communicationservice.LinkNotificationHubParameters{ // ... } + read, err := client.LinkNotificationHub(ctx, id, payload) if err != nil { // handle the error @@ -118,6 +112,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := communicationservice.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -134,6 +129,7 @@ for _, item := range items { ```go ctx := context.TODO() id := communicationservice.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -150,6 +146,7 @@ for _, item := range items { ```go ctx := context.TODO() id := communicationservice.NewCommunicationServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "communicationServiceValue") + read, err := client.ListKeys(ctx, id) if err != nil { // handle the error @@ -170,6 +167,7 @@ payload := communicationservice.RegenerateKeyParameters{ // ... } + read, err := client.RegenerateKey(ctx, id, payload) if err != nil { // handle the error @@ -190,6 +188,7 @@ payload := communicationservice.CommunicationServiceResource{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_createorupdate_autorest.go index 365f47ce3e0c..6f819ce91c8b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c CommunicationServiceClient) senderForCreateOrUpdate(ctx context.Context, return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_delete_autorest.go index d65463d389da..d2b237f24532 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c CommunicationServiceClient) senderForDelete(ctx context.Context, req *ht return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/README.md index 6f474c85695b..36e4621c9d9c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/20 ```go client := confidentialledger.NewConfidentialLedgerClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := confidentialledger.ConfidentialLedger{ // ... } -future, err := client.LedgerCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.LedgerCreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := confidentialledger.NewLedgerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ledgerValue") -future, err := client.LedgerDelete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.LedgerDeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := confidentialledger.NewLedgerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ledgerValue") + read, err := client.LedgerGet(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := confidentialledger.NewResourceGroupID() + // alternatively `client.LedgerListByResourceGroup(ctx, id, confidentialledger.DefaultLedgerListByResourceGroupOperationOptions())` can be used to do batched pagination items, err := client.LedgerListByResourceGroupComplete(ctx, id, confidentialledger.DefaultLedgerListByResourceGroupOperationOptions()) if err != nil { @@ -94,6 +87,7 @@ for _, item := range items { ```go ctx := context.TODO() id := confidentialledger.NewSubscriptionID() + // alternatively `client.LedgerListBySubscription(ctx, id, confidentialledger.DefaultLedgerListBySubscriptionOperationOptions())` can be used to do batched pagination items, err := client.LedgerListBySubscriptionComplete(ctx, id, confidentialledger.DefaultLedgerListBySubscriptionOperationOptions()) if err != nil { @@ -115,11 +109,8 @@ payload := confidentialledger.ConfidentialLedger{ // ... } -future, err := client.LedgerUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.LedgerUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgercreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgercreate_autorest.go index 84bcbcbe3423..a85f38a8830e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgercreate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgercreate_autorest.go @@ -74,6 +74,6 @@ func (c ConfidentialLedgerClient) senderForLedgerCreate(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerdelete_autorest.go index 2d4172b43c45..7a43fa84326b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerdelete_autorest.go @@ -73,6 +73,6 @@ func (c ConfidentialLedgerClient) senderForLedgerDelete(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerupdate_autorest.go index 3c9328440e3a..d3b81aa119c1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerupdate_autorest.go @@ -74,6 +74,6 @@ func (c ConfidentialLedgerClient) senderForLedgerUpdate(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/README.md index 07c420a2dd73..2c90249fb6ff 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-0 ```go client := resourceguards.NewResourceGuardsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -28,6 +25,7 @@ if err != nil { ```go ctx := context.TODO() id := resourceguards.NewResourceGuardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -43,6 +41,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resourceguards.NewResourceGuardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -58,6 +57,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resourceguards.NewResourceGuardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue") + // alternatively `client.GetBackupSecurityPINRequestsObjects(ctx, id)` can be used to do batched pagination items, err := client.GetBackupSecurityPINRequestsObjectsComplete(ctx, id) if err != nil { @@ -74,6 +74,7 @@ for _, item := range items { ```go ctx := context.TODO() id := resourceguards.NewGetBackupSecurityPINRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue", "requestValue") + read, err := client.GetDefaultBackupSecurityPINRequestsObject(ctx, id) if err != nil { // handle the error @@ -89,6 +90,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resourceguards.NewDeleteProtectedItemRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue", "requestValue") + read, err := client.GetDefaultDeleteProtectedItemRequestsObject(ctx, id) if err != nil { // handle the error @@ -104,6 +106,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resourceguards.NewDeleteResourceGuardProxyRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue", "requestValue") + read, err := client.GetDefaultDeleteResourceGuardProxyRequestsObject(ctx, id) if err != nil { // handle the error @@ -119,6 +122,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resourceguards.NewDisableSoftDeleteRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue", "requestValue") + read, err := client.GetDefaultDisableSoftDeleteRequestsObject(ctx, id) if err != nil { // handle the error @@ -134,6 +138,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resourceguards.NewUpdateProtectedItemRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue", "requestValue") + read, err := client.GetDefaultUpdateProtectedItemRequestsObject(ctx, id) if err != nil { // handle the error @@ -149,6 +154,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resourceguards.NewUpdateProtectionPolicyRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue", "requestValue") + read, err := client.GetDefaultUpdateProtectionPolicyRequestsObject(ctx, id) if err != nil { // handle the error @@ -164,6 +170,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resourceguards.NewResourceGuardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue") + // alternatively `client.GetDeleteProtectedItemRequestsObjects(ctx, id)` can be used to do batched pagination items, err := client.GetDeleteProtectedItemRequestsObjectsComplete(ctx, id) if err != nil { @@ -180,6 +187,7 @@ for _, item := range items { ```go ctx := context.TODO() id := resourceguards.NewResourceGuardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue") + // alternatively `client.GetDeleteResourceGuardProxyRequestsObjects(ctx, id)` can be used to do batched pagination items, err := client.GetDeleteResourceGuardProxyRequestsObjectsComplete(ctx, id) if err != nil { @@ -196,6 +204,7 @@ for _, item := range items { ```go ctx := context.TODO() id := resourceguards.NewResourceGuardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue") + // alternatively `client.GetDisableSoftDeleteRequestsObjects(ctx, id)` can be used to do batched pagination items, err := client.GetDisableSoftDeleteRequestsObjectsComplete(ctx, id) if err != nil { @@ -212,6 +221,7 @@ for _, item := range items { ```go ctx := context.TODO() id := resourceguards.NewResourceGroupID() + // alternatively `client.GetResourcesInResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.GetResourcesInResourceGroupComplete(ctx, id) if err != nil { @@ -228,6 +238,7 @@ for _, item := range items { ```go ctx := context.TODO() id := resourceguards.NewSubscriptionID() + // alternatively `client.GetResourcesInSubscription(ctx, id)` can be used to do batched pagination items, err := client.GetResourcesInSubscriptionComplete(ctx, id) if err != nil { @@ -244,6 +255,7 @@ for _, item := range items { ```go ctx := context.TODO() id := resourceguards.NewResourceGuardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue") + // alternatively `client.GetUpdateProtectedItemRequestsObjects(ctx, id)` can be used to do batched pagination items, err := client.GetUpdateProtectedItemRequestsObjectsComplete(ctx, id) if err != nil { @@ -260,6 +272,7 @@ for _, item := range items { ```go ctx := context.TODO() id := resourceguards.NewResourceGuardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceGuardsValue") + // alternatively `client.GetUpdateProtectionPolicyRequestsObjects(ctx, id)` can be used to do batched pagination items, err := client.GetUpdateProtectionPolicyRequestsObjectsComplete(ctx, id) if err != nil { @@ -281,6 +294,7 @@ payload := resourceguards.PatchResourceRequestInput{ // ... } + read, err := client.Patch(ctx, id, payload) if err != nil { // handle the error @@ -301,6 +315,7 @@ payload := resourceguards.ResourceGuardResource{ // ... } + read, err := client.Put(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/README.md index a781c294f8cc..0b8fb5928552 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization ```go client := application.NewApplicationClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := application.Application{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := application.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGroupValue", "applicationValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := application.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGroupValue", "applicationValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := application.NewApplicationGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGroupValue") + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -99,6 +100,7 @@ payload := application.ApplicationPatch{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/README.md index a7537ca08cc8..83d268f339cb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization ```go client := applicationgroup.NewApplicationGroupClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := applicationgroup.ApplicationGroup{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := applicationgroup.NewApplicationGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGroupValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := applicationgroup.NewApplicationGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGroupValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := applicationgroup.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id, applicationgroup.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id, applicationgroup.DefaultListByResourceGroupOperationOptions()) if err != nil { @@ -94,6 +95,7 @@ for _, item := range items { ```go ctx := context.TODO() id := applicationgroup.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id, applicationgroup.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id, applicationgroup.DefaultListBySubscriptionOperationOptions()) if err != nil { @@ -115,6 +117,7 @@ payload := applicationgroup.ApplicationGroupPatch{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/README.md index a7ed00cc99cf..851bda3ba3f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization ```go client := desktop.NewDesktopClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -28,6 +25,7 @@ if err != nil { ```go ctx := context.TODO() id := desktop.NewDesktopID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGroupValue", "desktopValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -43,6 +41,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := desktop.NewApplicationGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGroupValue") + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -64,6 +63,7 @@ payload := desktop.DesktopPatch{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/README.md index a098d81147af..e562d80e9d2b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization ```go client := hostpool.NewHostPoolClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := hostpool.HostPool{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := hostpool.NewHostPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue") + read, err := client.Delete(ctx, id, hostpool.DefaultDeleteOperationOptions()) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := hostpool.NewHostPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := hostpool.NewSubscriptionID() + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -94,6 +95,7 @@ for _, item := range items { ```go ctx := context.TODO() id := hostpool.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -110,6 +112,7 @@ for _, item := range items { ```go ctx := context.TODO() id := hostpool.NewHostPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue") + read, err := client.RetrieveRegistrationToken(ctx, id) if err != nil { // handle the error @@ -130,6 +133,7 @@ payload := hostpool.HostPoolPatch{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/README.md index 3e54597f1f65..5c6871f41113 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization ```go client := scalingplan.NewScalingPlanClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := scalingplan.ScalingPlan{ // ... } + read, err := client.Create(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := scalingplan.NewScalingPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "scalingPlanValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := scalingplan.NewScalingPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "scalingPlanValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := scalingplan.NewHostPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue") + // alternatively `client.ListByHostPool(ctx, id)` can be used to do batched pagination items, err := client.ListByHostPoolComplete(ctx, id) if err != nil { @@ -94,6 +95,7 @@ for _, item := range items { ```go ctx := context.TODO() id := scalingplan.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -110,6 +112,7 @@ for _, item := range items { ```go ctx := context.TODO() id := scalingplan.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -131,6 +134,7 @@ payload := scalingplan.ScalingPlanPatch{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/README.md index 7a33424986c5..ff187e4b7e21 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization ```go client := sessionhost.NewSessionHostClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -28,6 +25,7 @@ if err != nil { ```go ctx := context.TODO() id := sessionhost.NewSessionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue", "sessionHostValue") + read, err := client.Delete(ctx, id, sessionhost.DefaultDeleteOperationOptions()) if err != nil { // handle the error @@ -43,6 +41,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := sessionhost.NewSessionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue", "sessionHostValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -58,6 +57,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := sessionhost.NewHostPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue") + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -79,6 +79,7 @@ payload := sessionhost.SessionHostPatch{ // ... } + read, err := client.Update(ctx, id, payload, sessionhost.DefaultUpdateOperationOptions()) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/README.md index 7ad254c1624d..d3c57b28f357 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization ```go client := workspace.NewWorkspaceClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := workspace.Workspace{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := workspace.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := workspace.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := workspace.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -94,6 +95,7 @@ for _, item := range items { ```go ctx := context.TODO() id := workspace.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -115,6 +117,7 @@ payload := workspace.WorkspacePatch{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/README.md index 2baabccc94da..e03243f6bf62 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/mo ```go client := monitorsresource.NewMonitorsResourceClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := monitorsresource.ElasticMonitorResource{ // ... } -future, err := client.MonitorsCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.MonitorsCreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := monitorsresource.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") -future, err := client.MonitorsDelete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.MonitorsDeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := monitorsresource.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + read, err := client.MonitorsGet(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := monitorsresource.NewSubscriptionID() + // alternatively `client.MonitorsList(ctx, id)` can be used to do batched pagination items, err := client.MonitorsListComplete(ctx, id) if err != nil { @@ -94,6 +87,7 @@ for _, item := range items { ```go ctx := context.TODO() id := monitorsresource.NewResourceGroupID() + // alternatively `client.MonitorsListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.MonitorsListByResourceGroupComplete(ctx, id) if err != nil { @@ -115,6 +109,7 @@ payload := monitorsresource.ElasticMonitorResourceUpdateParameters{ // ... } + read, err := client.MonitorsUpdate(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorscreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorscreate_autorest.go index 3902b992bd04..34ca7fcefd43 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorscreate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorscreate_autorest.go @@ -74,6 +74,6 @@ func (c MonitorsResourceClient) senderForMonitorsCreate(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsdelete_autorest.go index c90a4bcf5e81..8b68d78fe69f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsdelete_autorest.go @@ -73,6 +73,6 @@ func (c MonitorsResourceClient) senderForMonitorsDelete(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/README.md index ccdf9da8ce03..5de2943dc505 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/ru ```go client := rules.NewRulesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := rules.MonitoringTagRules{ // ... } + read, err := client.TagRulesCreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,11 +46,8 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := rules.NewTagRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "ruleSetValue") -future, err := client.TagRulesDelete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.TagRulesDeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +58,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := rules.NewTagRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "ruleSetValue") + read, err := client.TagRulesGet(ctx, id) if err != nil { // handle the error @@ -78,6 +74,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := rules.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + // alternatively `client.TagRulesList(ctx, id)` can be used to do batched pagination items, err := client.TagRulesListComplete(ctx, id) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulesdelete_autorest.go index e7d4dc1ffc59..e2125f74e17e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulesdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulesdelete_autorest.go @@ -73,6 +73,6 @@ func (c RulesClient) senderForTagRulesDelete(ctx context.Context, req *http.Requ return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/README.md index 9a454ac17f4b..3301a29ce82e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01 ```go client := apps.NewAppsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := apps.OperationInputs{ // ... } + read, err := client.CheckNameAvailability(ctx, id, payload) if err != nil { // handle the error @@ -53,6 +51,7 @@ payload := apps.OperationInputs{ // ... } + read, err := client.CheckSubdomainAvailability(ctx, id, payload) if err != nil { // handle the error @@ -73,11 +72,8 @@ payload := apps.App{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -88,11 +84,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := apps.NewIotAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -103,6 +96,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := apps.NewIotAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -118,6 +112,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := apps.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -134,6 +129,7 @@ for _, item := range items { ```go ctx := context.TODO() id := apps.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -150,6 +146,7 @@ for _, item := range items { ```go ctx := context.TODO() id := apps.NewSubscriptionID() + // alternatively `client.ListTemplates(ctx, id)` can be used to do batched pagination items, err := client.ListTemplatesComplete(ctx, id) if err != nil { @@ -171,11 +168,8 @@ payload := apps.AppPatch{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_createorupdate_autorest.go index 8c771fca3178..74c72f7a87ce 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c AppsClient) senderForCreateOrUpdate(ctx context.Context, req *http.Reque return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_delete_autorest.go index f214b7dcf3ac..df268a082431 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c AppsClient) senderForDelete(ctx context.Context, req *http.Request) (fut return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_update_autorest.go index 2f707665c0f9..2e89b452e2c3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_update_autorest.go @@ -74,6 +74,6 @@ func (c AppsClient) senderForUpdate(ctx context.Context, req *http.Request) (fut return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/README.md index 5c8333cbd8ed..6629a34b7eaa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021- ```go client := loadtests.NewLoadTestsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := loadtests.LoadTestResource{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,11 +46,8 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := loadtests.NewLoadTestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadTestValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +58,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := loadtests.NewLoadTestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadTestValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +74,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := loadtests.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -94,6 +91,7 @@ for _, item := range items { ```go ctx := context.TODO() id := loadtests.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -115,6 +113,7 @@ payload := loadtests.LoadTestResourcePatchRequestBody{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_delete_autorest.go index 1b33926a44b9..2c08ce367d86 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c LoadTestsClient) senderForDelete(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/README.md index 968811c50922..ac45622c144e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018- ```go client := managedidentity.NewManagedIdentityClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -28,6 +25,7 @@ if err != nil { ```go ctx := context.TODO() id := managedidentity.NewScopeID() + read, err := client.SystemAssignedIdentitiesGetByScope(ctx, id) if err != nil { // handle the error @@ -48,6 +46,7 @@ payload := managedidentity.Identity{ // ... } + read, err := client.UserAssignedIdentitiesCreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := managedidentity.NewUserAssignedIdentityID() + read, err := client.UserAssignedIdentitiesDelete(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := managedidentity.NewUserAssignedIdentityID() + read, err := client.UserAssignedIdentitiesGet(ctx, id) if err != nil { // handle the error @@ -93,6 +94,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := managedidentity.NewResourceGroupID() + // alternatively `client.UserAssignedIdentitiesListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.UserAssignedIdentitiesListByResourceGroupComplete(ctx, id) if err != nil { @@ -109,6 +111,7 @@ for _, item := range items { ```go ctx := context.TODO() id := managedidentity.NewSubscriptionID() + // alternatively `client.UserAssignedIdentitiesListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.UserAssignedIdentitiesListBySubscriptionComplete(ctx, id) if err != nil { @@ -130,6 +133,7 @@ payload := managedidentity.IdentityUpdate{ // ... } + read, err := client.UserAssignedIdentitiesUpdate(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/README.md index 89812eef627b..aa5a6f4a5998 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accou ```go client := accounts.NewAccountsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := accounts.MapsAccount{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := accounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := accounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := accounts.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -94,6 +95,7 @@ for _, item := range items { ```go ctx := context.TODO() id := accounts.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -110,6 +112,7 @@ for _, item := range items { ```go ctx := context.TODO() id := accounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.ListKeys(ctx, id) if err != nil { // handle the error @@ -130,6 +133,7 @@ payload := accounts.MapsKeySpecification{ // ... } + read, err := client.RegenerateKeys(ctx, id, payload) if err != nil { // handle the error @@ -150,6 +154,7 @@ payload := accounts.MapsAccountUpdateParameters{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/README.md index 7b429b683fc3..6eb727c4cc49 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creat ```go client := creators.NewCreatorsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := creators.Creator{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := creators.NewCreatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "creatorValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := creators.NewCreatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "creatorValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := creators.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + // alternatively `client.ListByAccount(ctx, id)` can be used to do batched pagination items, err := client.ListByAccountComplete(ctx, id) if err != nil { @@ -99,6 +100,7 @@ payload := creators.CreatorUpdateParameters{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/README.md index 5653d0b2fa5e..cac9d119190f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01- ```go client := resource.NewResourceClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := resource.RemoteRenderingAccount{ // ... } + read, err := client.RemoteRenderingAccountsCreate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resource.NewRemoteRenderingAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.RemoteRenderingAccountsDelete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resource.NewRemoteRenderingAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.RemoteRenderingAccountsGet(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resource.NewResourceGroupID() + // alternatively `client.RemoteRenderingAccountsListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.RemoteRenderingAccountsListByResourceGroupComplete(ctx, id) if err != nil { @@ -94,6 +95,7 @@ for _, item := range items { ```go ctx := context.TODO() id := resource.NewSubscriptionID() + // alternatively `client.RemoteRenderingAccountsListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.RemoteRenderingAccountsListBySubscriptionComplete(ctx, id) if err != nil { @@ -115,6 +117,7 @@ payload := resource.RemoteRenderingAccount{ // ... } + read, err := client.RemoteRenderingAccountsUpdate(ctx, id, payload) if err != nil { // handle the error @@ -135,6 +138,7 @@ payload := resource.SpatialAnchorsAccount{ // ... } + read, err := client.SpatialAnchorsAccountsCreate(ctx, id, payload) if err != nil { // handle the error @@ -150,6 +154,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resource.NewSpatialAnchorsAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.SpatialAnchorsAccountsDelete(ctx, id) if err != nil { // handle the error @@ -165,6 +170,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resource.NewSpatialAnchorsAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.SpatialAnchorsAccountsGet(ctx, id) if err != nil { // handle the error @@ -180,6 +186,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := resource.NewResourceGroupID() + // alternatively `client.SpatialAnchorsAccountsListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.SpatialAnchorsAccountsListByResourceGroupComplete(ctx, id) if err != nil { @@ -196,6 +203,7 @@ for _, item := range items { ```go ctx := context.TODO() id := resource.NewSubscriptionID() + // alternatively `client.SpatialAnchorsAccountsListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.SpatialAnchorsAccountsListBySubscriptionComplete(ctx, id) if err != nil { @@ -217,6 +225,7 @@ payload := resource.SpatialAnchorsAccount{ // ... } + read, err := client.SpatialAnchorsAccountsUpdate(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/README.md index c52c4b401d2b..d4737c06571f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017 ```go client := namespaces.NewNamespacesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := namespaces.CheckAvailabilityParameters{ // ... } + read, err := client.CheckAvailability(ctx, id, payload) if err != nil { // handle the error @@ -53,6 +51,7 @@ payload := namespaces.NamespaceCreateOrUpdateParameters{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -73,6 +72,7 @@ payload := namespaces.SharedAccessAuthorizationRuleCreateOrUpdateParameters{ // ... } + read, err := client.CreateOrUpdateAuthorizationRule(ctx, id, payload) if err != nil { // handle the error @@ -88,11 +88,8 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := namespaces.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -103,6 +100,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := namespaces.NewAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "authorizationRuleValue") + read, err := client.DeleteAuthorizationRule(ctx, id) if err != nil { // handle the error @@ -118,6 +116,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := namespaces.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -133,6 +132,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := namespaces.NewAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "authorizationRuleValue") + read, err := client.GetAuthorizationRule(ctx, id) if err != nil { // handle the error @@ -148,6 +148,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := namespaces.NewResourceGroupID() + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -164,6 +165,7 @@ for _, item := range items { ```go ctx := context.TODO() id := namespaces.NewSubscriptionID() + // alternatively `client.ListAll(ctx, id)` can be used to do batched pagination items, err := client.ListAllComplete(ctx, id) if err != nil { @@ -180,6 +182,7 @@ for _, item := range items { ```go ctx := context.TODO() id := namespaces.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue") + // alternatively `client.ListAuthorizationRules(ctx, id)` can be used to do batched pagination items, err := client.ListAuthorizationRulesComplete(ctx, id) if err != nil { @@ -196,6 +199,7 @@ for _, item := range items { ```go ctx := context.TODO() id := namespaces.NewAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "authorizationRuleValue") + read, err := client.ListKeys(ctx, id) if err != nil { // handle the error @@ -216,6 +220,7 @@ payload := namespaces.NamespacePatchParameters{ // ... } + read, err := client.Patch(ctx, id, payload) if err != nil { // handle the error @@ -236,6 +241,7 @@ payload := namespaces.PolicykeyResource{ // ... } + read, err := client.RegenerateKeys(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_delete_autorest.go index eec88a9eea80..968dfe754f22 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c NamespacesClient) senderForDelete(ctx context.Context, req *http.Request return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/README.md index 884fbb1d0d6b..1fa1f9890b1a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017 ```go client := notificationhubs.NewNotificationHubsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := notificationhubs.CheckAvailabilityParameters{ // ... } + read, err := client.CheckNotificationHubAvailability(ctx, id, payload) if err != nil { // handle the error @@ -53,6 +51,7 @@ payload := notificationhubs.NotificationHubCreateOrUpdateParameters{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -73,6 +72,7 @@ payload := notificationhubs.SharedAccessAuthorizationRuleCreateOrUpdateParameter // ... } + read, err := client.CreateOrUpdateAuthorizationRule(ctx, id, payload) if err != nil { // handle the error @@ -89,6 +89,7 @@ if model := read.Model; model != nil { ctx := context.TODO() id := notificationhubs.NewNotificationHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "notificationHubValue") var payload interface{} + read, err := client.DebugSend(ctx, id, payload) if err != nil { // handle the error @@ -104,6 +105,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := notificationhubs.NewNotificationHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "notificationHubValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -119,6 +121,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := notificationhubs.NewNotificationHubAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "notificationHubValue", "authorizationRuleValue") + read, err := client.DeleteAuthorizationRule(ctx, id) if err != nil { // handle the error @@ -134,6 +137,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := notificationhubs.NewNotificationHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "notificationHubValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -149,6 +153,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := notificationhubs.NewNotificationHubAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "notificationHubValue", "authorizationRuleValue") + read, err := client.GetAuthorizationRule(ctx, id) if err != nil { // handle the error @@ -164,6 +169,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := notificationhubs.NewNotificationHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "notificationHubValue") + read, err := client.GetPnsCredentials(ctx, id) if err != nil { // handle the error @@ -179,6 +185,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := notificationhubs.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue") + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -195,6 +202,7 @@ for _, item := range items { ```go ctx := context.TODO() id := notificationhubs.NewNotificationHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "notificationHubValue") + // alternatively `client.ListAuthorizationRules(ctx, id)` can be used to do batched pagination items, err := client.ListAuthorizationRulesComplete(ctx, id) if err != nil { @@ -211,6 +219,7 @@ for _, item := range items { ```go ctx := context.TODO() id := notificationhubs.NewNotificationHubAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "notificationHubValue", "authorizationRuleValue") + read, err := client.ListKeys(ctx, id) if err != nil { // handle the error @@ -231,6 +240,7 @@ payload := notificationhubs.NotificationHubPatchParameters{ // ... } + read, err := client.Patch(ctx, id, payload) if err != nil { // handle the error @@ -251,6 +261,7 @@ payload := notificationhubs.PolicykeyResource{ // ... } + read, err := client.RegenerateKeys(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/README.md index 38ae8a2f2a96..2991eb2ff5dc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-pre ```go client := dashboard.NewDashboardClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := dashboard.Dashboard{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := dashboard.NewDashboardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dashboardValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := dashboard.NewDashboardID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dashboardValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := dashboard.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -94,6 +95,7 @@ for _, item := range items { ```go ctx := context.TODO() id := dashboard.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -115,6 +117,7 @@ payload := dashboard.PatchableDashboard{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/README.md index 777297fb124a..485d1a89f379 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-pre ```go client := tenantconfiguration.NewTenantConfigurationClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -32,6 +29,7 @@ payload := tenantconfiguration.Configuration{ // ... } + read, err := client.TenantConfigurationsCreate(ctx, payload) if err != nil { // handle the error @@ -47,6 +45,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() + read, err := client.TenantConfigurationsDelete(ctx) if err != nil { // handle the error @@ -62,6 +61,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() + read, err := client.TenantConfigurationsGet(ctx) if err != nil { // handle the error @@ -77,6 +77,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() + read, err := client.TenantConfigurationsList(ctx) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/README.md index 30a8d6ad2b7a..1f0547339d48 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021 ```go client := capacities.NewCapacitiesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := capacities.CheckCapacityNameAvailabilityParameters{ // ... } + read, err := client.CheckNameAvailability(ctx, id, payload) if err != nil { // handle the error @@ -53,11 +51,8 @@ payload := capacities.DedicatedCapacity{ // ... } -future, err := client.Create(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -68,11 +63,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := capacities.NewCapacitiesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dedicatedCapacityValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -83,6 +75,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := capacities.NewCapacitiesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dedicatedCapacityValue") + read, err := client.GetDetails(ctx, id) if err != nil { // handle the error @@ -98,6 +91,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := capacities.NewSubscriptionID() + read, err := client.List(ctx, id) if err != nil { // handle the error @@ -113,6 +107,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := capacities.NewResourceGroupID() + read, err := client.ListByResourceGroup(ctx, id) if err != nil { // handle the error @@ -128,6 +123,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := capacities.NewCapacitiesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dedicatedCapacityValue") + read, err := client.ListSkusForCapacity(ctx, id) if err != nil { // handle the error @@ -143,11 +139,8 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := capacities.NewCapacitiesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dedicatedCapacityValue") -future, err := client.Resume(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.ResumeThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -158,11 +151,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := capacities.NewCapacitiesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dedicatedCapacityValue") -future, err := client.Suspend(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.SuspendThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -178,11 +168,8 @@ payload := capacities.DedicatedCapacityUpdateParameters{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_create_autorest.go index abfeb17602b1..2f3e4c4d70ba 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_create_autorest.go @@ -74,6 +74,6 @@ func (c CapacitiesClient) senderForCreate(ctx context.Context, req *http.Request return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_delete_autorest.go index ce943b95e9be..2ae1ea548f7c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c CapacitiesClient) senderForDelete(ctx context.Context, req *http.Request return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_resume_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_resume_autorest.go index f3eaf18bdd96..dce005d6e890 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_resume_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_resume_autorest.go @@ -73,6 +73,6 @@ func (c CapacitiesClient) senderForResume(ctx context.Context, req *http.Request return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_suspend_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_suspend_autorest.go index a1bae44dca17..915f4e13b43c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_suspend_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_suspend_autorest.go @@ -73,6 +73,6 @@ func (c CapacitiesClient) senderForSuspend(ctx context.Context, req *http.Reques return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_update_autorest.go index e7251ff2184c..d9142dd01c71 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_update_autorest.go @@ -74,6 +74,6 @@ func (c CapacitiesClient) senderForUpdate(ctx context.Context, req *http.Request return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/README.md index 068b5f763fed..0da8eb3af38a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01 ```go client := privatezones.NewPrivateZonesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := privatezones.PrivateZone{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload, privatezones.DefaultCreateOrUpdateOperationOptions()) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload, privatezones.DefaultCreateOrUpdateOperationOptions()); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := privatezones.NewPrivateDnsZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateZoneValue") -future, err := client.Delete(ctx, id, privatezones.DefaultDeleteOperationOptions()) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id, privatezones.DefaultDeleteOperationOptions()); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := privatezones.NewPrivateDnsZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateZoneValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := privatezones.NewSubscriptionID() + // alternatively `client.List(ctx, id, privatezones.DefaultListOperationOptions())` can be used to do batched pagination items, err := client.ListComplete(ctx, id, privatezones.DefaultListOperationOptions()) if err != nil { @@ -94,6 +87,7 @@ for _, item := range items { ```go ctx := context.TODO() id := privatezones.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id, privatezones.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id, privatezones.DefaultListByResourceGroupOperationOptions()) if err != nil { @@ -115,11 +109,8 @@ payload := privatezones.PrivateZone{ // ... } -future, err := client.Update(ctx, id, payload, privatezones.DefaultUpdateOperationOptions()) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload, privatezones.DefaultUpdateOperationOptions()); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_createorupdate_autorest.go index 8de6f2b8af67..ccd19d4a6fa8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_createorupdate_autorest.go @@ -108,6 +108,6 @@ func (c PrivateZonesClient) senderForCreateOrUpdate(ctx context.Context, req *ht return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_delete_autorest.go index 8c7111cb854a..e32f85656f26 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_delete_autorest.go @@ -102,6 +102,6 @@ func (c PrivateZonesClient) senderForDelete(ctx context.Context, req *http.Reque return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_update_autorest.go index 28faf3d23207..5a2191f6a542 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_update_autorest.go @@ -103,6 +103,6 @@ func (c PrivateZonesClient) senderForUpdate(ctx context.Context, req *http.Reque return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/README.md index d861274465af..95d148f6de80 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01 ```go client := recordsets.NewRecordSetsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := recordsets.RecordSet{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload, recordsets.DefaultCreateOrUpdateOperationOptions()) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := recordsets.NewRecordTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateZoneValue", "A", "relativeRecordSetValue") + read, err := client.Delete(ctx, id, recordsets.DefaultDeleteOperationOptions()) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := recordsets.NewRecordTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateZoneValue", "A", "relativeRecordSetValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := recordsets.NewPrivateDnsZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateZoneValue") + // alternatively `client.List(ctx, id, recordsets.DefaultListOperationOptions())` can be used to do batched pagination items, err := client.ListComplete(ctx, id, recordsets.DefaultListOperationOptions()) if err != nil { @@ -94,6 +95,7 @@ for _, item := range items { ```go ctx := context.TODO() id := recordsets.NewPrivateZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateZoneValue", "A") + // alternatively `client.ListByType(ctx, id, recordsets.DefaultListByTypeOperationOptions())` can be used to do batched pagination items, err := client.ListByTypeComplete(ctx, id, recordsets.DefaultListByTypeOperationOptions()) if err != nil { @@ -115,6 +117,7 @@ payload := recordsets.RecordSet{ // ... } + read, err := client.Update(ctx, id, payload, recordsets.DefaultUpdateOperationOptions()) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/README.md index f8aff8c29a5b..951aa280f8de 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01 ```go client := virtualnetworklinks.NewVirtualNetworkLinksClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := virtualnetworklinks.VirtualNetworkLink{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload, virtualnetworklinks.DefaultCreateOrUpdateOperationOptions()) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload, virtualnetworklinks.DefaultCreateOrUpdateOperationOptions()); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := virtualnetworklinks.NewVirtualNetworkLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateZoneValue", "virtualNetworkLinkValue") -future, err := client.Delete(ctx, id, virtualnetworklinks.DefaultDeleteOperationOptions()) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id, virtualnetworklinks.DefaultDeleteOperationOptions()); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := virtualnetworklinks.NewVirtualNetworkLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateZoneValue", "virtualNetworkLinkValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := virtualnetworklinks.NewPrivateDnsZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateZoneValue") + // alternatively `client.List(ctx, id, virtualnetworklinks.DefaultListOperationOptions())` can be used to do batched pagination items, err := client.ListComplete(ctx, id, virtualnetworklinks.DefaultListOperationOptions()) if err != nil { @@ -99,11 +92,8 @@ payload := virtualnetworklinks.VirtualNetworkLink{ // ... } -future, err := client.Update(ctx, id, payload, virtualnetworklinks.DefaultUpdateOperationOptions()) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload, virtualnetworklinks.DefaultUpdateOperationOptions()); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_createorupdate_autorest.go index 904936122f72..210f701364c8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_createorupdate_autorest.go @@ -108,6 +108,6 @@ func (c VirtualNetworkLinksClient) senderForCreateOrUpdate(ctx context.Context, return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_delete_autorest.go index 2139e10a867e..52398f30a496 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_delete_autorest.go @@ -102,6 +102,6 @@ func (c VirtualNetworkLinksClient) senderForDelete(ctx context.Context, req *htt return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_update_autorest.go index 70253feb8d81..3d911db3a672 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_update_autorest.go @@ -103,6 +103,6 @@ func (c VirtualNetworkLinksClient) senderForUpdate(ctx context.Context, req *htt return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/README.md index 8d24f7f62d22..fb7cbb295ee9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/ac ```go client := account.NewAccountClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := account.CollectionAdminUpdate{ // ... } + read, err := client.AddRootCollectionAdmin(ctx, id, payload) if err != nil { // handle the error @@ -53,11 +51,8 @@ payload := account.Account{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -68,11 +63,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := account.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -83,6 +75,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := account.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -98,6 +91,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := account.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -114,6 +108,7 @@ for _, item := range items { ```go ctx := context.TODO() id := account.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -130,6 +125,7 @@ for _, item := range items { ```go ctx := context.TODO() id := account.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.ListKeys(ctx, id) if err != nil { // handle the error @@ -150,11 +146,8 @@ payload := account.AccountUpdateParameters{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_createorupdate_autorest.go index 9fe430d5fa25..8bfef414e46f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c AccountClient) senderForCreateOrUpdate(ctx context.Context, req *http.Re return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_delete_autorest.go index 20e299563452..43aad84a7cc5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c AccountClient) senderForDelete(ctx context.Context, req *http.Request) ( return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_update_autorest.go index 07ea7ae98b8a..97b0b6801dd8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_update_autorest.go @@ -74,6 +74,6 @@ func (c AccountClient) senderForUpdate(ctx context.Context, req *http.Request) ( return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/README.md index 99d8a1fa65e8..03e30a41867b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022- ```go client := databases.NewDatabasesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := databases.Database{ // ... } -future, err := client.Create(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -68,11 +59,8 @@ payload := databases.ExportClusterParameters{ // ... } -future, err := client.Export(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.ExportThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -88,11 +76,8 @@ payload := databases.ForceUnlinkParameters{ // ... } -future, err := client.ForceUnlink(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.ForceUnlinkThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -103,6 +88,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -123,11 +109,8 @@ payload := databases.ImportClusterParameters{ // ... } -future, err := client.Import(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.ImportThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -138,6 +121,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := databases.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") + // alternatively `client.ListByCluster(ctx, id)` can be used to do batched pagination items, err := client.ListByClusterComplete(ctx, id) if err != nil { @@ -154,6 +138,7 @@ for _, item := range items { ```go ctx := context.TODO() id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") + read, err := client.ListKeys(ctx, id) if err != nil { // handle the error @@ -174,11 +159,8 @@ payload := databases.RegenerateKeyParameters{ // ... } -future, err := client.RegenerateKey(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.RegenerateKeyThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -194,11 +176,8 @@ payload := databases.DatabaseUpdate{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_create_autorest.go index f25cb97201d4..e9edfeb945d6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_create_autorest.go @@ -74,6 +74,6 @@ func (c DatabasesClient) senderForCreate(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_delete_autorest.go index fbe81fc2def5..13221da85a68 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c DatabasesClient) senderForDelete(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_export_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_export_autorest.go index 7baa02dabffd..86805734f955 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_export_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_export_autorest.go @@ -74,6 +74,6 @@ func (c DatabasesClient) senderForExport(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_forceunlink_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_forceunlink_autorest.go index e6ba1c82b9f8..39b957d5bf3a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_forceunlink_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_forceunlink_autorest.go @@ -74,6 +74,6 @@ func (c DatabasesClient) senderForForceUnlink(ctx context.Context, req *http.Req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_import_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_import_autorest.go index 307f6823bdf2..e512521e78b3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_import_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_import_autorest.go @@ -74,6 +74,6 @@ func (c DatabasesClient) senderForImport(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_regeneratekey_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_regeneratekey_autorest.go index e4f5e0817143..2e7fa11c5321 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_regeneratekey_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_regeneratekey_autorest.go @@ -74,6 +74,6 @@ func (c DatabasesClient) senderForRegenerateKey(ctx context.Context, req *http.R return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_update_autorest.go index 0d480d48c0fd..fa71d982b321 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_update_autorest.go @@ -74,6 +74,6 @@ func (c DatabasesClient) senderForUpdate(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/README.md index e57b387d8935..4c928079c9c2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022- ```go client := redisenterprise.NewRedisEnterpriseClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := redisenterprise.Cluster{ // ... } -future, err := client.Create(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -53,11 +47,8 @@ payload := redisenterprise.Database{ // ... } -future, err := client.DatabasesCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DatabasesCreateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -68,11 +59,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") -future, err := client.DatabasesDelete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DatabasesDeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -88,11 +76,8 @@ payload := redisenterprise.ExportClusterParameters{ // ... } -future, err := client.DatabasesExport(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DatabasesExportThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -108,11 +93,8 @@ payload := redisenterprise.ForceUnlinkParameters{ // ... } -future, err := client.DatabasesForceUnlink(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DatabasesForceUnlinkThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -123,6 +105,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") + read, err := client.DatabasesGet(ctx, id) if err != nil { // handle the error @@ -143,11 +126,8 @@ payload := redisenterprise.ImportClusterParameters{ // ... } -future, err := client.DatabasesImport(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DatabasesImportThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -158,6 +138,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := redisenterprise.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") + // alternatively `client.DatabasesListByCluster(ctx, id)` can be used to do batched pagination items, err := client.DatabasesListByClusterComplete(ctx, id) if err != nil { @@ -174,6 +155,7 @@ for _, item := range items { ```go ctx := context.TODO() id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") + read, err := client.DatabasesListKeys(ctx, id) if err != nil { // handle the error @@ -194,11 +176,8 @@ payload := redisenterprise.RegenerateKeyParameters{ // ... } -future, err := client.DatabasesRegenerateKey(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DatabasesRegenerateKeyThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -214,11 +193,8 @@ payload := redisenterprise.DatabaseUpdate{ // ... } -future, err := client.DatabasesUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DatabasesUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -229,11 +205,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := redisenterprise.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -244,6 +217,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := redisenterprise.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -259,6 +233,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := redisenterprise.NewSubscriptionID() + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -275,6 +250,7 @@ for _, item := range items { ```go ctx := context.TODO() id := redisenterprise.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -296,11 +272,8 @@ payload := redisenterprise.ClusterUpdate{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_create_autorest.go index ca065d423be1..13e63cea4235 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_create_autorest.go @@ -74,6 +74,6 @@ func (c RedisEnterpriseClient) senderForCreate(ctx context.Context, req *http.Re return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasescreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasescreate_autorest.go index 05d421f71752..9e25be35dd18 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasescreate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasescreate_autorest.go @@ -74,6 +74,6 @@ func (c RedisEnterpriseClient) senderForDatabasesCreate(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesdelete_autorest.go index 569d09992986..27f6d03cc519 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesdelete_autorest.go @@ -73,6 +73,6 @@ func (c RedisEnterpriseClient) senderForDatabasesDelete(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesexport_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesexport_autorest.go index ed030d90dae0..a354474337cf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesexport_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesexport_autorest.go @@ -74,6 +74,6 @@ func (c RedisEnterpriseClient) senderForDatabasesExport(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesforceunlink_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesforceunlink_autorest.go index 47d29738e9bb..2bc1a9daa873 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesforceunlink_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesforceunlink_autorest.go @@ -74,6 +74,6 @@ func (c RedisEnterpriseClient) senderForDatabasesForceUnlink(ctx context.Context return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesimport_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesimport_autorest.go index 72cbc451bc2b..14789c3422a6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesimport_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesimport_autorest.go @@ -74,6 +74,6 @@ func (c RedisEnterpriseClient) senderForDatabasesImport(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesregeneratekey_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesregeneratekey_autorest.go index 9ce404fc1340..288c6ecda34c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesregeneratekey_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesregeneratekey_autorest.go @@ -74,6 +74,6 @@ func (c RedisEnterpriseClient) senderForDatabasesRegenerateKey(ctx context.Conte return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesupdate_autorest.go index 13be3b3131d9..36549fef9004 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesupdate_autorest.go @@ -74,6 +74,6 @@ func (c RedisEnterpriseClient) senderForDatabasesUpdate(ctx context.Context, req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_delete_autorest.go index 09682513344b..c4e10ec0530e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c RedisEnterpriseClient) senderForDelete(ctx context.Context, req *http.Re return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_update_autorest.go index a7506d520190..b5ee5a889a90 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_update_autorest.go @@ -74,6 +74,6 @@ func (c RedisEnterpriseClient) senderForUpdate(ctx context.Context, req *http.Re return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/README.md index ddbb3eb04459..69642329ad26 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybr ```go client := hybridconnections.NewHybridConnectionsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := hybridconnections.HybridConnection{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -53,6 +51,7 @@ payload := hybridconnections.AuthorizationRule{ // ... } + read, err := client.CreateOrUpdateAuthorizationRule(ctx, id, payload) if err != nil { // handle the error @@ -68,6 +67,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := hybridconnections.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -83,6 +83,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := hybridconnections.NewHybridConnectionAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue", "authorizationRuleValue") + read, err := client.DeleteAuthorizationRule(ctx, id) if err != nil { // handle the error @@ -98,6 +99,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := hybridconnections.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -113,6 +115,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := hybridconnections.NewHybridConnectionAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue", "authorizationRuleValue") + read, err := client.GetAuthorizationRule(ctx, id) if err != nil { // handle the error @@ -128,6 +131,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := hybridconnections.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue") + // alternatively `client.ListAuthorizationRules(ctx, id)` can be used to do batched pagination items, err := client.ListAuthorizationRulesComplete(ctx, id) if err != nil { @@ -144,6 +148,7 @@ for _, item := range items { ```go ctx := context.TODO() id := hybridconnections.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue") + // alternatively `client.ListByNamespace(ctx, id)` can be used to do batched pagination items, err := client.ListByNamespaceComplete(ctx, id) if err != nil { @@ -160,6 +165,7 @@ for _, item := range items { ```go ctx := context.TODO() id := hybridconnections.NewHybridConnectionAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue", "authorizationRuleValue") + read, err := client.ListKeys(ctx, id) if err != nil { // handle the error @@ -180,6 +186,7 @@ payload := hybridconnections.RegenerateAccessKeyParameters{ // ... } + read, err := client.RegenerateKeys(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/README.md index 264a1f12057a..91af006d55e6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/name ```go client := namespaces.NewNamespacesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := namespaces.CheckNameAvailability{ // ... } + read, err := client.CheckNameAvailability(ctx, id, payload) if err != nil { // handle the error @@ -53,11 +51,8 @@ payload := namespaces.RelayNamespace{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -73,6 +68,7 @@ payload := namespaces.AuthorizationRule{ // ... } + read, err := client.CreateOrUpdateAuthorizationRule(ctx, id, payload) if err != nil { // handle the error @@ -88,11 +84,8 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := namespaces.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -103,6 +96,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := namespaces.NewAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "authorizationRuleValue") + read, err := client.DeleteAuthorizationRule(ctx, id) if err != nil { // handle the error @@ -118,6 +112,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := namespaces.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -133,6 +128,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := namespaces.NewAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "authorizationRuleValue") + read, err := client.GetAuthorizationRule(ctx, id) if err != nil { // handle the error @@ -148,6 +144,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := namespaces.NewSubscriptionID() + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -164,6 +161,7 @@ for _, item := range items { ```go ctx := context.TODO() id := namespaces.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue") + // alternatively `client.ListAuthorizationRules(ctx, id)` can be used to do batched pagination items, err := client.ListAuthorizationRulesComplete(ctx, id) if err != nil { @@ -180,6 +178,7 @@ for _, item := range items { ```go ctx := context.TODO() id := namespaces.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -196,6 +195,7 @@ for _, item := range items { ```go ctx := context.TODO() id := namespaces.NewAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "authorizationRuleValue") + read, err := client.ListKeys(ctx, id) if err != nil { // handle the error @@ -216,6 +216,7 @@ payload := namespaces.RegenerateAccessKeyParameters{ // ... } + read, err := client.RegenerateKeys(ctx, id, payload) if err != nil { // handle the error @@ -236,6 +237,7 @@ payload := namespaces.RelayUpdateParameters{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_createorupdate_autorest.go index f1408ddd6b25..09581fdbbbf6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c NamespacesClient) senderForCreateOrUpdate(ctx context.Context, req *http return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_delete_autorest.go index eec88a9eea80..968dfe754f22 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c NamespacesClient) senderForDelete(ctx context.Context, req *http.Request return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/README.md index 2b65a4a1fbe7..b173f26cdd2e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adm ```go client := adminkeys.NewAdminKeysClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -28,6 +25,7 @@ if err != nil { ```go ctx := context.TODO() id := adminkeys.NewSearchServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "searchServiceValue") + read, err := client.Get(ctx, id, adminkeys.DefaultGetOperationOptions()) if err != nil { // handle the error @@ -43,6 +41,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := adminkeys.NewKeyKindID("12345678-1234-9876-4563-123456789012", "example-resource-group", "searchServiceValue", "primary") + read, err := client.Regenerate(ctx, id, adminkeys.DefaultRegenerateOperationOptions()) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/README.md index 6deb40d769a4..5e2d9375cdbe 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/que ```go client := querykeys.NewQueryKeysClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -28,6 +25,7 @@ if err != nil { ```go ctx := context.TODO() id := querykeys.NewCreateQueryKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "searchServiceValue", "nameValue") + read, err := client.Create(ctx, id, querykeys.DefaultCreateOperationOptions()) if err != nil { // handle the error @@ -43,6 +41,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := querykeys.NewDeleteQueryKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "searchServiceValue", "keyValue") + read, err := client.Delete(ctx, id, querykeys.DefaultDeleteOperationOptions()) if err != nil { // handle the error @@ -58,6 +57,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := querykeys.NewSearchServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "searchServiceValue") + // alternatively `client.ListBySearchService(ctx, id, querykeys.DefaultListBySearchServiceOperationOptions())` can be used to do batched pagination items, err := client.ListBySearchServiceComplete(ctx, id, querykeys.DefaultListBySearchServiceOperationOptions()) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/README.md index 6f7af077a0be..8986fcfc8c75 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/ser ```go client := services.NewServicesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := services.CheckNameAvailabilityInput{ // ... } + read, err := client.CheckNameAvailability(ctx, id, payload, services.DefaultCheckNameAvailabilityOperationOptions()) if err != nil { // handle the error @@ -53,11 +51,8 @@ payload := services.SearchService{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload, services.DefaultCreateOrUpdateOperationOptions()) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload, services.DefaultCreateOrUpdateOperationOptions()); err != nil { // handle the error } ``` @@ -68,6 +63,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := services.NewSearchServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "searchServiceValue") + read, err := client.Delete(ctx, id, services.DefaultDeleteOperationOptions()) if err != nil { // handle the error @@ -83,6 +79,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := services.NewSearchServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "searchServiceValue") + read, err := client.Get(ctx, id, services.DefaultGetOperationOptions()) if err != nil { // handle the error @@ -98,6 +95,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := services.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id, services.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id, services.DefaultListByResourceGroupOperationOptions()) if err != nil { @@ -114,6 +112,7 @@ for _, item := range items { ```go ctx := context.TODO() id := services.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id, services.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id, services.DefaultListBySubscriptionOperationOptions()) if err != nil { @@ -135,6 +134,7 @@ payload := services.SearchService{ // ... } + read, err := client.Update(ctx, id, payload, services.DefaultUpdateOperationOptions()) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_createorupdate_autorest.go index ef2cffd5f12e..083d9d9e3874 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_createorupdate_autorest.go @@ -103,6 +103,6 @@ func (c ServicesClient) senderForCreateOrUpdate(ctx context.Context, req *http.R return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/README.md index cc8262de69e7..9429227f2a4b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedc ```go client := managedcluster.NewManagedClusterClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := managedcluster.ManagedCluster{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := managedcluster.NewManagedClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := managedcluster.NewManagedClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := managedcluster.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -94,6 +87,7 @@ for _, item := range items { ```go ctx := context.TODO() id := managedcluster.NewSubscriptionID() + // alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination items, err := client.ListBySubscriptionComplete(ctx, id) if err != nil { @@ -115,6 +109,7 @@ payload := managedcluster.ManagedClusterUpdateParameters{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_createorupdate_autorest.go index a58c7851f2cb..3bd629f36d5e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c ManagedClusterClient) senderForCreateOrUpdate(ctx context.Context, req * return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_delete_autorest.go index 6531daccaf64..68b471841649 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c ManagedClusterClient) senderForDelete(ctx context.Context, req *http.Req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/README.md index 393938bc7558..cae29ca93c8a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedc ```go client := nodetype.NewNodeTypeClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := nodetype.NodeType{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := nodetype.NewNodeTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "nodeTypeValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -68,11 +59,8 @@ payload := nodetype.NodeTypeActionParameters{ // ... } -future, err := client.DeleteNode(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteNodeThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -83,6 +71,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := nodetype.NewNodeTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "nodeTypeValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -98,6 +87,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := nodetype.NewManagedClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") + // alternatively `client.ListByManagedClusters(ctx, id)` can be used to do batched pagination items, err := client.ListByManagedClustersComplete(ctx, id) if err != nil { @@ -119,11 +109,8 @@ payload := nodetype.NodeTypeActionParameters{ // ... } -future, err := client.Reimage(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.ReimageThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -139,11 +126,8 @@ payload := nodetype.NodeTypeActionParameters{ // ... } -future, err := client.Restart(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.RestartThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -159,6 +143,7 @@ payload := nodetype.NodeTypeUpdateParameters{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_createorupdate_autorest.go index 8a71a50d5240..00fe962834a6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c NodeTypeClient) senderForCreateOrUpdate(ctx context.Context, req *http.R return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_delete_autorest.go index 38d544ab3d29..557f0a902b06 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c NodeTypeClient) senderForDelete(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_deletenode_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_deletenode_autorest.go index c212fe4100ce..b49d2f9e6d79 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_deletenode_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_deletenode_autorest.go @@ -74,6 +74,6 @@ func (c NodeTypeClient) senderForDeleteNode(ctx context.Context, req *http.Reque return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_reimage_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_reimage_autorest.go index 243e5a1bc694..63939de7f6b8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_reimage_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_reimage_autorest.go @@ -74,6 +74,6 @@ func (c NodeTypeClient) senderForReimage(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_restart_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_restart_autorest.go index f726c07d5df8..1eb428135ea5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_restart_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_restart_autorest.go @@ -74,6 +74,6 @@ func (c NodeTypeClient) senderForRestart(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/README.md index e38522b804af..4c07ce54af9c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/202 ```go client := sqlvirtualmachines.NewSqlVirtualMachinesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := sqlvirtualmachines.SqlVirtualMachine{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := sqlvirtualmachines.NewSqlVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sqlVirtualMachineValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := sqlvirtualmachines.NewSqlVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sqlVirtualMachineValue") + read, err := client.Get(ctx, id, sqlvirtualmachines.DefaultGetOperationOptions()) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := sqlvirtualmachines.NewSubscriptionID() + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -94,6 +87,7 @@ for _, item := range items { ```go ctx := context.TODO() id := sqlvirtualmachines.NewResourceGroupID() + // alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination items, err := client.ListByResourceGroupComplete(ctx, id) if err != nil { @@ -110,6 +104,7 @@ for _, item := range items { ```go ctx := context.TODO() id := sqlvirtualmachines.NewSqlVirtualMachineGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sqlVirtualMachineGroupValue") + // alternatively `client.ListBySqlVmGroup(ctx, id)` can be used to do batched pagination items, err := client.ListBySqlVmGroupComplete(ctx, id) if err != nil { @@ -126,11 +121,8 @@ for _, item := range items { ```go ctx := context.TODO() id := sqlvirtualmachines.NewSqlVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sqlVirtualMachineValue") -future, err := client.Redeploy(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.RedeployThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -141,11 +133,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := sqlvirtualmachines.NewSqlVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sqlVirtualMachineValue") -future, err := client.StartAssessment(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.StartAssessmentThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -161,11 +150,8 @@ payload := sqlvirtualmachines.SqlVirtualMachineUpdate{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_createorupdate_autorest.go index 6496a931d5ab..4a2718a8cce1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c SqlVirtualMachinesClient) senderForCreateOrUpdate(ctx context.Context, r return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_delete_autorest.go index 93702a1846f4..2d92155074cb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c SqlVirtualMachinesClient) senderForDelete(ctx context.Context, req *http return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_redeploy_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_redeploy_autorest.go index da52ca9b03d7..742e4a8c9598 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_redeploy_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_redeploy_autorest.go @@ -73,6 +73,6 @@ func (c SqlVirtualMachinesClient) senderForRedeploy(ctx context.Context, req *ht return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_startassessment_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_startassessment_autorest.go index ba9c8114633b..aa095cd8f6b1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_startassessment_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_startassessment_autorest.go @@ -73,6 +73,6 @@ func (c SqlVirtualMachinesClient) senderForStartAssessment(ctx context.Context, return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_update_autorest.go index e372692caf4f..4bac54bbc3b7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_update_autorest.go @@ -74,6 +74,6 @@ func (c SqlVirtualMachinesClient) senderForUpdate(ctx context.Context, req *http return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/README.md index ba6221e87d6b..c6a336922f82 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-0 ```go client := endpoints.NewEndpointsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := endpoints.Endpoint{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := endpoints.NewEndpointTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "AzureEndpoints", "endpointValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := endpoints.NewEndpointTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "AzureEndpoints", "endpointValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -83,6 +83,7 @@ payload := endpoints.Endpoint{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md index 9a0e63dd0fb1..b222e2e2618a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-0 ```go client := geographichierarchies.NewGeographicHierarchiesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -28,6 +25,7 @@ if err != nil { ```go ctx := context.TODO() + read, err := client.GetDefault(ctx) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/README.md index 471fae2d1bb2..70f13c597afc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-0 ```go client := profiles.NewProfilesClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -32,6 +29,7 @@ payload := profiles.CheckTrafficManagerRelativeDnsNameAvailabilityParameters{ // ... } + read, err := client.CheckTrafficManagerRelativeDnsNameAvailability(ctx, payload) if err != nil { // handle the error @@ -52,6 +50,7 @@ payload := profiles.Profile{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -67,6 +66,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := profiles.NewTrafficManagerProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -82,6 +82,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := profiles.NewTrafficManagerProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -97,6 +98,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := profiles.NewResourceGroupID() + read, err := client.ListByResourceGroup(ctx, id) if err != nil { // handle the error @@ -112,6 +114,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := profiles.NewSubscriptionID() + read, err := client.ListBySubscription(ctx, id) if err != nil { // handle the error @@ -132,6 +135,7 @@ payload := profiles.Profile{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/README.md index 8c58b318f1ac..24693cdadeb0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05 ```go client := videoanalyzer.NewVideoAnalyzerClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := videoanalyzer.AccessPolicyEntity{ // ... } + read, err := client.AccessPoliciesCreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -48,6 +46,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewAccessPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "accessPolicyValue") + read, err := client.AccessPoliciesDelete(ctx, id) if err != nil { // handle the error @@ -63,6 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewAccessPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "accessPolicyValue") + read, err := client.AccessPoliciesGet(ctx, id) if err != nil { // handle the error @@ -78,6 +78,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + // alternatively `client.AccessPoliciesList(ctx, id, videoanalyzer.DefaultAccessPoliciesListOperationOptions())` can be used to do batched pagination items, err := client.AccessPoliciesListComplete(ctx, id, videoanalyzer.DefaultAccessPoliciesListOperationOptions()) if err != nil { @@ -99,6 +100,7 @@ payload := videoanalyzer.AccessPolicyEntity{ // ... } + read, err := client.AccessPoliciesUpdate(ctx, id, payload) if err != nil { // handle the error @@ -119,6 +121,7 @@ payload := videoanalyzer.EdgeModuleEntity{ // ... } + read, err := client.EdgeModulesCreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -134,6 +137,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewEdgeModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "edgeModuleValue") + read, err := client.EdgeModulesDelete(ctx, id) if err != nil { // handle the error @@ -149,6 +153,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewEdgeModuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "edgeModuleValue") + read, err := client.EdgeModulesGet(ctx, id) if err != nil { // handle the error @@ -164,6 +169,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + // alternatively `client.EdgeModulesList(ctx, id, videoanalyzer.DefaultEdgeModulesListOperationOptions())` can be used to do batched pagination items, err := client.EdgeModulesListComplete(ctx, id, videoanalyzer.DefaultEdgeModulesListOperationOptions()) if err != nil { @@ -185,6 +191,7 @@ payload := videoanalyzer.ListProvisioningTokenInput{ // ... } + read, err := client.EdgeModulesListProvisioningToken(ctx, id, payload) if err != nil { // handle the error @@ -205,6 +212,7 @@ payload := videoanalyzer.CheckNameAvailabilityRequest{ // ... } + read, err := client.LocationsCheckNameAvailability(ctx, id, payload) if err != nil { // handle the error @@ -225,6 +233,7 @@ payload := videoanalyzer.VideoAnalyzer{ // ... } + read, err := client.VideoAnalyzersCreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -240,6 +249,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.VideoAnalyzersDelete(ctx, id) if err != nil { // handle the error @@ -255,6 +265,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + read, err := client.VideoAnalyzersGet(ctx, id) if err != nil { // handle the error @@ -270,6 +281,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewResourceGroupID() + read, err := client.VideoAnalyzersList(ctx, id) if err != nil { // handle the error @@ -285,6 +297,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewSubscriptionID() + read, err := client.VideoAnalyzersListBySubscription(ctx, id) if err != nil { // handle the error @@ -305,6 +318,7 @@ payload := videoanalyzer.SyncStorageKeysInput{ // ... } + read, err := client.VideoAnalyzersSyncStorageKeys(ctx, id, payload) if err != nil { // handle the error @@ -325,6 +339,7 @@ payload := videoanalyzer.VideoAnalyzerUpdate{ // ... } + read, err := client.VideoAnalyzersUpdate(ctx, id, payload) if err != nil { // handle the error @@ -345,6 +360,7 @@ payload := videoanalyzer.VideoEntity{ // ... } + read, err := client.VideosCreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -360,6 +376,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewVideoID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "videoValue") + read, err := client.VideosDelete(ctx, id) if err != nil { // handle the error @@ -375,6 +392,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewVideoID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "videoValue") + read, err := client.VideosGet(ctx, id) if err != nil { // handle the error @@ -390,6 +408,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := videoanalyzer.NewVideoAnalyzerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + // alternatively `client.VideosList(ctx, id, videoanalyzer.DefaultVideosListOperationOptions())` can be used to do batched pagination items, err := client.VideosListComplete(ctx, id, videoanalyzer.DefaultVideosListOperationOptions()) if err != nil { @@ -406,6 +425,7 @@ for _, item := range items { ```go ctx := context.TODO() id := videoanalyzer.NewVideoID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "videoValue") + read, err := client.VideosListStreamingToken(ctx, id) if err != nil { // handle the error @@ -426,6 +446,7 @@ payload := videoanalyzer.VideoEntity{ // ... } + read, err := client.VideosUpdate(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/README.md index 61641a23df9c..d434ad485f4a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/aut ```go client := authorizations.NewAuthorizationsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := authorizations.ExpressRouteAuthorization{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := authorizations.NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "authorizationValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := authorizations.NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "authorizationValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := authorizations.NewPrivateCloudID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue") + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_createorupdate_autorest.go index 43babd4b2339..ad84c9aae974 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c AuthorizationsClient) senderForCreateOrUpdate(ctx context.Context, req * return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_delete_autorest.go index 1f3aa7d010a8..05d083a72021 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c AuthorizationsClient) senderForDelete(ctx context.Context, req *http.Req return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/README.md index 75422e81f3aa..931cc65014cc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clu ```go client := clusters.NewClustersClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := clusters.Cluster{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "clusterValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "clusterValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := clusters.NewPrivateCloudID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue") + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -99,11 +92,8 @@ payload := clusters.ClusterUpdate{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_createorupdate_autorest.go index 256915c3dafc..1e25becc0a42 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c ClustersClient) senderForCreateOrUpdate(ctx context.Context, req *http.R return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_delete_autorest.go index 48e1f9346770..285ecf817e5b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c ClustersClient) senderForDelete(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_update_autorest.go index c95bdd45bee5..e710aa964e7e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_update_autorest.go @@ -74,6 +74,6 @@ func (c ClustersClient) senderForUpdate(ctx context.Context, req *http.Request) return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/README.md index e8ecba1c9790..05daa29eb895 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/pri ```go client := privateclouds.NewPrivateCloudsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,11 +30,8 @@ payload := privateclouds.PrivateCloud{ // ... } -future, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` @@ -48,11 +42,8 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := privateclouds.NewPrivateCloudID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue") -future, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error } ``` @@ -63,6 +54,7 @@ if err := future.Poller.PollUntilDone(); err != nil { ```go ctx := context.TODO() id := privateclouds.NewPrivateCloudID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -78,6 +70,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := privateclouds.NewResourceGroupID() + // alternatively `client.List(ctx, id)` can be used to do batched pagination items, err := client.ListComplete(ctx, id) if err != nil { @@ -94,6 +87,7 @@ for _, item := range items { ```go ctx := context.TODO() id := privateclouds.NewPrivateCloudID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue") + read, err := client.ListAdminCredentials(ctx, id) if err != nil { // handle the error @@ -109,6 +103,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := privateclouds.NewSubscriptionID() + // alternatively `client.ListInSubscription(ctx, id)` can be used to do batched pagination items, err := client.ListInSubscriptionComplete(ctx, id) if err != nil { @@ -130,11 +125,8 @@ payload := privateclouds.PrivateCloudUpdate{ // ... } -future, err := client.Update(ctx, id, payload) -if err != nil { - // handle the error -} -if err := future.Poller.PollUntilDone(); err != nil { + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_createorupdate_autorest.go index 90e6d0b5ba58..554983a1f61b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_createorupdate_autorest.go @@ -74,6 +74,6 @@ func (c PrivateCloudsClient) senderForCreateOrUpdate(ctx context.Context, req *h return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_delete_autorest.go index 3c382b386b35..4670d9079340 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_delete_autorest.go @@ -73,6 +73,6 @@ func (c PrivateCloudsClient) senderForDelete(ctx context.Context, req *http.Requ return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_update_autorest.go index a24060a96026..c96a6eaacd63 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_update_autorest.go @@ -74,6 +74,6 @@ func (c PrivateCloudsClient) senderForUpdate(ctx context.Context, req *http.Requ return } - future.Poller, err = polling.NewLongRunningPollerFromResponse(ctx, resp, c.Client) + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/README.md index bc70fb7c8e0e..47fcdac41de6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connec ```go client := connections.NewConnectionsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -33,6 +30,7 @@ payload := connections.ConfirmConsentCodeDefinition{ // ... } + read, err := client.ConfirmConsentCode(ctx, id, payload) if err != nil { // handle the error @@ -53,6 +51,7 @@ payload := connections.ApiConnectionDefinition{ // ... } + read, err := client.CreateOrUpdate(ctx, id, payload) if err != nil { // handle the error @@ -68,6 +67,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := connections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") + read, err := client.Delete(ctx, id) if err != nil { // handle the error @@ -83,6 +83,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := connections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") + read, err := client.Get(ctx, id) if err != nil { // handle the error @@ -98,6 +99,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := connections.NewResourceGroupID() + read, err := client.List(ctx, id, connections.DefaultListOperationOptions()) if err != nil { // handle the error @@ -118,6 +120,7 @@ payload := connections.ListConsentLinksDefinition{ // ... } + read, err := client.ListConsentLinks(ctx, id, payload) if err != nil { // handle the error @@ -138,6 +141,7 @@ payload := connections.ApiConnectionDefinition{ // ... } + read, err := client.Update(ctx, id, payload) if err != nil { // handle the error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/README.md index c623a3286ffb..4f0b184c7b79 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/README.md @@ -17,9 +17,6 @@ import "github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/manage ```go client := managedapis.NewManagedAPIsClientWithBaseURI("https://management.azure.com") client.Client.Authorizer = authorizer -if err != nil { - // handle the error -} ``` @@ -28,6 +25,7 @@ if err != nil { ```go ctx := context.TODO() id := managedapis.NewManagedApiID("12345678-1234-9876-4563-123456789012", "locationValue", "apiValue") + read, err := client.ManagedApisGet(ctx, id) if err != nil { // handle the error @@ -43,6 +41,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() id := managedapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + read, err := client.ManagedApisList(ctx, id) if err != nil { // handle the error diff --git a/vendor/modules.txt b/vendor/modules.txt index 5ac74fc91d8b..bbb9b2c0d82d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -187,7 +187,7 @@ github.com/google/uuid # github.com/hashicorp/errwrap v1.1.0 ## explicit github.com/hashicorp/errwrap -# github.com/hashicorp/go-azure-helpers v0.34.0 +# github.com/hashicorp/go-azure-helpers v0.35.0 ## explicit; go 1.17 github.com/hashicorp/go-azure-helpers/authentication github.com/hashicorp/go-azure-helpers/lang/dates @@ -207,7 +207,7 @@ github.com/hashicorp/go-azure-helpers/resourcemanager/zones github.com/hashicorp/go-azure-helpers/resourceproviders github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage -# github.com/hashicorp/go-azure-sdk v0.20220628.1190740 +# github.com/hashicorp/go-azure-sdk v0.20220701.1073833 ## explicit; go 1.18 github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers From e610b17a10cc944e6f43703b5b47ead76c83e24d Mon Sep 17 00:00:00 2001 From: tombuildsstuff <git@tom.ibuildstuff.eu> Date: Fri, 1 Jul 2022 09:49:41 +0100 Subject: [PATCH 2/3] storage: refactoring `storageobjectreplication` to use `go-azure-sdk` --- internal/services/storage/client/client.go | 6 +++--- internal/services/storage/parse/object_replication.go | 2 +- internal/services/storage/parse/object_replication_test.go | 2 +- .../services/storage/storage_object_replication_resource.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/services/storage/client/client.go b/internal/services/storage/client/client.go index ee85dccb1711..ce8fd84d421b 100644 --- a/internal/services/storage/client/client.go +++ b/internal/services/storage/client/client.go @@ -7,9 +7,9 @@ import ( "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" "github.com/Azure/azure-sdk-for-go/services/storagesync/mgmt/2020-03-01/storagesync" "github.com/Azure/go-autorest/autorest" - az "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies" "github.com/hashicorp/terraform-provider-azurerm/internal/common" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/shim" "github.com/tombuildsstuff/giovanni/storage/2019-12-12/blob/accounts" "github.com/tombuildsstuff/giovanni/storage/2019-12-12/blob/blobs" @@ -33,7 +33,7 @@ type Client struct { BlobInventoryPoliciesClient *storage.BlobInventoryPoliciesClient CloudEndpointsClient *storagesync.CloudEndpointsClient EncryptionScopesClient *storage.EncryptionScopesClient - Environment az.Environment + Environment azure.Environment FileServicesClient *storage.FileServicesClient ObjectReplicationClient *objectreplicationpolicies.ObjectReplicationPoliciesClient SyncServiceClient *storagesync.ServicesClient diff --git a/internal/services/storage/parse/object_replication.go b/internal/services/storage/parse/object_replication.go index ed8712c5babe..fb30b5c638c3 100644 --- a/internal/services/storage/parse/object_replication.go +++ b/internal/services/storage/parse/object_replication.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies" ) // This is manual for concat two ids are not supported in auto-generation diff --git a/internal/services/storage/parse/object_replication_test.go b/internal/services/storage/parse/object_replication_test.go index 7ffaeb52d907..977fe33563be 100644 --- a/internal/services/storage/parse/object_replication_test.go +++ b/internal/services/storage/parse/object_replication_test.go @@ -5,8 +5,8 @@ package parse import ( "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies" "github.com/hashicorp/terraform-provider-azurerm/internal/resourceid" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies" ) var _ resourceid.Formatter = ObjectReplicationId{} diff --git a/internal/services/storage/storage_object_replication_resource.go b/internal/services/storage/storage_object_replication_resource.go index fb4a766eda93..f1aafae26bcd 100644 --- a/internal/services/storage/storage_object_replication_resource.go +++ b/internal/services/storage/storage_object_replication_resource.go @@ -6,10 +6,10 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" From 01fb21d98d6df1b207aed7199b74b0e9222ea7db Mon Sep 17 00:00:00 2001 From: tombuildsstuff <git@tom.ibuildstuff.eu> Date: Fri, 1 Jul 2022 09:51:25 +0100 Subject: [PATCH 3/3] storage: dependencies --- .../id_objectreplicationpolicies_test.go | 324 ------------------ .../id_storageaccount_test.go | 279 --------------- .../model_objectreplicationpolicies.go | 5 - .../objectreplicationpolicies/version.go | 9 - .../objectreplicationpolicies/README.md | 89 +++++ .../objectreplicationpolicies/client.go | 3 + .../id_objectreplicationpolicies.go | 0 .../id_storageaccount.go | 0 .../method_createorupdate_autorest.go | 9 +- .../method_delete_autorest.go | 9 +- .../method_get_autorest.go | 9 +- .../method_list_autorest.go | 9 +- .../model_objectreplicationpolicies.go | 8 + .../model_objectreplicationpolicy.go | 3 + .../model_objectreplicationpolicyfilter.go | 3 + ...model_objectreplicationpolicyproperties.go | 7 +- .../model_objectreplicationpolicyrule.go | 3 + .../objectreplicationpolicies/version.go | 12 + vendor/modules.txt | 1 + 19 files changed, 151 insertions(+), 631 deletions(-) delete mode 100644 internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_objectreplicationpolicies_test.go delete mode 100644 internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_storageaccount_test.go delete mode 100644 internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicies.go delete mode 100644 internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/README.md rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/client.go (71%) rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/id_objectreplicationpolicies.go (100%) rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/id_storageaccount.go (100%) rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/method_createorupdate_autorest.go (86%) rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/method_delete_autorest.go (85%) rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/method_get_autorest.go (85%) rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/method_list_autorest.go (86%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicies.go rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicy.go (69%) rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyfilter.go (56%) rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyproperties.go (69%) rename {internal/services/storage/sdk => vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage}/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyrule.go (71%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/version.go diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_objectreplicationpolicies_test.go b/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_objectreplicationpolicies_test.go deleted file mode 100644 index 14f18cc60b1a..000000000000 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_objectreplicationpolicies_test.go +++ /dev/null @@ -1,324 +0,0 @@ -package objectreplicationpolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = ObjectReplicationPoliciesId{} - -func TestNewObjectReplicationPoliciesID(t *testing.T) { - id := NewObjectReplicationPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "objectReplicationPolicyIdValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.AccountName != "accountValue" { - t.Fatalf("Expected %q but got %q for Segment 'AccountName'", id.AccountName, "accountValue") - } - - if id.ObjectReplicationPolicyId != "objectReplicationPolicyIdValue" { - t.Fatalf("Expected %q but got %q for Segment 'ObjectReplicationPolicyId'", id.ObjectReplicationPolicyId, "objectReplicationPolicyIdValue") - } -} - -func TestFormatObjectReplicationPoliciesID(t *testing.T) { - actual := NewObjectReplicationPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "objectReplicationPolicyIdValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue/objectReplicationPolicies/objectReplicationPolicyIdValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseObjectReplicationPoliciesID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ObjectReplicationPoliciesId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue/objectReplicationPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue/objectReplicationPolicies/objectReplicationPolicyIdValue", - Expected: &ObjectReplicationPoliciesId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - AccountName: "accountValue", - ObjectReplicationPolicyId: "objectReplicationPolicyIdValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue/objectReplicationPolicies/objectReplicationPolicyIdValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseObjectReplicationPoliciesID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.AccountName != v.Expected.AccountName { - t.Fatalf("Expected %q but got %q for AccountName", v.Expected.AccountName, actual.AccountName) - } - - if actual.ObjectReplicationPolicyId != v.Expected.ObjectReplicationPolicyId { - t.Fatalf("Expected %q but got %q for ObjectReplicationPolicyId", v.Expected.ObjectReplicationPolicyId, actual.ObjectReplicationPolicyId) - } - - } -} - -func TestParseObjectReplicationPoliciesIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ObjectReplicationPoliciesId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe/sToRaGeAcCoUnTs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe/sToRaGeAcCoUnTs/aCcOuNtVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue/objectReplicationPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe/sToRaGeAcCoUnTs/aCcOuNtVaLuE/oBjEcTrEpLiCaTiOnPoLiCiEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue/objectReplicationPolicies/objectReplicationPolicyIdValue", - Expected: &ObjectReplicationPoliciesId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - AccountName: "accountValue", - ObjectReplicationPolicyId: "objectReplicationPolicyIdValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue/objectReplicationPolicies/objectReplicationPolicyIdValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe/sToRaGeAcCoUnTs/aCcOuNtVaLuE/oBjEcTrEpLiCaTiOnPoLiCiEs/oBjEcTrEpLiCaTiOnPoLiCyIdVaLuE", - Expected: &ObjectReplicationPoliciesId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - AccountName: "aCcOuNtVaLuE", - ObjectReplicationPolicyId: "oBjEcTrEpLiCaTiOnPoLiCyIdVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe/sToRaGeAcCoUnTs/aCcOuNtVaLuE/oBjEcTrEpLiCaTiOnPoLiCiEs/oBjEcTrEpLiCaTiOnPoLiCyIdVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseObjectReplicationPoliciesIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.AccountName != v.Expected.AccountName { - t.Fatalf("Expected %q but got %q for AccountName", v.Expected.AccountName, actual.AccountName) - } - - if actual.ObjectReplicationPolicyId != v.Expected.ObjectReplicationPolicyId { - t.Fatalf("Expected %q but got %q for ObjectReplicationPolicyId", v.Expected.ObjectReplicationPolicyId, actual.ObjectReplicationPolicyId) - } - - } -} - -func TestSegmentsForObjectReplicationPoliciesId(t *testing.T) { - segments := ObjectReplicationPoliciesId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ObjectReplicationPoliciesId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_storageaccount_test.go b/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_storageaccount_test.go deleted file mode 100644 index bcb9db126b92..000000000000 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_storageaccount_test.go +++ /dev/null @@ -1,279 +0,0 @@ -package objectreplicationpolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = StorageAccountId{} - -func TestNewStorageAccountID(t *testing.T) { - id := NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.AccountName != "accountValue" { - t.Fatalf("Expected %q but got %q for Segment 'AccountName'", id.AccountName, "accountValue") - } -} - -func TestFormatStorageAccountID(t *testing.T) { - actual := NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseStorageAccountID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *StorageAccountId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue", - Expected: &StorageAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - AccountName: "accountValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseStorageAccountID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.AccountName != v.Expected.AccountName { - t.Fatalf("Expected %q but got %q for AccountName", v.Expected.AccountName, actual.AccountName) - } - - } -} - -func TestParseStorageAccountIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *StorageAccountId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe/sToRaGeAcCoUnTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue", - Expected: &StorageAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - AccountName: "accountValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/accountValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe/sToRaGeAcCoUnTs/aCcOuNtVaLuE", - Expected: &StorageAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - AccountName: "aCcOuNtVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.sToRaGe/sToRaGeAcCoUnTs/aCcOuNtVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseStorageAccountIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.AccountName != v.Expected.AccountName { - t.Fatalf("Expected %q but got %q for AccountName", v.Expected.AccountName, actual.AccountName) - } - - } -} - -func TestSegmentsForStorageAccountId(t *testing.T) { - segments := StorageAccountId{}.Segments() - if len(segments) == 0 { - t.Fatalf("StorageAccountId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicies.go b/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicies.go deleted file mode 100644 index ad542be3f10e..000000000000 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicies.go +++ /dev/null @@ -1,5 +0,0 @@ -package objectreplicationpolicies - -type ObjectReplicationPolicies struct { - Value *[]ObjectReplicationPolicy `json:"value,omitempty"` -} diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/version.go b/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/version.go deleted file mode 100644 index 235731984611..000000000000 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/version.go +++ /dev/null @@ -1,9 +0,0 @@ -package objectreplicationpolicies - -import "fmt" - -const defaultApiVersion = "2021-04-01" - -func userAgent() string { - return fmt.Sprintf("pandora/objectreplicationpolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/README.md new file mode 100644 index 000000000000..f317f67ddbb6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/README.md @@ -0,0 +1,89 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies` Documentation + +The `objectreplicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2021-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies" +``` + + +### Client Initialization + +```go +client := objectreplicationpolicies.NewObjectReplicationPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ObjectReplicationPoliciesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := objectreplicationpolicies.NewObjectReplicationPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "objectReplicationPolicyIdValue") + +payload := objectreplicationpolicies.ObjectReplicationPolicy{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ObjectReplicationPoliciesClient.Delete` + +```go +ctx := context.TODO() +id := objectreplicationpolicies.NewObjectReplicationPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "objectReplicationPolicyIdValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ObjectReplicationPoliciesClient.Get` + +```go +ctx := context.TODO() +id := objectreplicationpolicies.NewObjectReplicationPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "objectReplicationPolicyIdValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ObjectReplicationPoliciesClient.List` + +```go +ctx := context.TODO() +id := objectreplicationpolicies.NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue") + +read, err := client.List(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/client.go similarity index 71% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/client.go index d2194ef313a3..d85f5f511abe 100644 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/client.go @@ -2,6 +2,9 @@ package objectreplicationpolicies import "github.com/Azure/go-autorest/autorest" +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + type ObjectReplicationPoliciesClient struct { Client autorest.Client baseUri string diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_objectreplicationpolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/id_objectreplicationpolicies.go similarity index 100% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_objectreplicationpolicies.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/id_objectreplicationpolicies.go diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_storageaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/id_storageaccount.go similarity index 100% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/id_storageaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/id_storageaccount.go diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_createorupdate_autorest.go similarity index 86% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_createorupdate_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_createorupdate_autorest.go index 39c9230fb3d2..9a8e42cf4c0e 100644 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_createorupdate_autorest.go @@ -8,13 +8,16 @@ import ( "github.com/Azure/go-autorest/autorest/azure" ) -type CreateOrUpdateResponse struct { +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response Model *ObjectReplicationPolicy } // CreateOrUpdate ... -func (c ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, id ObjectReplicationPoliciesId, input ObjectReplicationPolicy) (result CreateOrUpdateResponse, err error) { +func (c ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, id ObjectReplicationPoliciesId, input ObjectReplicationPolicy) (result CreateOrUpdateOperationResponse, err error) { req, err := c.preparerForCreateOrUpdate(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "objectreplicationpolicies.ObjectReplicationPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -54,7 +57,7 @@ func (c ObjectReplicationPoliciesClient) preparerForCreateOrUpdate(ctx context.C // responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (c ObjectReplicationPoliciesClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateResponse, err error) { +func (c ObjectReplicationPoliciesClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_delete_autorest.go similarity index 85% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_delete_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_delete_autorest.go index a6a01d025c6d..a18ae53ca84a 100644 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_delete_autorest.go @@ -8,12 +8,15 @@ import ( "github.com/Azure/go-autorest/autorest/azure" ) -type DeleteResponse struct { +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { HttpResponse *http.Response } // Delete ... -func (c ObjectReplicationPoliciesClient) Delete(ctx context.Context, id ObjectReplicationPoliciesId) (result DeleteResponse, err error) { +func (c ObjectReplicationPoliciesClient) Delete(ctx context.Context, id ObjectReplicationPoliciesId) (result DeleteOperationResponse, err error) { req, err := c.preparerForDelete(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "objectreplicationpolicies.ObjectReplicationPoliciesClient", "Delete", nil, "Failure preparing request") @@ -52,7 +55,7 @@ func (c ObjectReplicationPoliciesClient) preparerForDelete(ctx context.Context, // responderForDelete handles the response to the Delete request. The method always // closes the http.Response Body. -func (c ObjectReplicationPoliciesClient) responderForDelete(resp *http.Response) (result DeleteResponse, err error) { +func (c ObjectReplicationPoliciesClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_get_autorest.go similarity index 85% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_get_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_get_autorest.go index 34d0ce511792..96f8e2deb381 100644 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_get_autorest.go @@ -8,13 +8,16 @@ import ( "github.com/Azure/go-autorest/autorest/azure" ) -type GetResponse struct { +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { HttpResponse *http.Response Model *ObjectReplicationPolicy } // Get ... -func (c ObjectReplicationPoliciesClient) Get(ctx context.Context, id ObjectReplicationPoliciesId) (result GetResponse, err error) { +func (c ObjectReplicationPoliciesClient) Get(ctx context.Context, id ObjectReplicationPoliciesId) (result GetOperationResponse, err error) { req, err := c.preparerForGet(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "objectreplicationpolicies.ObjectReplicationPoliciesClient", "Get", nil, "Failure preparing request") @@ -53,7 +56,7 @@ func (c ObjectReplicationPoliciesClient) preparerForGet(ctx context.Context, id // responderForGet handles the response to the Get request. The method always // closes the http.Response Body. -func (c ObjectReplicationPoliciesClient) responderForGet(resp *http.Response) (result GetResponse, err error) { +func (c ObjectReplicationPoliciesClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_list_autorest.go similarity index 86% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_list_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_list_autorest.go index 2250eb930ecd..2da7f3f44e1f 100644 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/method_list_autorest.go @@ -9,13 +9,16 @@ import ( "github.com/Azure/go-autorest/autorest/azure" ) -type ListResponse struct { +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { HttpResponse *http.Response Model *ObjectReplicationPolicies } // List ... -func (c ObjectReplicationPoliciesClient) List(ctx context.Context, id StorageAccountId) (result ListResponse, err error) { +func (c ObjectReplicationPoliciesClient) List(ctx context.Context, id StorageAccountId) (result ListOperationResponse, err error) { req, err := c.preparerForList(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "objectreplicationpolicies.ObjectReplicationPoliciesClient", "List", nil, "Failure preparing request") @@ -54,7 +57,7 @@ func (c ObjectReplicationPoliciesClient) preparerForList(ctx context.Context, id // responderForList handles the response to the List request. The method always // closes the http.Response Body. -func (c ObjectReplicationPoliciesClient) responderForList(resp *http.Response) (result ListResponse, err error) { +func (c ObjectReplicationPoliciesClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicies.go new file mode 100644 index 000000000000..e9617fd29cdd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicies.go @@ -0,0 +1,8 @@ +package objectreplicationpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ObjectReplicationPolicies struct { + Value *[]ObjectReplicationPolicy `json:"value,omitempty"` +} diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicy.go similarity index 69% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicy.go index 80f0aa97cb58..5d8e7ab7bc42 100644 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicy.go @@ -1,5 +1,8 @@ package objectreplicationpolicies +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + type ObjectReplicationPolicy struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyfilter.go similarity index 56% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyfilter.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyfilter.go index c974517a64b9..e324d04d5a49 100644 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyfilter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyfilter.go @@ -1,5 +1,8 @@ package objectreplicationpolicies +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + type ObjectReplicationPolicyFilter struct { MinCreationTime *string `json:"minCreationTime,omitempty"` PrefixMatch *[]string `json:"prefixMatch,omitempty"` diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyproperties.go similarity index 69% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyproperties.go index ca1698d5790b..1bc675c903f5 100644 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyproperties.go @@ -6,6 +6,9 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/dates" ) +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + type ObjectReplicationPolicyProperties struct { DestinationAccount string `json:"destinationAccount"` EnabledTime *string `json:"enabledTime,omitempty"` @@ -14,14 +17,14 @@ type ObjectReplicationPolicyProperties struct { SourceAccount string `json:"sourceAccount"` } -func (o ObjectReplicationPolicyProperties) GetEnabledTimeAsTime() (*time.Time, error) { +func (o *ObjectReplicationPolicyProperties) GetEnabledTimeAsTime() (*time.Time, error) { if o.EnabledTime == nil { return nil, nil } return dates.ParseAsFormat(o.EnabledTime, "2006-01-02T15:04:05Z07:00") } -func (o ObjectReplicationPolicyProperties) SetEnabledTimeAsTime(input time.Time) { +func (o *ObjectReplicationPolicyProperties) SetEnabledTimeAsTime(input time.Time) { formatted := input.Format("2006-01-02T15:04:05Z07:00") o.EnabledTime = &formatted } diff --git a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyrule.go similarity index 71% rename from internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyrule.go index 52bbac57dd4d..8bbb947ff397 100644 --- a/internal/services/storage/sdk/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/model_objectreplicationpolicyrule.go @@ -1,5 +1,8 @@ package objectreplicationpolicies +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + type ObjectReplicationPolicyRule struct { DestinationContainer string `json:"destinationContainer"` Filters *ObjectReplicationPolicyFilter `json:"filters,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/version.go new file mode 100644 index 000000000000..fec2341a232f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies/version.go @@ -0,0 +1,12 @@ +package objectreplicationpolicies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2021-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/objectreplicationpolicies/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index bbb9b2c0d82d..66dc1f6456d6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -251,6 +251,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines +github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles