From f59c07edbc942f6f0cdfcbdf94c75d95b578645b Mon Sep 17 00:00:00 2001 From: magodo Date: Wed, 6 Jul 2022 13:11:22 +0800 Subject: [PATCH 001/100] Update storage api to 2021-09-01 --- internal/services/storage/client/client.go | 2 +- internal/services/storage/client/helpers.go | 2 +- ...e_account_customer_managed_key_resource.go | 2 +- ...ount_customer_managed_key_resource_test.go | 2 +- .../storage/storage_account_data_source.go | 2 +- .../storage_account_network_rules_resource.go | 2 +- .../storage/storage_account_resource.go | 2 +- .../storage_blob_inventory_policy_resource.go | 2 +- .../storage_encryption_scope_resource.go | 2 +- .../storage_encryption_scope_resource_test.go | 2 +- .../storage_management_policy_resource.go | 2 +- .../storage/CHANGELOG.md | 0 .../storage/_meta.json | 6 +- .../storage/accounts.go | 226 ++++++- .../storage/blobcontainers.go | 28 +- .../storage/blobinventorypolicies.go | 8 +- .../storage/blobservices.go | 6 +- .../storage/client.go | 2 +- .../storage/deletedaccounts.go | 4 +- .../storage/encryptionscopes.go | 8 +- .../storage/enums.go | 102 ++- .../storage/fileservices.go | 6 +- .../storage/fileshares.go | 14 +- .../mgmt/2021-09-01/storage/localusers.go | 610 ++++++++++++++++++ .../storage/managementpolicies.go | 6 +- .../storage/models.go | 512 ++++++++++++++- .../storage/objectreplicationpolicies.go | 23 +- .../storage/operations.go | 2 +- .../storage/privateendpointconnections.go | 8 +- .../storage/privatelinkresources.go | 2 +- .../storage/queue.go | 10 +- .../storage/queueservices.go | 6 +- .../storage/skus.go | 2 +- .../storage/table.go | 34 +- .../storage/tableservices.go | 6 +- .../storage/usages.go | 2 +- .../storage/version.go | 2 +- vendor/modules.txt | 2 +- 38 files changed, 1526 insertions(+), 133 deletions(-) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/CHANGELOG.md (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/_meta.json (80%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/accounts.go (85%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/blobcontainers.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/blobinventorypolicies.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/blobservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/client.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/deletedaccounts.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/encryptionscopes.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/enums.go (89%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/fileservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/fileshares.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/localusers.go rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/managementpolicies.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/models.go (86%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/objectreplicationpolicies.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/operations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/privateendpointconnections.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/privatelinkresources.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/queue.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/queueservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/skus.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/table.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/tableservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/usages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2021-04-01 => 2021-09-01}/storage/version.go (90%) diff --git a/internal/services/storage/client/client.go b/internal/services/storage/client/client.go index ee85dccb1711..7165b4c0be27 100644 --- a/internal/services/storage/client/client.go +++ b/internal/services/storage/client/client.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-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" diff --git a/internal/services/storage/client/helpers.go b/internal/services/storage/client/helpers.go index 450830ff7495..b5e71616a125 100644 --- a/internal/services/storage/client/helpers.go +++ b/internal/services/storage/client/helpers.go @@ -6,7 +6,7 @@ import ( "log" "sync" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse" ) diff --git a/internal/services/storage/storage_account_customer_managed_key_resource.go b/internal/services/storage/storage_account_customer_managed_key_resource.go index e35e8ca86dc3..62463023a3e1 100644 --- a/internal/services/storage/storage_account_customer_managed_key_resource.go +++ b/internal/services/storage/storage_account_customer_managed_key_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/storage/storage_account_customer_managed_key_resource_test.go b/internal/services/storage/storage_account_customer_managed_key_resource_test.go index a1b6eb23c7b8..3d81e9ee8dfc 100644 --- a/internal/services/storage/storage_account_customer_managed_key_resource_test.go +++ b/internal/services/storage/storage_account_customer_managed_key_resource_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/storage/storage_account_data_source.go b/internal/services/storage/storage_account_data_source.go index a0f73d2badcd..24862089d8fc 100644 --- a/internal/services/storage/storage_account_data_source.go +++ b/internal/services/storage/storage_account_data_source.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" azautorest "github.com/Azure/go-autorest/autorest" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" diff --git a/internal/services/storage/storage_account_network_rules_resource.go b/internal/services/storage/storage_account_network_rules_resource.go index 947c2c12653f..7703062e8531 100644 --- a/internal/services/storage/storage_account_network_rules_resource.go +++ b/internal/services/storage/storage_account_network_rules_resource.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/storage/storage_account_resource.go b/internal/services/storage/storage_account_resource.go index 58eb7808bccc..7bdab9251ceb 100644 --- a/internal/services/storage/storage_account_resource.go +++ b/internal/services/storage/storage_account_resource.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" azautorest "github.com/Azure/go-autorest/autorest" autorestAzure "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/lang/response" diff --git a/internal/services/storage/storage_blob_inventory_policy_resource.go b/internal/services/storage/storage_blob_inventory_policy_resource.go index 6e29db053b9f..a182e338dea8 100644 --- a/internal/services/storage/storage_blob_inventory_policy_resource.go +++ b/internal/services/storage/storage_blob_inventory_policy_resource.go @@ -6,7 +6,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" "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" diff --git a/internal/services/storage/storage_encryption_scope_resource.go b/internal/services/storage/storage_encryption_scope_resource.go index 4d81b896f49b..e6438a84e589 100644 --- a/internal/services/storage/storage_encryption_scope_resource.go +++ b/internal/services/storage/storage_encryption_scope_resource.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" keyVaultValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/validate" diff --git a/internal/services/storage/storage_encryption_scope_resource_test.go b/internal/services/storage/storage_encryption_scope_resource_test.go index 4270bf352860..54ad7877c013 100644 --- a/internal/services/storage/storage_encryption_scope_resource_test.go +++ b/internal/services/storage/storage_encryption_scope_resource_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/storage/storage_management_policy_resource.go b/internal/services/storage/storage_management_policy_resource.go index 8c12307c4c42..14d80fab092e 100644 --- a/internal/services/storage/storage_management_policy_resource.go +++ b/internal/services/storage/storage_management_policy_resource.go @@ -6,7 +6,7 @@ import ( "regexp" "time" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/CHANGELOG.md similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/CHANGELOG.md rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/CHANGELOG.md diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/_meta.json similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/_meta.json rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/_meta.json index 9db13d1349c6..1093e901988a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/_meta.json +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/_meta.json @@ -1,10 +1,10 @@ { - "commit": "5fcc6854765009e891052653b304cfe80353430a", + "commit": "a1a224b54f05debfa94fd19477ed820c64f0f9fc", "readme": "/_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", - "tag": "package-2021-04", + "tag": "package-2021-09", "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-04 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-09 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/accounts.go similarity index 85% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/accounts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/accounts.go index 8eb85a11438f..53d37ea455ac 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/accounts.go @@ -31,6 +31,99 @@ func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) Account return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } +// AbortHierarchicalNamespaceMigration abort live Migration of storage account to enable Hns +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client AccountsClient) AbortHierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string) (result AccountsAbortHierarchicalNamespaceMigrationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.AbortHierarchicalNamespaceMigration") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.AccountsClient", "AbortHierarchicalNamespaceMigration", err.Error()) + } + + req, err := client.AbortHierarchicalNamespaceMigrationPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "AbortHierarchicalNamespaceMigration", nil, "Failure preparing request") + return + } + + result, err = client.AbortHierarchicalNamespaceMigrationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "AbortHierarchicalNamespaceMigration", result.Response(), "Failure sending request") + return + } + + return +} + +// AbortHierarchicalNamespaceMigrationPreparer prepares the AbortHierarchicalNamespaceMigration request. +func (client AccountsClient) AbortHierarchicalNamespaceMigrationPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/aborthnsonmigration", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AbortHierarchicalNamespaceMigrationSender sends the AbortHierarchicalNamespaceMigration request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) AbortHierarchicalNamespaceMigrationSender(req *http.Request) (future AccountsAbortHierarchicalNamespaceMigrationFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// AbortHierarchicalNamespaceMigrationResponder handles the response to the AbortHierarchicalNamespaceMigration request. The method always +// closes the http.Response Body. +func (client AccountsClient) AbortHierarchicalNamespaceMigrationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // CheckNameAvailability checks that the storage account name is valid and is not already in use. // Parameters: // accountName - the name of the storage account within the specified resource group. Storage account names @@ -83,7 +176,7 @@ func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -167,6 +260,14 @@ func (client AccountsClient) Create(ctx context.Context, resourceGroupName strin {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.AzureStorageSid", Name: validation.Null, Rule: true, Chain: nil}, }}, }}, + {Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning.ImmutabilityPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning.ImmutabilityPolicy.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning.ImmutabilityPolicy.ImmutabilityPeriodSinceCreationInDays", Name: validation.InclusiveMaximum, Rule: int64(146000), Chain: nil}, + {Target: "parameters.AccountPropertiesCreateParameters.ImmutableStorageWithVersioning.ImmutabilityPolicy.ImmutabilityPeriodSinceCreationInDays", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}, + }}, }}}}, {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -196,7 +297,7 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -299,7 +400,7 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -384,7 +485,7 @@ func (client AccountsClient) FailoverPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -487,7 +588,7 @@ func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -521,6 +622,103 @@ func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result return } +// HierarchicalNamespaceMigration live Migration of storage account to enable Hns +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// requestType - required. Hierarchical namespace migration type can either be a hierarchical namespace +// validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation +// request will validate the migration whereas the hydration request will migrate the account. +func (client AccountsClient) HierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, requestType string) (result AccountsHierarchicalNamespaceMigrationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.HierarchicalNamespaceMigration") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.AccountsClient", "HierarchicalNamespaceMigration", err.Error()) + } + + req, err := client.HierarchicalNamespaceMigrationPreparer(ctx, resourceGroupName, accountName, requestType) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "HierarchicalNamespaceMigration", nil, "Failure preparing request") + return + } + + result, err = client.HierarchicalNamespaceMigrationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "HierarchicalNamespaceMigration", result.Response(), "Failure sending request") + return + } + + return +} + +// HierarchicalNamespaceMigrationPreparer prepares the HierarchicalNamespaceMigration request. +func (client AccountsClient) HierarchicalNamespaceMigrationPreparer(ctx context.Context, resourceGroupName string, accountName string, requestType string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "requestType": autorest.Encode("query", requestType), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/hnsonmigration", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// HierarchicalNamespaceMigrationSender sends the HierarchicalNamespaceMigration request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) HierarchicalNamespaceMigrationSender(req *http.Request) (future AccountsHierarchicalNamespaceMigrationFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// HierarchicalNamespaceMigrationResponder handles the response to the HierarchicalNamespaceMigration request. The method always +// closes the http.Response Body. +func (client AccountsClient) HierarchicalNamespaceMigrationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // List lists all the storage accounts available under the subscription. Note that storage keys are not returned; use // the ListKeys operation for this. func (client AccountsClient) List(ctx context.Context) (result AccountListResultPage, err error) { @@ -573,7 +771,7 @@ func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -704,7 +902,7 @@ func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -797,7 +995,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -926,7 +1124,7 @@ func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1025,7 +1223,7 @@ func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1121,7 +1319,7 @@ func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1211,7 +1409,7 @@ func (client AccountsClient) RestoreBlobRangesPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1314,7 +1512,7 @@ func (client AccountsClient) RevokeUserDelegationKeysPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1410,7 +1608,7 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/blobcontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/blobcontainers.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/blobcontainers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/blobcontainers.go index cedbf65f1873..ab6e1f974fc3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/blobcontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/blobcontainers.go @@ -102,7 +102,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -206,7 +206,7 @@ func (client BlobContainersClient) CreatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -315,7 +315,7 @@ func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -422,7 +422,7 @@ func (client BlobContainersClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -526,7 +526,7 @@ func (client BlobContainersClient) DeleteImmutabilityPolicyPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -633,7 +633,7 @@ func (client BlobContainersClient) ExtendImmutabilityPolicyPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -737,7 +737,7 @@ func (client BlobContainersClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -840,7 +840,7 @@ func (client BlobContainersClient) GetImmutabilityPolicyPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -944,7 +944,7 @@ func (client BlobContainersClient) LeasePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1049,7 +1049,7 @@ func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1197,7 +1197,7 @@ func (client BlobContainersClient) LockImmutabilityPolicyPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1291,7 +1291,7 @@ func (client BlobContainersClient) ObjectLevelWormPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1402,7 +1402,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1505,7 +1505,7 @@ func (client BlobContainersClient) UpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/blobinventorypolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/blobinventorypolicies.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/blobinventorypolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/blobinventorypolicies.go index b37de3a42973..112f6c1a95c5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/blobinventorypolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/blobinventorypolicies.go @@ -102,7 +102,7 @@ func (client BlobInventoryPoliciesClient) CreateOrUpdatePreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -196,7 +196,7 @@ func (client BlobInventoryPoliciesClient) DeletePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -287,7 +287,7 @@ func (client BlobInventoryPoliciesClient) GetPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -378,7 +378,7 @@ func (client BlobInventoryPoliciesClient) ListPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/blobservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/blobservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/blobservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/blobservices.go index d9553078ea3e..c25c66069545 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/blobservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/blobservices.go @@ -93,7 +93,7 @@ func (client BlobServicesClient) GetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client BlobServicesClient) ListPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -309,7 +309,7 @@ func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/client.go index 4d3fa84b6325..713b72d1e7b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/client.go @@ -1,4 +1,4 @@ -// Package storage implements the Azure ARM Storage service API version 2021-04-01. +// Package storage implements the Azure ARM Storage service API version 2021-09-01. // // The Azure Storage Management API. package storage diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/deletedaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/deletedaccounts.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/deletedaccounts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/deletedaccounts.go index 4019996f917a..a8abefe86263 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/deletedaccounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/deletedaccounts.go @@ -85,7 +85,7 @@ func (client DeletedAccountsClient) GetPreparer(ctx context.Context, deletedAcco "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -167,7 +167,7 @@ func (client DeletedAccountsClient) ListPreparer(ctx context.Context) (*http.Req "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/encryptionscopes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/encryptionscopes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/encryptionscopes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/encryptionscopes.go index a904eeb7ebec..0a120d35646b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/encryptionscopes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/encryptionscopes.go @@ -99,7 +99,7 @@ func (client EncryptionScopesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -195,7 +195,7 @@ func (client EncryptionScopesClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -332,7 +332,7 @@ func (client EncryptionScopesClient) PatchPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -435,7 +435,7 @@ func (client EncryptionScopesClient) PutPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/enums.go similarity index 89% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/enums.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/enums.go index e46f629d1ee7..bba1ff6410cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/enums.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/enums.go @@ -14,11 +14,13 @@ const ( AccessTierCool AccessTier = "Cool" // AccessTierHot ... AccessTierHot AccessTier = "Hot" + // AccessTierPremium ... + AccessTierPremium AccessTier = "Premium" ) // PossibleAccessTierValues returns an array of possible values for the AccessTier const type. func PossibleAccessTierValues() []AccessTier { - return []AccessTier{AccessTierCool, AccessTierHot} + return []AccessTier{AccessTierCool, AccessTierHot, AccessTierPremium} } // AccountExpand enumerates the values for account expand. @@ -36,6 +38,23 @@ func PossibleAccountExpandValues() []AccountExpand { return []AccountExpand{AccountExpandBlobRestoreStatus, AccountExpandGeoReplicationStats} } +// AccountImmutabilityPolicyState enumerates the values for account immutability policy state. +type AccountImmutabilityPolicyState string + +const ( + // AccountImmutabilityPolicyStateDisabled ... + AccountImmutabilityPolicyStateDisabled AccountImmutabilityPolicyState = "Disabled" + // AccountImmutabilityPolicyStateLocked ... + AccountImmutabilityPolicyStateLocked AccountImmutabilityPolicyState = "Locked" + // AccountImmutabilityPolicyStateUnlocked ... + AccountImmutabilityPolicyStateUnlocked AccountImmutabilityPolicyState = "Unlocked" +) + +// PossibleAccountImmutabilityPolicyStateValues returns an array of possible values for the AccountImmutabilityPolicyState const type. +func PossibleAccountImmutabilityPolicyStateValues() []AccountImmutabilityPolicyState { + return []AccountImmutabilityPolicyState{AccountImmutabilityPolicyStateDisabled, AccountImmutabilityPolicyStateLocked, AccountImmutabilityPolicyStateUnlocked} +} + // AccountStatus enumerates the values for account status. type AccountStatus string @@ -51,6 +70,21 @@ func PossibleAccountStatusValues() []AccountStatus { return []AccountStatus{AccountStatusAvailable, AccountStatusUnavailable} } +// AccountType enumerates the values for account type. +type AccountType string + +const ( + // AccountTypeComputer ... + AccountTypeComputer AccountType = "Computer" + // AccountTypeUser ... + AccountTypeUser AccountType = "User" +) + +// PossibleAccountTypeValues returns an array of possible values for the AccountType const type. +func PossibleAccountTypeValues() []AccountType { + return []AccountType{AccountTypeComputer, AccountTypeUser} +} + // Action enumerates the values for action. type Action string @@ -85,6 +119,21 @@ func PossibleAction1Values() []Action1 { return []Action1{Action1Acquire, Action1Break, Action1Change, Action1Release, Action1Renew} } +// AllowedCopyScope enumerates the values for allowed copy scope. +type AllowedCopyScope string + +const ( + // AllowedCopyScopeAAD ... + AllowedCopyScopeAAD AllowedCopyScope = "AAD" + // AllowedCopyScopePrivateLink ... + AllowedCopyScopePrivateLink AllowedCopyScope = "PrivateLink" +) + +// PossibleAllowedCopyScopeValues returns an array of possible values for the AllowedCopyScope const type. +func PossibleAllowedCopyScopeValues() []AllowedCopyScope { + return []AllowedCopyScope{AllowedCopyScopeAAD, AllowedCopyScopePrivateLink} +} + // BlobRestoreProgressStatus enumerates the values for blob restore progress status. type BlobRestoreProgressStatus string @@ -165,15 +214,13 @@ const ( DefaultSharePermissionStorageFileDataSmbShareContributor DefaultSharePermission = "StorageFileDataSmbShareContributor" // DefaultSharePermissionStorageFileDataSmbShareElevatedContributor ... DefaultSharePermissionStorageFileDataSmbShareElevatedContributor DefaultSharePermission = "StorageFileDataSmbShareElevatedContributor" - // DefaultSharePermissionStorageFileDataSmbShareOwner ... - DefaultSharePermissionStorageFileDataSmbShareOwner DefaultSharePermission = "StorageFileDataSmbShareOwner" // DefaultSharePermissionStorageFileDataSmbShareReader ... DefaultSharePermissionStorageFileDataSmbShareReader DefaultSharePermission = "StorageFileDataSmbShareReader" ) // PossibleDefaultSharePermissionValues returns an array of possible values for the DefaultSharePermission const type. func PossibleDefaultSharePermissionValues() []DefaultSharePermission { - return []DefaultSharePermission{DefaultSharePermissionNone, DefaultSharePermissionStorageFileDataSmbShareContributor, DefaultSharePermissionStorageFileDataSmbShareElevatedContributor, DefaultSharePermissionStorageFileDataSmbShareOwner, DefaultSharePermissionStorageFileDataSmbShareReader} + return []DefaultSharePermission{DefaultSharePermissionNone, DefaultSharePermissionStorageFileDataSmbShareContributor, DefaultSharePermissionStorageFileDataSmbShareElevatedContributor, DefaultSharePermissionStorageFileDataSmbShareReader} } // DirectoryServiceOptions enumerates the values for directory service options. @@ -193,6 +240,21 @@ func PossibleDirectoryServiceOptionsValues() []DirectoryServiceOptions { return []DirectoryServiceOptions{DirectoryServiceOptionsAADDS, DirectoryServiceOptionsAD, DirectoryServiceOptionsNone} } +// DNSEndpointType enumerates the values for dns endpoint type. +type DNSEndpointType string + +const ( + // DNSEndpointTypeAzureDNSZone ... + DNSEndpointTypeAzureDNSZone DNSEndpointType = "AzureDnsZone" + // DNSEndpointTypeStandard ... + DNSEndpointTypeStandard DNSEndpointType = "Standard" +) + +// PossibleDNSEndpointTypeValues returns an array of possible values for the DNSEndpointType const type. +func PossibleDNSEndpointTypeValues() []DNSEndpointType { + return []DNSEndpointType{DNSEndpointTypeAzureDNSZone, DNSEndpointTypeStandard} +} + // EnabledProtocols enumerates the values for enabled protocols. type EnabledProtocols string @@ -686,6 +748,21 @@ func PossiblePublicAccessValues() []PublicAccess { return []PublicAccess{PublicAccessBlob, PublicAccessContainer, PublicAccessNone} } +// PublicNetworkAccess enumerates the values for public network access. +type PublicNetworkAccess string + +const ( + // PublicNetworkAccessDisabled ... + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + // PublicNetworkAccessEnabled ... + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +// PossiblePublicNetworkAccessValues returns an array of possible values for the PublicNetworkAccess const type. +func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { + return []PublicNetworkAccess{PublicNetworkAccessDisabled, PublicNetworkAccessEnabled} +} + // Reason enumerates the values for reason. type Reason string @@ -837,6 +914,23 @@ func PossibleSignedResourceTypesValues() []SignedResourceTypes { return []SignedResourceTypes{SignedResourceTypesC, SignedResourceTypesO, SignedResourceTypesS} } +// SkuConversionStatus enumerates the values for sku conversion status. +type SkuConversionStatus string + +const ( + // SkuConversionStatusFailed ... + SkuConversionStatusFailed SkuConversionStatus = "Failed" + // SkuConversionStatusInProgress ... + SkuConversionStatusInProgress SkuConversionStatus = "InProgress" + // SkuConversionStatusSucceeded ... + SkuConversionStatusSucceeded SkuConversionStatus = "Succeeded" +) + +// PossibleSkuConversionStatusValues returns an array of possible values for the SkuConversionStatus const type. +func PossibleSkuConversionStatusValues() []SkuConversionStatus { + return []SkuConversionStatus{SkuConversionStatusFailed, SkuConversionStatusInProgress, SkuConversionStatusSucceeded} +} + // SkuName enumerates the values for sku name. type SkuName string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/fileservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/fileservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/fileservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/fileservices.go index e626313de1a4..57c977db71fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/fileservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/fileservices.go @@ -93,7 +93,7 @@ func (client FileServicesClient) GetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client FileServicesClient) ListPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -288,7 +288,7 @@ func (client FileServicesClient) SetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/fileshares.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/fileshares.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/fileshares.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/fileshares.go index 8c6d637d9f6b..bd6cfa5eb1c2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/fileshares.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/fileshares.go @@ -109,7 +109,7 @@ func (client FileSharesClient) CreatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -218,7 +218,7 @@ func (client FileSharesClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +325,7 @@ func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -433,7 +433,7 @@ func (client FileSharesClient) LeasePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -542,7 +542,7 @@ func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -689,7 +689,7 @@ func (client FileSharesClient) RestorePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -790,7 +790,7 @@ func (client FileSharesClient) UpdatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/localusers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/localusers.go new file mode 100644 index 000000000000..4552d1e63ece --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/localusers.go @@ -0,0 +1,610 @@ +package storage + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// LocalUsersClient is the the Azure Storage Management API. +type LocalUsersClient struct { + BaseClient +} + +// NewLocalUsersClient creates an instance of the LocalUsersClient client. +func NewLocalUsersClient(subscriptionID string) LocalUsersClient { + return NewLocalUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLocalUsersClientWithBaseURI creates an instance of the LocalUsersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLocalUsersClientWithBaseURI(baseURI string, subscriptionID string) LocalUsersClient { + return LocalUsersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update the properties of a local user associated with the storage account +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +// properties - the local user associated with a storage account. +func (client LocalUsersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, username string, properties LocalUser) (result LocalUser, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, username, properties) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client LocalUsersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, username string, properties LocalUser) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2021-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", pathParameters), + autorest.WithJSON(properties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) CreateOrUpdateResponder(resp *http.Response) (result LocalUser, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the local user associated with the specified storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +func (client LocalUsersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, username string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, username) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client LocalUsersClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, username string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2021-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the local user of the storage account by username. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +func (client LocalUsersClient) Get(ctx context.Context, resourceGroupName string, accountName string, username string) (result LocalUser, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, username) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client LocalUsersClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, username string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2021-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) GetResponder(resp *http.Response) (result LocalUser, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list the local users associated with the storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client LocalUsersClient) List(ctx context.Context, resourceGroupName string, accountName string) (result LocalUsers, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client LocalUsersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) ListResponder(resp *http.Response) (result LocalUsers, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListKeys list SSH authorized keys and shared key of the local user. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +func (client LocalUsersClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, username string) (result LocalUserKeys, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.ListKeys") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "ListKeys", err.Error()) + } + + req, err := client.ListKeysPreparer(ctx, resourceGroupName, accountName, username) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "ListKeys", nil, "Failure preparing request") + return + } + + resp, err := client.ListKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "ListKeys", resp, "Failure sending request") + return + } + + result, err = client.ListKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "ListKeys", resp, "Failure responding to request") + return + } + + return +} + +// ListKeysPreparer prepares the ListKeys request. +func (client LocalUsersClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, accountName string, username string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2021-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/listKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListKeysSender sends the ListKeys request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) ListKeysSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListKeysResponder handles the response to the ListKeys request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) ListKeysResponder(resp *http.Response) (result LocalUserKeys, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RegeneratePassword regenerate the local user SSH password. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// username - the name of local user. The username must contain lowercase letters and numbers only. It must be +// unique only within the storage account. +func (client LocalUsersClient) RegeneratePassword(ctx context.Context, resourceGroupName string, accountName string, username string) (result LocalUserRegeneratePasswordResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocalUsersClient.RegeneratePassword") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: username, + Constraints: []validation.Constraint{{Target: "username", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "username", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.LocalUsersClient", "RegeneratePassword", err.Error()) + } + + req, err := client.RegeneratePasswordPreparer(ctx, resourceGroupName, accountName, username) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "RegeneratePassword", nil, "Failure preparing request") + return + } + + resp, err := client.RegeneratePasswordSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "RegeneratePassword", resp, "Failure sending request") + return + } + + result, err = client.RegeneratePasswordResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.LocalUsersClient", "RegeneratePassword", resp, "Failure responding to request") + return + } + + return +} + +// RegeneratePasswordPreparer prepares the RegeneratePassword request. +func (client LocalUsersClient) RegeneratePasswordPreparer(ctx context.Context, resourceGroupName string, accountName string, username string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "username": autorest.Encode("path", username), + } + + const APIVersion = "2021-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/regeneratePassword", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegeneratePasswordSender sends the RegeneratePassword request. The method will close the +// http.Response Body if it receives an error. +func (client LocalUsersClient) RegeneratePasswordSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// RegeneratePasswordResponder handles the response to the RegeneratePassword request. The method always +// closes the http.Response Body. +func (client LocalUsersClient) RegeneratePasswordResponder(resp *http.Response) (result LocalUserRegeneratePasswordResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/managementpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/managementpolicies.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/managementpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/managementpolicies.go index 8181c9be7531..c55da446fd68 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/managementpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/managementpolicies.go @@ -99,7 +99,7 @@ func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -193,7 +193,7 @@ func (client ManagementPoliciesClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -284,7 +284,7 @@ func (client ManagementPoliciesClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/models.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/models.go index 61695714c537..69058ef272dd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/models.go @@ -18,14 +18,14 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" // AccessPolicy ... type AccessPolicy struct { - // Start - Start time of the access policy - Start *date.Time `json:"start,omitempty"` - // Expiry - Expiry time of the access policy - Expiry *date.Time `json:"expiry,omitempty"` + // StartTime - Start time of the access policy + StartTime *date.Time `json:"startTime,omitempty"` + // ExpiryTime - Expiry time of the access policy + ExpiryTime *date.Time `json:"expiryTime,omitempty"` // Permission - List of abbreviated permissions. Permission *string `json:"permission,omitempty"` } @@ -313,6 +313,16 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { return nil } +// AccountImmutabilityPolicyProperties this defines account-level immutability policy properties. +type AccountImmutabilityPolicyProperties struct { + // ImmutabilityPeriodSinceCreationInDays - The immutability period for the blobs in the container since the policy creation, in days. + ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` + // State - The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. Possible values include: 'AccountImmutabilityPolicyStateUnlocked', 'AccountImmutabilityPolicyStateLocked', 'AccountImmutabilityPolicyStateDisabled' + State AccountImmutabilityPolicyState `json:"state,omitempty"` + // AllowProtectedAppendWrites - This property can only be changed for disabled and unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` +} + // AccountInternetEndpoints the URIs that are used to perform a retrieval of a public blob, file, web or // dfs object via a internet routing endpoint. type AccountInternetEndpoints struct { @@ -579,9 +589,9 @@ type AccountProperties struct { KeyCreationTime *KeyCreationTime `json:"keyCreationTime,omitempty"` // SecondaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS. SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty"` - // Encryption - READ-ONLY; Gets the encryption settings on the account. If unspecified, the account is unencrypted. + // Encryption - READ-ONLY; Encryption settings to be used for server-side encryption for the storage account. Encryption *Encryption `json:"encryption,omitempty"` - // AccessTier - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'AccessTierHot', 'AccessTierCool' + // AccessTier - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. Possible values include: 'AccessTierHot', 'AccessTierCool', 'AccessTierPremium' AccessTier AccessTier `json:"accessTier,omitempty"` // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` @@ -589,6 +599,10 @@ type AccountProperties struct { EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` // NetworkRuleSet - READ-ONLY; Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` + // IsSftpEnabled - Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + // IsLocalUserEnabled - Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` // GeoReplicationStats - READ-ONLY; Geo Replication Stats @@ -613,6 +627,18 @@ type AccountProperties struct { EnableNfsV3 *bool `json:"isNfsV3Enabled,omitempty"` // AllowCrossTenantReplication - Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + // DefaultToOAuthAuthentication - A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + // PublicNetworkAccess - Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // ImmutableStorageWithVersioning - The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + // AllowedCopyScope - Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values include: 'AllowedCopyScopePrivateLink', 'AllowedCopyScopeAAD' + AllowedCopyScope AllowedCopyScope `json:"allowedCopyScope,omitempty"` + // StorageAccountSkuConversionStatus - This property is readOnly and is set by server during asynchronous storage account sku conversion operations. + StorageAccountSkuConversionStatus *AccountSkuConversionStatus `json:"storageAccountSkuConversionStatus,omitempty"` + // DNSEndpointType - Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. Possible values include: 'DNSEndpointTypeStandard', 'DNSEndpointTypeAzureDNSZone' + DNSEndpointType DNSEndpointType `json:"dnsEndpointType,omitempty"` } // MarshalJSON is the custom marshaler for AccountProperties. @@ -624,6 +650,12 @@ func (ap AccountProperties) MarshalJSON() ([]byte, error) { if ap.EnableHTTPSTrafficOnly != nil { objectMap["supportsHttpsTrafficOnly"] = ap.EnableHTTPSTrafficOnly } + if ap.IsSftpEnabled != nil { + objectMap["isSftpEnabled"] = ap.IsSftpEnabled + } + if ap.IsLocalUserEnabled != nil { + objectMap["isLocalUserEnabled"] = ap.IsLocalUserEnabled + } if ap.IsHnsEnabled != nil { objectMap["isHnsEnabled"] = ap.IsHnsEnabled } @@ -648,27 +680,53 @@ func (ap AccountProperties) MarshalJSON() ([]byte, error) { if ap.AllowCrossTenantReplication != nil { objectMap["allowCrossTenantReplication"] = ap.AllowCrossTenantReplication } + if ap.DefaultToOAuthAuthentication != nil { + objectMap["defaultToOAuthAuthentication"] = ap.DefaultToOAuthAuthentication + } + if ap.PublicNetworkAccess != "" { + objectMap["publicNetworkAccess"] = ap.PublicNetworkAccess + } + if ap.ImmutableStorageWithVersioning != nil { + objectMap["immutableStorageWithVersioning"] = ap.ImmutableStorageWithVersioning + } + if ap.AllowedCopyScope != "" { + objectMap["allowedCopyScope"] = ap.AllowedCopyScope + } + if ap.StorageAccountSkuConversionStatus != nil { + objectMap["storageAccountSkuConversionStatus"] = ap.StorageAccountSkuConversionStatus + } + if ap.DNSEndpointType != "" { + objectMap["dnsEndpointType"] = ap.DNSEndpointType + } return json.Marshal(objectMap) } // AccountPropertiesCreateParameters the parameters used to create the storage account. type AccountPropertiesCreateParameters struct { + // AllowedCopyScope - Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values include: 'AllowedCopyScopePrivateLink', 'AllowedCopyScopeAAD' + AllowedCopyScope AllowedCopyScope `json:"allowedCopyScope,omitempty"` + // PublicNetworkAccess - Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // SasPolicy - SasPolicy assigned to the storage account. SasPolicy *SasPolicy `json:"sasPolicy,omitempty"` // KeyPolicy - KeyPolicy assigned to the storage account. KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"` // CustomDomain - User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. CustomDomain *CustomDomain `json:"customDomain,omitempty"` - // Encryption - Not applicable. Azure Storage encryption is enabled for all storage accounts and cannot be disabled. + // Encryption - Encryption settings to be used for server-side encryption for the storage account. Encryption *Encryption `json:"encryption,omitempty"` // NetworkRuleSet - Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` - // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'AccessTierHot', 'AccessTierCool' + // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. Possible values include: 'AccessTierHot', 'AccessTierCool', 'AccessTierPremium' AccessTier AccessTier `json:"accessTier,omitempty"` // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + // IsSftpEnabled - Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + // IsLocalUserEnabled - Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' @@ -685,24 +743,34 @@ type AccountPropertiesCreateParameters struct { EnableNfsV3 *bool `json:"isNfsV3Enabled,omitempty"` // AllowCrossTenantReplication - Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + // DefaultToOAuthAuthentication - A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + // ImmutableStorageWithVersioning - The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the new containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + // DNSEndpointType - Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. Possible values include: 'DNSEndpointTypeStandard', 'DNSEndpointTypeAzureDNSZone' + DNSEndpointType DNSEndpointType `json:"dnsEndpointType,omitempty"` } // AccountPropertiesUpdateParameters the parameters used when updating a storage account. type AccountPropertiesUpdateParameters struct { // CustomDomain - Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. CustomDomain *CustomDomain `json:"customDomain,omitempty"` - // Encryption - Provides the encryption settings on the account. The default setting is unencrypted. + // Encryption - Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts and cannot be disabled. Encryption *Encryption `json:"encryption,omitempty"` // SasPolicy - SasPolicy assigned to the storage account. SasPolicy *SasPolicy `json:"sasPolicy,omitempty"` // KeyPolicy - KeyPolicy assigned to the storage account. KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"` - // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'AccessTierHot', 'AccessTierCool' + // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. Possible values include: 'AccessTierHot', 'AccessTierCool', 'AccessTierPremium' AccessTier AccessTier `json:"accessTier,omitempty"` // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + // IsSftpEnabled - Enables Secure File Transfer Protocol, if set to true + IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"` + // IsLocalUserEnabled - Enables local users feature, if set to true + IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"` // NetworkRuleSet - Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' @@ -717,6 +785,16 @@ type AccountPropertiesUpdateParameters struct { AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"` // AllowCrossTenantReplication - Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"` + // DefaultToOAuthAuthentication - A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property. + DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"` + // PublicNetworkAccess - Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // ImmutableStorageWithVersioning - The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default. + ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"` + // AllowedCopyScope - Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values include: 'AllowedCopyScopePrivateLink', 'AllowedCopyScopeAAD' + AllowedCopyScope AllowedCopyScope `json:"allowedCopyScope,omitempty"` + // DNSEndpointType - Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. Possible values include: 'DNSEndpointTypeStandard', 'DNSEndpointTypeAzureDNSZone' + DNSEndpointType DNSEndpointType `json:"dnsEndpointType,omitempty"` } // AccountRegenerateKeyParameters the parameters used to regenerate the storage account key. @@ -725,6 +803,43 @@ type AccountRegenerateKeyParameters struct { KeyName *string `json:"keyName,omitempty"` } +// AccountsAbortHierarchicalNamespaceMigrationFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type AccountsAbortHierarchicalNamespaceMigrationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AccountsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AccountsAbortHierarchicalNamespaceMigrationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AccountsAbortHierarchicalNamespaceMigrationFuture.Result. +func (future *AccountsAbortHierarchicalNamespaceMigrationFuture) result(client AccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsAbortHierarchicalNamespaceMigrationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("storage.AccountsAbortHierarchicalNamespaceMigrationFuture") + return + } + ar.Response = future.Response() + return +} + // AccountSasParameters the parameters to list SAS credentials of a storage account. type AccountSasParameters struct { // Services - The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'ServicesB', 'ServicesQ', 'ServicesT', 'ServicesF' @@ -825,6 +940,65 @@ func (future *AccountsFailoverFuture) result(client AccountsClient) (ar autorest return } +// AccountsHierarchicalNamespaceMigrationFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type AccountsHierarchicalNamespaceMigrationFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AccountsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AccountsHierarchicalNamespaceMigrationFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AccountsHierarchicalNamespaceMigrationFuture.Result. +func (future *AccountsHierarchicalNamespaceMigrationFuture) result(client AccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsHierarchicalNamespaceMigrationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("storage.AccountsHierarchicalNamespaceMigrationFuture") + return + } + ar.Response = future.Response() + return +} + +// AccountSkuConversionStatus this defines the sku conversion status object for asynchronous sku +// conversions. +type AccountSkuConversionStatus struct { + // SkuConversionStatus - READ-ONLY; This property indicates the current sku conversion status. Possible values include: 'SkuConversionStatusInProgress', 'SkuConversionStatusSucceeded', 'SkuConversionStatusFailed' + SkuConversionStatus SkuConversionStatus `json:"skuConversionStatus,omitempty"` + // TargetSkuName - This property represents the target sku name to which the account sku is being converted asynchronously. Possible values include: 'SkuNameStandardLRS', 'SkuNameStandardGRS', 'SkuNameStandardRAGRS', 'SkuNameStandardZRS', 'SkuNamePremiumLRS', 'SkuNamePremiumZRS', 'SkuNameStandardGZRS', 'SkuNameStandardRAGZRS' + TargetSkuName SkuName `json:"targetSkuName,omitempty"` + // StartTime - READ-ONLY; This property represents the sku conversion start time. + StartTime *string `json:"startTime,omitempty"` + // EndTime - READ-ONLY; This property represents the sku conversion end time. + EndTime *string `json:"endTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for AccountSkuConversionStatus. +func (ascs AccountSkuConversionStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ascs.TargetSkuName != "" { + objectMap["targetSkuName"] = ascs.TargetSkuName + } + return json.Marshal(objectMap) +} + // AccountsRestoreBlobRangesFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type AccountsRestoreBlobRangesFuture struct { @@ -978,6 +1152,10 @@ type ActiveDirectoryProperties struct { DomainSid *string `json:"domainSid,omitempty"` // AzureStorageSid - Specifies the security identifier (SID) for Azure Storage. AzureStorageSid *string `json:"azureStorageSid,omitempty"` + // SamAccountName - Specifies the Active Directory SAMAccountName for Azure Storage. + SamAccountName *string `json:"samAccountName,omitempty"` + // AccountType - Specifies the Active Directory account type for Azure Storage. Possible values include: 'AccountTypeUser', 'AccountTypeComputer' + AccountType AccountType `json:"accountType,omitempty"` } // AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. @@ -1004,7 +1182,7 @@ type AzureFilesIdentityBasedAuthentication struct { DirectoryServiceOptions DirectoryServiceOptions `json:"directoryServiceOptions,omitempty"` // ActiveDirectoryProperties - Required if choose AD. ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"` - // DefaultSharePermission - Default share permission for users using Kerberos authentication if RBAC role is not assigned. Possible values include: 'DefaultSharePermissionNone', 'DefaultSharePermissionStorageFileDataSmbShareReader', 'DefaultSharePermissionStorageFileDataSmbShareContributor', 'DefaultSharePermissionStorageFileDataSmbShareElevatedContributor', 'DefaultSharePermissionStorageFileDataSmbShareOwner' + // DefaultSharePermission - Default share permission for users using Kerberos authentication if RBAC role is not assigned. Possible values include: 'DefaultSharePermissionNone', 'DefaultSharePermissionStorageFileDataSmbShareReader', 'DefaultSharePermissionStorageFileDataSmbShareContributor', 'DefaultSharePermissionStorageFileDataSmbShareElevatedContributor' DefaultSharePermission DefaultSharePermission `json:"defaultSharePermission,omitempty"` } @@ -1225,7 +1403,7 @@ type BlobInventoryPolicyDefinition struct { Schedule Schedule `json:"schedule,omitempty"` // ObjectType - This is a required field. This field specifies the scope of the inventory created either at the blob or container level. Possible values include: 'ObjectTypeBlob', 'ObjectTypeContainer' ObjectType ObjectType `json:"objectType,omitempty"` - // SchemaFields - This is a required field. This field specifies the fields and properties of the object to be included in the inventory. The Schema field value 'Name' is always required. The valid values for this field for the 'Blob' definition.objectType include 'Name, Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier, AccessTierChangeTime, Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime'. The valid values for 'Container' definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState, LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold'. Schema field values 'Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl' are valid only for Hns enabled accounts. + // SchemaFields - This is a required field. This field specifies the fields and properties of the object to be included in the inventory. The Schema field value 'Name' is always required. The valid values for this field for the 'Blob' definition.objectType include 'Name, Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier, AccessTierChangeTime, AccessTierInferred, Tags, Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag, ContentType, ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, ContentDisposition, LeaseStatus, LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime, RemainingRetentionDays, ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, CopyId, CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription, CustomerProvidedKeySha256, RehydratePriority, ArchiveStatus, XmsBlobSequenceNumber, EncryptionScope, IncrementalCopy, TagCount'. For Blob object type schema field value 'DeletedTime' is applicable only for Hns enabled accounts. The valid values for 'Container' definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState, LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, DefaultEncryptionScope, DenyEncryptionScopeOverride, ImmutableStorageWithVersioningEnabled, Deleted, Version, DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, DeletionId' are valid only for Hns enabled accounts.Schema field values 'Tags, TagCount' are only valid for Non-Hns accounts. SchemaFields *[]string `json:"schemaFields,omitempty"` } @@ -1233,14 +1411,18 @@ type BlobInventoryPolicyDefinition struct { // definition.objectType all filter properties are applicable, 'blobTypes' is required and others are // optional. For 'Container' definition.objectType only prefixMatch is applicable and is optional. type BlobInventoryPolicyFilter struct { - // PrefixMatch - An array of strings for blob prefixes to be matched. + // PrefixMatch - An array of strings with maximum 10 blob prefixes to be included in the inventory. PrefixMatch *[]string `json:"prefixMatch,omitempty"` + // ExcludePrefix - An array of strings with maximum 10 blob prefixes to be excluded from the inventory. + ExcludePrefix *[]string `json:"excludePrefix,omitempty"` // BlobTypes - An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. This field is required when definition.objectType property is set to 'Blob'. BlobTypes *[]string `json:"blobTypes,omitempty"` // IncludeBlobVersions - Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they must be excluded. IncludeBlobVersions *bool `json:"includeBlobVersions,omitempty"` // IncludeSnapshots - Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required if this property is set to true, else it must be excluded. IncludeSnapshots *bool `json:"includeSnapshots,omitempty"` + // IncludeDeleted - For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be excluded. + IncludeDeleted *bool `json:"includeDeleted,omitempty"` } // BlobInventoryPolicyProperties the storage account blob inventory policy properties. @@ -1277,12 +1459,29 @@ type BlobInventoryPolicyRule struct { type BlobInventoryPolicySchema struct { // Enabled - Policy is enabled if set to true. Enabled *bool `json:"enabled,omitempty"` + // Destination - READ-ONLY; Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified at the rule level 'policy.rule.destination' + Destination *string `json:"destination,omitempty"` // Type - The valid value is Inventory Type *string `json:"type,omitempty"` // Rules - The storage account blob inventory policy rules. The rule is applied when it is enabled. Rules *[]BlobInventoryPolicyRule `json:"rules,omitempty"` } +// MarshalJSON is the custom marshaler for BlobInventoryPolicySchema. +func (bips BlobInventoryPolicySchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bips.Enabled != nil { + objectMap["enabled"] = bips.Enabled + } + if bips.Type != nil { + objectMap["type"] = bips.Type + } + if bips.Rules != nil { + objectMap["rules"] = bips.Rules + } + return json.Marshal(objectMap) +} + // BlobRestoreParameters blob restore parameters type BlobRestoreParameters struct { // TimeToRestore - Restore blob to the specified time. @@ -1515,6 +1714,10 @@ type ContainerProperties struct { HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty"` // ImmutableStorageWithVersioning - The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process. ImmutableStorageWithVersioning *ImmutableStorageWithVersioning `json:"immutableStorageWithVersioning,omitempty"` + // EnableNfsV3RootSquash - Enable NFSv3 root squash on blob container. + EnableNfsV3RootSquash *bool `json:"enableNfsV3RootSquash,omitempty"` + // EnableNfsV3AllSquash - Enable NFSv3 all squash on blob container. + EnableNfsV3AllSquash *bool `json:"enableNfsV3AllSquash,omitempty"` } // MarshalJSON is the custom marshaler for ContainerProperties. @@ -1535,6 +1738,12 @@ func (cp ContainerProperties) MarshalJSON() ([]byte, error) { if cp.ImmutableStorageWithVersioning != nil { objectMap["immutableStorageWithVersioning"] = cp.ImmutableStorageWithVersioning } + if cp.EnableNfsV3RootSquash != nil { + objectMap["enableNfsV3RootSquash"] = cp.EnableNfsV3RootSquash + } + if cp.EnableNfsV3AllSquash != nil { + objectMap["enableNfsV3AllSquash"] = cp.EnableNfsV3AllSquash + } return json.Marshal(objectMap) } @@ -1566,20 +1775,28 @@ type CustomDomain struct { UseSubDomainName *bool `json:"useSubDomainName,omitempty"` } -// DateAfterCreation object to define the number of days after creation. +// DateAfterCreation object to define snapshot and version action conditions. type DateAfterCreation struct { // DaysAfterCreationGreaterThan - Value indicating the age in days after creation DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` + // DaysAfterLastTierChangeGreaterThan - Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob version based actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` } -// DateAfterModification object to define the number of days after object last modification Or last access. -// Properties daysAfterModificationGreaterThan and daysAfterLastAccessTimeGreaterThan are mutually -// exclusive. +// DateAfterModification object to define the base blob action conditions. Properties +// daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan +// are mutually exclusive. The daysAfterLastTierChangeGreaterThan property is only applicable for +// tierToArchive actions which requires daysAfterModificationGreaterThan to be set, also it cannot be used +// in conjunction with daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. type DateAfterModification struct { // DaysAfterModificationGreaterThan - Value indicating the age in days after last modification DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` // DaysAfterLastAccessTimeGreaterThan - Value indicating the age in days after last blob access. This property can only be used in conjunction with last access time tracking policy DaysAfterLastAccessTimeGreaterThan *float64 `json:"daysAfterLastAccessTimeGreaterThan,omitempty"` + // DaysAfterLastTierChangeGreaterThan - Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based actions. The blob will be archived if both the conditions are satisfied. + DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"` + // DaysAfterCreationGreaterThan - Value indicating the age in days after blob creation. + DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` } // DeletedAccount deleted storage account @@ -1854,6 +2071,8 @@ type DeleteRetentionPolicy struct { Enabled *bool `json:"enabled,omitempty"` // Days - Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365. Days *int32 `json:"days,omitempty"` + // AllowPermanentDelete - This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used blob restore policy. This property only applies to blob service and does not apply to containers or file share. + AllowPermanentDelete *bool `json:"allowPermanentDelete,omitempty"` } // Dimension dimension of blobs, possibly be blob type or access tier. @@ -1882,6 +2101,8 @@ type Encryption struct { type EncryptionIdentity struct { // EncryptionUserAssignedIdentity - Resource identifier of the UserAssigned identity to be associated with server-side encryption on the storage account. EncryptionUserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` + // EncryptionFederatedIdentityClientID - ClientId of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account. + EncryptionFederatedIdentityClientID *string `json:"federatedIdentityClientId,omitempty"` } // EncryptionScope the Encryption Scope resource. @@ -2179,9 +2400,9 @@ func (esp EncryptionScopeProperties) MarshalJSON() ([]byte, error) { // EncryptionService a service that allows server-side encryption to be used. type EncryptionService struct { - // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored. + // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default today and cannot be disabled. Enabled *bool `json:"enabled,omitempty"` - // LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate. + // LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is encrypted at rest by default today and cannot be disabled. LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` // KeyType - Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used. Possible values include: 'KeyTypeService', 'KeyTypeAccount' KeyType KeyType `json:"keyType,omitempty"` @@ -2963,8 +3184,10 @@ type ImmutabilityPolicyProperty struct { ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` // State - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'ImmutabilityPolicyStateLocked', 'ImmutabilityPolicyStateUnlocked' State ImmutabilityPolicyState `json:"state,omitempty"` - // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API + // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + // AllowProtectedAppendWritesAll - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` } // MarshalJSON is the custom marshaler for ImmutabilityPolicyProperty. @@ -2976,9 +3199,21 @@ func (ipp ImmutabilityPolicyProperty) MarshalJSON() ([]byte, error) { if ipp.AllowProtectedAppendWrites != nil { objectMap["allowProtectedAppendWrites"] = ipp.AllowProtectedAppendWrites } + if ipp.AllowProtectedAppendWritesAll != nil { + objectMap["allowProtectedAppendWritesAll"] = ipp.AllowProtectedAppendWritesAll + } return json.Marshal(objectMap) } +// ImmutableStorageAccount this property enables and defines account-level immutability. Enabling the +// feature auto-enables Blob Versioning. +type ImmutableStorageAccount struct { + // Enabled - A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default. + Enabled *bool `json:"enabled,omitempty"` + // ImmutabilityPolicy - Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy. + ImmutabilityPolicy *AccountImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` +} + // ImmutableStorageWithVersioning object level immutability properties of the container. type ImmutableStorageWithVersioning struct { // Enabled - This is an immutable property, when set to true it enables object level immutability at the container level. @@ -3030,6 +3265,8 @@ type KeyVaultProperties struct { CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` // LastKeyRotationTimestamp - READ-ONLY; Timestamp of last rotation of the Key Vault Key. LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"` + // CurrentVersionedKeyExpirationTimestamp - READ-ONLY; This is a read only property that represents the expiration time of the current version of the customer managed key used for encryption. + CurrentVersionedKeyExpirationTimestamp *date.Time `json:"currentVersionedKeyExpirationTimestamp,omitempty"` } // MarshalJSON is the custom marshaler for KeyVaultProperties. @@ -3112,6 +3349,8 @@ type LegalHold struct { HasLegalHold *bool `json:"hasLegalHold,omitempty"` // Tags - Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. Tags *[]string `json:"tags,omitempty"` + // AllowProtectedAppendWritesAll - When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` } // MarshalJSON is the custom marshaler for LegalHold. @@ -3120,6 +3359,9 @@ func (lh LegalHold) MarshalJSON() ([]byte, error) { if lh.Tags != nil { objectMap["tags"] = lh.Tags } + if lh.AllowProtectedAppendWritesAll != nil { + objectMap["allowProtectedAppendWritesAll"] = lh.AllowProtectedAppendWritesAll + } return json.Marshal(objectMap) } @@ -3129,6 +3371,8 @@ type LegalHoldProperties struct { HasLegalHold *bool `json:"hasLegalHold,omitempty"` // Tags - The list of LegalHold tags of a blob container. Tags *[]TagProperty `json:"tags,omitempty"` + // ProtectedAppendWritesHistory - Protected append blob writes history. + ProtectedAppendWritesHistory *ProtectedAppendWritesHistory `json:"protectedAppendWritesHistory,omitempty"` } // MarshalJSON is the custom marshaler for LegalHoldProperties. @@ -3137,6 +3381,9 @@ func (lhp LegalHoldProperties) MarshalJSON() ([]byte, error) { if lhp.Tags != nil { objectMap["tags"] = lhp.Tags } + if lhp.ProtectedAppendWritesHistory != nil { + objectMap["protectedAppendWritesHistory"] = lhp.ProtectedAppendWritesHistory + } return json.Marshal(objectMap) } @@ -3871,6 +4118,160 @@ func (lts ListTableServices) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// LocalUser the local user associated with the storage accounts. +type LocalUser struct { + autorest.Response `json:"-"` + // LocalUserProperties - Storage account local user properties. + *LocalUserProperties `json:"properties,omitempty"` + SystemData *SystemData `json:"systemData,omitempty"` + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocalUser. +func (lu LocalUser) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lu.LocalUserProperties != nil { + objectMap["properties"] = lu.LocalUserProperties + } + if lu.SystemData != nil { + objectMap["systemData"] = lu.SystemData + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LocalUser struct. +func (lu *LocalUser) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var localUserProperties LocalUserProperties + err = json.Unmarshal(*v, &localUserProperties) + if err != nil { + return err + } + lu.LocalUserProperties = &localUserProperties + } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + lu.SystemData = &systemData + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lu.Type = &typeVar + } + } + } + + return nil +} + +// LocalUserKeys the Storage Account Local User keys. +type LocalUserKeys struct { + autorest.Response `json:"-"` + SSHAuthorizedKeys *[]SSHPublicKey `json:"sshAuthorizedKeys,omitempty"` + SharedKey *string `json:"sharedKey,omitempty"` +} + +// LocalUserProperties the Storage Account Local User properties. +type LocalUserProperties struct { + // PermissionScopes - The permission scopes of the local user. + PermissionScopes *[]PermissionScope `json:"permissionScopes,omitempty"` + // HomeDirectory - Optional, local user home directory. + HomeDirectory *string `json:"homeDirectory,omitempty"` + SSHAuthorizedKeys *[]SSHPublicKey `json:"sshAuthorizedKeys,omitempty"` + // Sid - READ-ONLY; A unique Security Identifier that is generated by the server. + Sid *string `json:"sid,omitempty"` + // HasSharedKey - Indicates whether shared key exists. Set it to false to remove existing shared key. + HasSharedKey *bool `json:"hasSharedKey,omitempty"` + // HasSSHKey - Indicates whether ssh key exists. Set it to false to remove existing SSH key. + HasSSHKey *bool `json:"hasSshKey,omitempty"` + // HasSSHPassword - Indicates whether ssh password exists. Set it to false to remove existing SSH password. + HasSSHPassword *bool `json:"hasSshPassword,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocalUserProperties. +func (lup LocalUserProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lup.PermissionScopes != nil { + objectMap["permissionScopes"] = lup.PermissionScopes + } + if lup.HomeDirectory != nil { + objectMap["homeDirectory"] = lup.HomeDirectory + } + if lup.SSHAuthorizedKeys != nil { + objectMap["sshAuthorizedKeys"] = lup.SSHAuthorizedKeys + } + if lup.HasSharedKey != nil { + objectMap["hasSharedKey"] = lup.HasSharedKey + } + if lup.HasSSHKey != nil { + objectMap["hasSshKey"] = lup.HasSSHKey + } + if lup.HasSSHPassword != nil { + objectMap["hasSshPassword"] = lup.HasSSHPassword + } + return json.Marshal(objectMap) +} + +// LocalUserRegeneratePasswordResult the secrets of Storage Account Local User. +type LocalUserRegeneratePasswordResult struct { + autorest.Response `json:"-"` + // SSHPassword - READ-ONLY; Auto generated password by the server for SSH authentication if hasSshPassword is set to true on the creation of local user. + SSHPassword *string `json:"sshPassword,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocalUserRegeneratePasswordResult. +func (lurpr LocalUserRegeneratePasswordResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// LocalUsers list storage account local users. +type LocalUsers struct { + autorest.Response `json:"-"` + // Value - The local users associated with the storage account. + Value *[]LocalUser `json:"value,omitempty"` +} + // ManagementPolicy the Get Storage Account ManagementPolicies operation response. type ManagementPolicy struct { autorest.Response `json:"-"` @@ -4323,6 +4724,16 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } +// PermissionScope ... +type PermissionScope struct { + // Permissions - The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c). + Permissions *string `json:"permissions,omitempty"` + // Service - The service used by the local user, e.g. blob, file. + Service *string `json:"service,omitempty"` + // ResourceName - The name of resource, normally the container name or the file share name, used by the local user. + ResourceName *string `json:"resourceName,omitempty"` +} + // PrivateEndpoint the Private Endpoint resource. type PrivateEndpoint struct { // ID - READ-ONLY; The ARM identifier for Private Endpoint @@ -4535,6 +4946,24 @@ type PrivateLinkServiceConnectionState struct { ActionRequired *string `json:"actionRequired,omitempty"` } +// ProtectedAppendWritesHistory protected append writes history setting for the blob container with Legal +// holds. +type ProtectedAppendWritesHistory struct { + // AllowProtectedAppendWritesAll - When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` + // Timestamp - READ-ONLY; Returns the date and time the tag was added. + Timestamp *date.Time `json:"timestamp,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectedAppendWritesHistory. +func (pawh ProtectedAppendWritesHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pawh.AllowProtectedAppendWritesAll != nil { + objectMap["allowProtectedAppendWritesAll"] = pawh.AllowProtectedAppendWritesAll + } + return json.Marshal(objectMap) +} + // ProtocolSettings protocol settings for file service type ProtocolSettings struct { // Smb - Setting for SMB protocol @@ -4950,6 +5379,14 @@ type SmbSetting struct { ChannelEncryption *string `json:"channelEncryption,omitempty"` } +// SSHPublicKey ... +type SSHPublicKey struct { + // Description - Optional. It is used to store the function/usage of the key + Description *string `json:"description,omitempty"` + // Key - Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB + Key *string `json:"key,omitempty"` +} + // SystemData metadata pertaining to creation and last modification of the resource. type SystemData struct { // CreatedBy - The identity that created the resource. @@ -5039,15 +5476,30 @@ func (t *Table) UnmarshalJSON(body []byte) error { return nil } +// TableAccessPolicy table Access Policy Properties Object. +type TableAccessPolicy struct { + // StartTime - Start time of the access policy + StartTime *date.Time `json:"startTime,omitempty"` + // ExpiryTime - Expiry time of the access policy + ExpiryTime *date.Time `json:"expiryTime,omitempty"` + // Permission - Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d' + Permission *string `json:"permission,omitempty"` +} + // TableProperties ... type TableProperties struct { // TableName - READ-ONLY; Table name under the specified account TableName *string `json:"tableName,omitempty"` + // SignedIdentifiers - List of stored access policies specified on the table. + SignedIdentifiers *[]TableSignedIdentifier `json:"signedIdentifiers,omitempty"` } // MarshalJSON is the custom marshaler for TableProperties. func (tp TableProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if tp.SignedIdentifiers != nil { + objectMap["signedIdentifiers"] = tp.SignedIdentifiers + } return json.Marshal(objectMap) } @@ -5130,6 +5582,14 @@ type TableServicePropertiesProperties struct { Cors *CorsRules `json:"cors,omitempty"` } +// TableSignedIdentifier object to set Table Access Policy. +type TableSignedIdentifier struct { + // ID - unique-64-character-value of the stored access policy. + ID *string `json:"id,omitempty"` + // AccessPolicy - Access policy + AccessPolicy *TableAccessPolicy `json:"accessPolicy,omitempty"` +} + // TagFilter blob index tag based filtering for blob objects type TagFilter struct { // Name - This is the filter tag name, it can have 1 - 128 characters @@ -5201,11 +5661,21 @@ type UpdateHistoryProperty struct { TenantID *string `json:"tenantId,omitempty"` // Upn - READ-ONLY; Returns the User Principal Name of the user who updated the ImmutabilityPolicy. Upn *string `json:"upn,omitempty"` + // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` + // AllowProtectedAppendWritesAll - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive. + AllowProtectedAppendWritesAll *bool `json:"allowProtectedAppendWritesAll,omitempty"` } // MarshalJSON is the custom marshaler for UpdateHistoryProperty. func (uhp UpdateHistoryProperty) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if uhp.AllowProtectedAppendWrites != nil { + objectMap["allowProtectedAppendWrites"] = uhp.AllowProtectedAppendWrites + } + if uhp.AllowProtectedAppendWritesAll != nil { + objectMap["allowProtectedAppendWritesAll"] = uhp.AllowProtectedAppendWritesAll + } return json.Marshal(objectMap) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/objectreplicationpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/objectreplicationpolicies.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/objectreplicationpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/objectreplicationpolicies.go index c41bedaf4236..bf815f6c03fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/objectreplicationpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/objectreplicationpolicies.go @@ -38,7 +38,10 @@ func NewObjectReplicationPoliciesClientWithBaseURI(baseURI string, subscriptionI // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. +// objectReplicationPolicyID - for the destination account, provide the value 'default'. Configure the policy +// on the destination account first. For the source account, provide the value of the policy ID that is +// returned when you download the policy that was defined on the destination account. The policy is downloaded +// as a JSON file. // properties - the object replication policy set to a storage account. A unique policy ID will be created if // absent. func (client ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy) (result ObjectReplicationPolicy, err error) { @@ -103,7 +106,7 @@ func (client ObjectReplicationPoliciesClient) CreateOrUpdatePreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -142,7 +145,10 @@ func (client ObjectReplicationPoliciesClient) CreateOrUpdateResponder(resp *http // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. +// objectReplicationPolicyID - for the destination account, provide the value 'default'. Configure the policy +// on the destination account first. For the source account, provide the value of the policy ID that is +// returned when you download the policy that was defined on the destination account. The policy is downloaded +// as a JSON file. func (client ObjectReplicationPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.Delete") @@ -200,7 +206,7 @@ func (client ObjectReplicationPoliciesClient) DeletePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -236,7 +242,10 @@ func (client ObjectReplicationPoliciesClient) DeleteResponder(resp *http.Respons // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. +// objectReplicationPolicyID - for the destination account, provide the value 'default'. Configure the policy +// on the destination account first. For the source account, provide the value of the policy ID that is +// returned when you download the policy that was defined on the destination account. The policy is downloaded +// as a JSON file. func (client ObjectReplicationPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result ObjectReplicationPolicy, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.Get") @@ -294,7 +303,7 @@ func (client ObjectReplicationPoliciesClient) GetPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -385,7 +394,7 @@ func (client ObjectReplicationPoliciesClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/operations.go index 3f8311c259bd..af5740f324f8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/operations.go @@ -66,7 +66,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/privateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/privateendpointconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/privateendpointconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/privateendpointconnections.go index 33702adf9a0a..6bd6921f59dd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/privateendpointconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/privateendpointconnections.go @@ -95,7 +95,7 @@ func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -188,7 +188,7 @@ func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,7 +279,7 @@ func (client PrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -377,7 +377,7 @@ func (client PrivateEndpointConnectionsClient) PutPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/privatelinkresources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/privatelinkresources.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/privatelinkresources.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/privatelinkresources.go index 75c49f63da03..eefcb3e152a9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/privatelinkresources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/privatelinkresources.go @@ -92,7 +92,7 @@ func (client PrivateLinkResourcesClient) ListByStorageAccountPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/queue.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/queue.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/queue.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/queue.go index 372c626f5678..ce6ae22a0655 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/queue.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/queue.go @@ -99,7 +99,7 @@ func (client QueueClient) CreatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,7 +199,7 @@ func (client QueueClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -296,7 +296,7 @@ func (client QueueClient) GetPreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -395,7 +395,7 @@ func (client QueueClient) ListPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -537,7 +537,7 @@ func (client QueueClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/queueservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/queueservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/queueservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/queueservices.go index f778ad7a1519..21d70bb06d5d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/queueservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/queueservices.go @@ -93,7 +93,7 @@ func (client QueueServicesClient) GetServicePropertiesPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client QueueServicesClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,7 +279,7 @@ func (client QueueServicesClient) SetServicePropertiesPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/skus.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/skus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/skus.go index 5fdc10896d3a..a756e884531e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/skus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/skus.go @@ -77,7 +77,7 @@ func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/table.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/table.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/table.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/table.go index 51a83b904d3a..77d7dff4024e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/table.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/table.go @@ -39,7 +39,8 @@ func NewTableClientWithBaseURI(baseURI string, subscriptionID string) TableClien // must be between 3 and 24 characters in length and use numbers and lower-case letters only. // tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The // name must comprise of only alphanumeric characters and it cannot begin with a numeric character. -func (client TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { +// parameters - the parameters to provide to create a table. +func (client TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, tableName string, parameters *Table) (result Table, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Create") defer func() { @@ -67,7 +68,7 @@ func (client TableClient) Create(ctx context.Context, resourceGroupName string, return result, validation.NewError("storage.TableClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, tableName) + req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, tableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", nil, "Failure preparing request") return @@ -90,7 +91,7 @@ func (client TableClient) Create(ctx context.Context, resourceGroupName string, } // CreatePreparer prepares the Create request. -func (client TableClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { +func (client TableClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string, parameters *Table) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -98,16 +99,21 @@ func (client TableClient) CreatePreparer(ctx context.Context, resourceGroupName "tableName": autorest.Encode("path", tableName), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -196,7 +202,7 @@ func (client TableClient) DeletePreparer(ctx context.Context, resourceGroupName "tableName": autorest.Encode("path", tableName), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -293,7 +299,7 @@ func (client TableClient) GetPreparer(ctx context.Context, resourceGroupName str "tableName": autorest.Encode("path", tableName), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -389,7 +395,7 @@ func (client TableClient) ListPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -465,7 +471,8 @@ func (client TableClient) ListComplete(ctx context.Context, resourceGroupName st // must be between 3 and 24 characters in length and use numbers and lower-case letters only. // tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The // name must comprise of only alphanumeric characters and it cannot begin with a numeric character. -func (client TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { +// parameters - the parameters to provide to create a table. +func (client TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, tableName string, parameters *Table) (result Table, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Update") defer func() { @@ -493,7 +500,7 @@ func (client TableClient) Update(ctx context.Context, resourceGroupName string, return result, validation.NewError("storage.TableClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, tableName) + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, tableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", nil, "Failure preparing request") return @@ -516,7 +523,7 @@ func (client TableClient) Update(ctx context.Context, resourceGroupName string, } // UpdatePreparer prepares the Update request. -func (client TableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { +func (client TableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string, parameters *Table) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -524,16 +531,21 @@ func (client TableClient) UpdatePreparer(ctx context.Context, resourceGroupName "tableName": autorest.Encode("path", tableName), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/tableservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/tableservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/tableservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/tableservices.go index f8f19232e0fb..694ca736b6a8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/tableservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/tableservices.go @@ -93,7 +93,7 @@ func (client TableServicesClient) GetServicePropertiesPreparer(ctx context.Conte "tableServiceName": autorest.Encode("path", "default"), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client TableServicesClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,7 +279,7 @@ func (client TableServicesClient) SetServicePropertiesPreparer(ctx context.Conte "tableServiceName": autorest.Encode("path", "default"), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/usages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/usages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/usages.go index 4ef93c30a6ab..0952a56a5325 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/usages.go @@ -80,7 +80,7 @@ func (client UsagesClient) ListByLocationPreparer(ctx context.Context, location "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-04-01" + const APIVersion = "2021-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/version.go similarity index 90% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/version.go index 5b3e81db0a40..5e71325b63f7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage/version.go @@ -10,7 +10,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " storage/2021-04-01" + return "Azure-SDK-For-Go/" + Version() + " storage/2021-09-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/modules.txt b/vendor/modules.txt index edf0301b6461..003db49a4265 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -90,7 +90,7 @@ github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-01/managementg github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-06-01/resources github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2021-01-01/subscriptions github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2021-06-01/servicefabric -github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-04-01/storage +github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage github.com/Azure/azure-sdk-for-go/services/storagecache/mgmt/2021-09-01/storagecache github.com/Azure/azure-sdk-for-go/services/storagesync/mgmt/2020-03-01/storagesync github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2020-03-01/streamanalytics From 2545a30dae5478dc92d9e8d28e245544dbf75158 Mon Sep 17 00:00:00 2001 From: Mike Madeja Date: Thu, 21 Jul 2022 15:22:54 -0500 Subject: [PATCH 002/100] change storage_size_in_gb from 8192 to 16384 --- internal/services/sql/sql_managed_instance_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/sql/sql_managed_instance_resource.go b/internal/services/sql/sql_managed_instance_resource.go index 52729b2319d3..ae680a4d0f93 100644 --- a/internal/services/sql/sql_managed_instance_resource.go +++ b/internal/services/sql/sql_managed_instance_resource.go @@ -100,7 +100,7 @@ func resourceArmSqlMiServer() *schema.Resource { "storage_size_in_gb": { Type: schema.TypeInt, Required: true, - ValidateFunc: validation.IntBetween(32, 8192), + ValidateFunc: validation.IntBetween(32, 16384), }, "license_type": { From b424e9c291264e8eb71edfe7c0f3fc5c54fe0f44 Mon Sep 17 00:00:00 2001 From: bubbletroubles <42738824+bubbletroubles@users.noreply.github.com> Date: Tue, 2 Aug 2022 21:08:40 +1000 Subject: [PATCH 003/100] `azurerm_app_service_virtual_network_swift_connection` - updated documentation for associating to vNets (#17734) * Updated documentation * Update website/docs/r/app_service_virtual_network_swift_connection.html.markdown Co-authored-by: Tom Harvey * Update website/docs/r/app_service_virtual_network_swift_connection.html.markdown Co-authored-by: Tom Harvey Co-authored-by: Tom Harvey --- ...ual_network_swift_connection.html.markdown | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/website/docs/r/app_service_virtual_network_swift_connection.html.markdown b/website/docs/r/app_service_virtual_network_swift_connection.html.markdown index ec4bf2e09078..27e5e42ad45a 100644 --- a/website/docs/r/app_service_virtual_network_swift_connection.html.markdown +++ b/website/docs/r/app_service_virtual_network_swift_connection.html.markdown @@ -9,11 +9,27 @@ description: |- # azurerm_app_service_virtual_network_swift_connection -Manages an App Service Virtual Network Association (this is for the [Regional VNet Integration](https://docs.microsoft.com/azure/app-service/web-sites-integrate-with-vnet#regional-vnet-integration)). +Manages an App Service Virtual Network Association for [Regional VNet Integration](https://docs.microsoft.com/azure/app-service/web-sites-integrate-with-vnet#regional-vnet-integration). -~> **Note:** This resource can be used for both `azurerm_app_service` and `azurerm_function_app`. +This resource can be used for both App Services and Function Apps. -~> **Note:** There is a hard limit of [one VNet integration per App Service Plan](https://docs.microsoft.com/azure/app-service/web-sites-integrate-with-vnet#regional-vnet-integration). +~> **Note:** The following resources support associating the vNet for Regional vNet Integration directly on the resource and via the `azurerm_app_service_virtual_network_swift_connection` resource. You can't use both simultaneously. + + - [azurerm_linux_function_app](linux_function_app.html) + - [azurerm_linux_function_app_slot](linux_function_app_slot.html) + - [azurerm_linux_web_app](linux_web_app.html) + - [azurerm_linux_web_app_slot](linux_web_app_slot.html) + - [azurerm_logic_app_standard](logic_app_standard.html) + - [azurerm_windows_function_app](windows_function_app.html) + - [azurerm_windows_function_app_slot](windows_function_app_slot.html) + - [azurerm_windows_web_app](windows_web_app.html) + - [azurerm_windows_web_app_slot](windows_web_app_slot.html) + +This resource requires the `Microsoft.Network/virtualNetworks/subnets/write` permission scope on the subnet. + +The resource specific vNet integration requires the `Microsoft.Network/virtualNetworks/subnets/join/action` permission scope. + +There is a hard limit of [one VNet integration per App Service Plan](https://docs.microsoft.com/azure/app-service/web-sites-integrate-with-vnet#regional-vnet-integration). Multiple apps in the same App Service plan can use the same VNet. ## Example Usage (with App Service) From 87f9d189f6962eef03eb0129af44c29af4ec7184 Mon Sep 17 00:00:00 2001 From: Xiaxin <92154856+xiaxyi@users.noreply.github.com> Date: Tue, 2 Aug 2022 19:10:39 +0800 Subject: [PATCH 004/100] Fix test case for `azurerm_signalr_service` (#17835) * fix test case * update test case --- internal/services/signalr/signalr_service_resource_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/services/signalr/signalr_service_resource_test.go b/internal/services/signalr/signalr_service_resource_test.go index c65a989edb02..c5dd91b23421 100644 --- a/internal/services/signalr/signalr_service_resource_test.go +++ b/internal/services/signalr/signalr_service_resource_test.go @@ -611,11 +611,11 @@ resource "azurerm_signalr_service" "test" { capacity = 1 } - service_mode = "%s" + service_mode = "%[3]s" connectivity_logs_enabled = false messaging_logs_enabled = false } -`, data.RandomInteger, data.Locations.Primary) +`, data.RandomInteger, data.Locations.Primary, serviceMode) } func (r SignalRServiceResource) withUpstreamEndpoints(data acceptance.TestData) string { From 3e7ddffd6dbff7cdb8d6dfa8a25461314868cdc1 Mon Sep 17 00:00:00 2001 From: AlexPykavy <32162928+AlexPykavy@users.noreply.github.com> Date: Tue, 2 Aug 2022 14:09:53 +0200 Subject: [PATCH 005/100] Validate shared image identifier attributes (#17547) To fail fast during the plan stage if there are some violations. Co-authored-by: Alexander Pykavy --- .../services/compute/shared_image_resource.go | 21 ++++--- internal/services/compute/validate/compute.go | 20 ++++++ .../services/compute/validate/compute_test.go | 63 +++++++++++++++++++ 3 files changed, 95 insertions(+), 9 deletions(-) diff --git a/internal/services/compute/shared_image_resource.go b/internal/services/compute/shared_image_resource.go index 8f2372db0361..3142e04da68d 100644 --- a/internal/services/compute/shared_image_resource.go +++ b/internal/services/compute/shared_image_resource.go @@ -107,19 +107,22 @@ func resourceSharedImage() *pluginsdk.Resource { Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "publisher": { - Type: pluginsdk.TypeString, - ForceNew: true, - Required: true, + Type: pluginsdk.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: validate.SharedImageIdentifierAttribute, }, "offer": { - Type: pluginsdk.TypeString, - ForceNew: true, - Required: true, + Type: pluginsdk.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: validate.SharedImageIdentifierAttribute, }, "sku": { - Type: pluginsdk.TypeString, - ForceNew: true, - Required: true, + Type: pluginsdk.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: validate.SharedImageIdentifierAttribute, }, }, }, diff --git a/internal/services/compute/validate/compute.go b/internal/services/compute/validate/compute.go index 3b23edd19c41..8889538ad3bb 100644 --- a/internal/services/compute/validate/compute.go +++ b/internal/services/compute/validate/compute.go @@ -3,6 +3,7 @@ package validate import ( "fmt" "regexp" + "strings" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -40,6 +41,25 @@ func SharedImageName(v interface{}, k string) (warnings []string, errors []error return warnings, errors } +func SharedImageIdentifierAttribute(v interface{}, k string) (warnings []string, errors []error) { + value := v.(string) + + length := len(value) + if length > 128 { + errors = append(errors, fmt.Errorf("%s can be up to 128 characters, currently %d.", k, length)) + } + + if strings.HasSuffix(value, ".") { + errors = append(errors, fmt.Errorf("%q can not end with a '.', got %q", k, value)) + } + + if !regexp.MustCompile(`^[A-Za-z0-9._-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf("%s can only contain alphanumeric, full stops, dashes and underscores. Got %q.", k, value)) + } + + return warnings, errors +} + func SharedImageVersionName(v interface{}, k string) (warnings []string, errors []error) { value := v.(string) diff --git a/internal/services/compute/validate/compute_test.go b/internal/services/compute/validate/compute_test.go index f7773a8c8221..25774f291b87 100644 --- a/internal/services/compute/validate/compute_test.go +++ b/internal/services/compute/validate/compute_test.go @@ -123,6 +123,69 @@ func TestSharedImageName(t *testing.T) { } } +func TestSharedImageIdentifierAttribute(t *testing.T) { + cases := []struct { + Input string + ShouldError bool + }{ + { + Input: "", + ShouldError: true, + }, + { + Input: "hello", + ShouldError: false, + }, + { + Input: "hello.", + ShouldError: true, + }, + { + Input: "hello123", + ShouldError: false, + }, + { + Input: "hello.123", + ShouldError: false, + }, + { + Input: "hello,123", + ShouldError: true, + }, + { + Input: "hello_123", + ShouldError: false, + }, + { + Input: "hello-123", + ShouldError: false, + }, + { + Input: strings.Repeat("a", 128), + ShouldError: false, + }, + { + Input: strings.Repeat("a", 129), + ShouldError: true, + }, + } + + for _, tc := range cases { + t.Run(tc.Input, func(t *testing.T) { + _, errors := SharedImageIdentifierAttribute(tc.Input, "test") + + hasErrors := len(errors) > 0 + if !hasErrors && tc.ShouldError { + t.Fatalf("Expected an error but didn't get one for %q", tc.Input) + } + + if hasErrors && !tc.ShouldError { + t.Fatalf("Expected to get no errors for %q but got %d", tc.Input, len(errors)) + } + }) + } +} + func TestSharedImageVersionName(t *testing.T) { cases := []struct { Input string From 47dc45ea5fc4f56dc9bf18e4f228616fc7880443 Mon Sep 17 00:00:00 2001 From: stephybun Date: Tue, 2 Aug 2022 14:12:28 +0200 Subject: [PATCH 006/100] Update for #17547 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a108b16b42f5..48291f304f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ENHANCEMENTS: * `azurerm_linux_virtual_machine_scale_set` - the property `instances` is now Optional and defaults to `0` [GH-17836] * `azurerm_log_analytics_cluster` - updated validation for the `size_gb` property [GH-17780] * `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] +* `azurerm_shared_image` - improved validation for the `publisher`, `offer` and `sku` properties in the `identifier` block [GH-17547] BUG FIXES: From b6f38c06fed5b456e4f7c1e37d083ef54a919ab5 Mon Sep 17 00:00:00 2001 From: catriona-m <86247157+catriona-m@users.noreply.github.com> Date: Tue, 2 Aug 2022 13:37:13 +0100 Subject: [PATCH 007/100] gha - check for d.Get in delete and new CreateUpdates (#17830) * checks for d.Get in delete and new CreateUpdate * remove space --- .github/waiting-response.yml | 2 -- .github/workflows/issue-comment-created.yaml | 9 +++--- .github/workflows/pull-request-reviewed.yaml | 5 ++-- scripts/run-gradually-deprecated.sh | 29 ++++++++++++++++++++ 4 files changed, 35 insertions(+), 10 deletions(-) delete mode 100644 .github/waiting-response.yml diff --git a/.github/waiting-response.yml b/.github/waiting-response.yml deleted file mode 100644 index 9918d2ae5d17..000000000000 --- a/.github/waiting-response.yml +++ /dev/null @@ -1,2 +0,0 @@ -waiting-response: - - "*" \ No newline at end of file diff --git a/.github/workflows/issue-comment-created.yaml b/.github/workflows/issue-comment-created.yaml index d56f9a7de5b9..626be7cc4868 100644 --- a/.github/workflows/issue-comment-created.yaml +++ b/.github/workflows/issue-comment-created.yaml @@ -22,9 +22,8 @@ jobs: with: github_token: "${{ secrets.GITHUB_TOKEN }}" labels: waiting-response - - name: "Add waiting-response" - if: "contains(github.event.comment.body, ' /wr')" - shell: bash - run: | - curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos${{ github.owner }}/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels" -d '{"labels":["waiting-response"]}' + - uses: actions-ecosystem/action-add-labels@v1 + if: ${{ endsWith(github.event.comment.body, '/wr') }} + with: + labels: waiting-response diff --git a/.github/workflows/pull-request-reviewed.yaml b/.github/workflows/pull-request-reviewed.yaml index 88bdbaa75b9e..fb656a4a13b9 100644 --- a/.github/workflows/pull-request-reviewed.yaml +++ b/.github/workflows/pull-request-reviewed.yaml @@ -10,7 +10,6 @@ jobs: if: github.event.review.state != 'approved' runs-on: ubuntu-latest steps: - - uses: actions/labeler@v3 + - uses: actions-ecosystem/action-add-labels@v1 with: - configuration-path: .github/waiting-response.yml - repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file + labels: waiting-response \ No newline at end of file diff --git a/scripts/run-gradually-deprecated.sh b/scripts/run-gradually-deprecated.sh index 6881b2c05eba..86c5459c4729 100755 --- a/scripts/run-gradually-deprecated.sh +++ b/scripts/run-gradually-deprecated.sh @@ -56,6 +56,35 @@ function runGraduallyDeprecatedFunctions { exit 1 } + # check for new combined CreateUpdate methods + line=$(grep -H -n "Create:.*CreateUpdate," "$f" -m1) + if [ "$line" != "" ]; + then + git diff --diff-filter=AMRC origin/main -U0 "$f" | grep -q "+.*Create:.*CreateUpdate," && { + echo "$line" + echo "New Resources should no longer use combined CreateUpdate methods, please" + echo "split these into two separate Create and Update methods." + echo "" + echo "Existing resources can continue to use combined CreateUpdate methods" + echo "for the moment - but over time these will be split into separate Create and" + echo "Update methods." + exit 1 + } + fi + + # check for d.Get inside Delete + deleteFuncName=$(grep -o "Delete: .*," "$f" -m1 | grep -o " .*Delete") + if [ "$deleteFuncName" != "" ]; + then + deleteMethod=$(cat -n $f | sed -n -e "/func$deleteFuncName.*$/,/[[:digit:]]*\treturn nil/{ /func$deleteFuncName$/d; /[[:digit:]]*\treturn nil/d; p; }") + foundGet=$(echo "$deleteMethod" | grep "d\.Get(.*)" -m1) + if [ "$foundGet" != "" ]; + then + echo "$f $foundGet" + echo "Please do not use 'd.Get' within the Delete function as this does not work as expected in Delete" + exit 1 + fi + fi done } From bb74eca24ad40d5c07adce81880d0a6d4515029e Mon Sep 17 00:00:00 2001 From: diklatze Date: Tue, 2 Aug 2022 15:56:37 +0300 Subject: [PATCH 008/100] change sku tier to not force new (#17577) * change sku tier to ot force new * add test * Update internal/services/firewall/firewall_resource.go Co-authored-by: kt * Update internal/services/firewall/firewall_resource_test.go Co-authored-by: kt * add cost and upadated doc * add quotes to around sku value in test config Co-authored-by: Dikla Tzemah Weyl Co-authored-by: kt Co-authored-by: Steph --- .../services/firewall/firewall_resource.go | 1 - .../firewall/firewall_resource_test.go | 80 +++++++++++++++++++ website/docs/r/firewall.html.markdown | 2 +- 3 files changed, 81 insertions(+), 2 deletions(-) diff --git a/internal/services/firewall/firewall_resource.go b/internal/services/firewall/firewall_resource.go index e65975c52606..843cb7b0a5e8 100644 --- a/internal/services/firewall/firewall_resource.go +++ b/internal/services/firewall/firewall_resource.go @@ -74,7 +74,6 @@ func resourceFirewall() *pluginsdk.Resource { "sku_tier": { Type: pluginsdk.TypeString, Required: true, - ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ string(network.AzureFirewallSkuTierPremium), string(network.AzureFirewallSkuTierStandard), diff --git a/internal/services/firewall/firewall_resource_test.go b/internal/services/firewall/firewall_resource_test.go index a4b9b8a095ac..84b5ebdf6ccc 100644 --- a/internal/services/firewall/firewall_resource_test.go +++ b/internal/services/firewall/firewall_resource_test.go @@ -16,6 +16,9 @@ import ( type FirewallResource struct{} +const premium = "Premium" +const standard = "Standard" + func TestAccFirewall_basic(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_firewall", "test") r := FirewallResource{} @@ -194,6 +197,31 @@ func TestAccFirewall_withZones(t *testing.T) { }) } +func TestAccFirewall_skuTierUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_firewall", "test") + r := FirewallResource{} + skuTier := standard + skuTierUpdate := premium + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.withSkuTier(data, skuTier), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("sku_tier").HasValue("Standard"), + ), + }, + { + Config: r.withSkuTier(data, skuTierUpdate), + Check: acceptance.ComposeTestCheckFunc( + + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("sku_tier").HasValue("Premium"), + ), + }, + }) +} + func TestAccFirewall_withoutZone(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_firewall", "test") r := FirewallResource{} @@ -764,6 +792,58 @@ resource "azurerm_firewall" "test" { `, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger) } +func (FirewallResource) withSkuTier(data acceptance.TestData, skuTier string) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-fw-%d" + location = "%s" +} + +resource "azurerm_virtual_network" "test" { + name = "acctestvirtnet%d" + address_space = ["10.0.0.0/16"] + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name +} + +resource "azurerm_subnet" "test" { + name = "AzureFirewallSubnet" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.1.0/24"] +} + +resource "azurerm_public_ip" "test" { + name = "acctestpip%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + allocation_method = "Static" + sku = "Standard" + zones = [] +} + +resource "azurerm_firewall" "test" { + name = "acctestfirewall%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku_name = "AZFW_VNet" + sku_tier = "%s" + + ip_configuration { + name = "configuration" + subnet_id = azurerm_subnet.test.id + public_ip_address_id = azurerm_public_ip.test.id + } + + zones = [] +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, skuTier) +} + func (FirewallResource) withZones(data acceptance.TestData, zones []string) string { zoneString := strings.Join(zones, ",") return fmt.Sprintf(` diff --git a/website/docs/r/firewall.html.markdown b/website/docs/r/firewall.html.markdown index ae16b77bab5b..b83967d8c625 100644 --- a/website/docs/r/firewall.html.markdown +++ b/website/docs/r/firewall.html.markdown @@ -68,7 +68,7 @@ The following arguments are supported: * `sku_name` - (Required) SKU name of the Firewall. Possible values are `AZFW_Hub` and `AZFW_VNet`. Changing this forces a new resource to be created. -* `sku_tier` - (Required) SKU tier of the Firewall. Possible values are `Premium` and `Standard`. Changing this forces a new resource to be created. +* `sku_tier` - (Required) SKU tier of the Firewall. Possible values are `Premium` and `Standard`. * `firewall_policy_id` - (Optional) The ID of the Firewall Policy applied to this Firewall. From c4f693c48a17be62ddaf2b4f89803afc1187afc6 Mon Sep 17 00:00:00 2001 From: stephybun Date: Tue, 2 Aug 2022 15:00:13 +0200 Subject: [PATCH 009/100] Update for #17577 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48291f304f87..307c79cf720f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * Data Source: `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] +* `azurerm_firewall` - the property `sku_tier` is now updateable [GH-17577] * `azurerm_linux_virtual_machine_scale_set` - the property `instances` is now Optional and defaults to `0` [GH-17836] * `azurerm_log_analytics_cluster` - updated validation for the `size_gb` property [GH-17780] * `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] From 45b1f37ff17cbe5aad0a35e1bc334ba148466382 Mon Sep 17 00:00:00 2001 From: magodo Date: Tue, 2 Aug 2022 23:50:00 +0800 Subject: [PATCH 010/100] Upgrade API for domain service: 2020-01-01 -> 2021-05-01 (#17737) --- ...ve_directory_domain_service_data_source.go | 2 +- ...ory_domain_service_replica_set_resource.go | 2 +- ...ctive_directory_domain_service_resource.go | 2 +- .../active_directory_domain_service_test.go | 2 +- ...directory_domain_service_trust_resource.go | 2 +- ...tory_domain_service_trust_resource_test.go | 2 +- .../services/domainservices/client/client.go | 2 +- .../domainservices/README.md | 6 +- .../domainservices/client.go | 0 .../domainservices/constants.go | 96 +++++++++++++++++++ .../domainservices/id_domainservice.go | 0 .../method_createorupdate_autorest.go | 0 .../domainservices/method_delete_autorest.go | 0 .../domainservices/method_get_autorest.go | 0 .../domainservices/method_list_autorest.go | 0 .../method_listbyresourcegroup_autorest.go | 0 .../domainservices/method_update_autorest.go | 0 .../domainservices/model_configdiagnostics.go | 9 ++ .../model_configdiagnosticsvalidatorresult.go | 11 +++ ...l_configdiagnosticsvalidatorresultissue.go | 9 ++ .../model_domainsecuritysettings.go | 2 + .../domainservices/model_domainservice.go | 5 + .../model_domainserviceproperties.go | 1 + .../domainservices/model_foresttrust.go | 0 .../domainservices/model_healthalert.go | 0 .../domainservices/model_healthmonitor.go | 0 .../domainservices/model_ldapssettings.go | 0 .../domainservices/model_migrationprogress.go | 0 .../model_migrationproperties.go | 0 .../model_notificationsettings.go | 0 .../domainservices/model_replicaset.go | 0 .../model_resourceforestsettings.go | 0 .../domainservices/predicates.go | 0 .../domainservices/version.go | 2 +- vendor/modules.txt | 2 +- 35 files changed, 145 insertions(+), 12 deletions(-) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/README.md (93%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/constants.go (74%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/id_domainservice.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/method_createorupdate_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/method_delete_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/method_get_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/method_list_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/method_listbyresourcegroup_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/method_update_autorest.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnostics.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnosticsvalidatorresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnosticsvalidatorresultissue.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_domainsecuritysettings.go (78%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_domainservice.go (81%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_domainserviceproperties.go (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_foresttrust.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_healthalert.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_healthmonitor.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_ldapssettings.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_migrationprogress.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_migrationproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_notificationsettings.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_replicaset.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/model_resourceforestsettings.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/{2020-01-01 => 2021-05-01}/domainservices/version.go (88%) diff --git a/internal/services/domainservices/active_directory_domain_service_data_source.go b/internal/services/domainservices/active_directory_domain_service_data_source.go index b4f5164102bd..2a8321b17ed4 100644 --- a/internal/services/domainservices/active_directory_domain_service_data_source.go +++ b/internal/services/domainservices/active_directory_domain_service_data_source.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices" + "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" diff --git a/internal/services/domainservices/active_directory_domain_service_replica_set_resource.go b/internal/services/domainservices/active_directory_domain_service_replica_set_resource.go index be618d756190..9d5a88fe02f5 100644 --- a/internal/services/domainservices/active_directory_domain_service_replica_set_resource.go +++ b/internal/services/domainservices/active_directory_domain_service_replica_set_resource.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices" + "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/domainservices/active_directory_domain_service_resource.go b/internal/services/domainservices/active_directory_domain_service_resource.go index bc20602d5e11..e6a12fec48d9 100644 --- a/internal/services/domainservices/active_directory_domain_service_resource.go +++ b/internal/services/domainservices/active_directory_domain_service_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices" + "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/domainservices/active_directory_domain_service_test.go b/internal/services/domainservices/active_directory_domain_service_test.go index da7e5106e7de..4ff74847bcb5 100644 --- a/internal/services/domainservices/active_directory_domain_service_test.go +++ b/internal/services/domainservices/active_directory_domain_service_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices" + "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" diff --git a/internal/services/domainservices/active_directory_domain_service_trust_resource.go b/internal/services/domainservices/active_directory_domain_service_trust_resource.go index ce1818d6f9ac..f3082a2dc692 100644 --- a/internal/services/domainservices/active_directory_domain_service_trust_resource.go +++ b/internal/services/domainservices/active_directory_domain_service_trust_resource.go @@ -7,7 +7,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices" + "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/domainservices/parse" diff --git a/internal/services/domainservices/active_directory_domain_service_trust_resource_test.go b/internal/services/domainservices/active_directory_domain_service_trust_resource_test.go index 421c20aeffc2..629d2571ff2d 100644 --- a/internal/services/domainservices/active_directory_domain_service_trust_resource_test.go +++ b/internal/services/domainservices/active_directory_domain_service_trust_resource_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices" + "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" diff --git a/internal/services/domainservices/client/client.go b/internal/services/domainservices/client/client.go index 93103266b92f..e83f747a2938 100644 --- a/internal/services/domainservices/client/client.go +++ b/internal/services/domainservices/client/client.go @@ -1,7 +1,7 @@ package client import ( - "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices" + "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/README.md similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/README.md index a647b8b032c0..9aaf46050e08 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices` Documentation -The `domainservices` SDK allows for interaction with the Azure Resource Manager Service `aad` (API Version `2020-01-01`). +The `domainservices` SDK allows for interaction with the Azure Resource Manager Service `aad` (API Version `2021-05-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/aad/2020-01-01/domainservices" +import "github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/constants.go similarity index 74% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/constants.go index 000ced62559e..606ee7bed57f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/constants.go @@ -61,6 +61,62 @@ func parseFilteredSync(input string) (*FilteredSync, error) { return &out, nil } +type KerberosArmoring string + +const ( + KerberosArmoringDisabled KerberosArmoring = "Disabled" + KerberosArmoringEnabled KerberosArmoring = "Enabled" +) + +func PossibleValuesForKerberosArmoring() []string { + return []string{ + string(KerberosArmoringDisabled), + string(KerberosArmoringEnabled), + } +} + +func parseKerberosArmoring(input string) (*KerberosArmoring, error) { + vals := map[string]KerberosArmoring{ + "disabled": KerberosArmoringDisabled, + "enabled": KerberosArmoringEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KerberosArmoring(input) + return &out, nil +} + +type KerberosRc4Encryption string + +const ( + KerberosRc4EncryptionDisabled KerberosRc4Encryption = "Disabled" + KerberosRc4EncryptionEnabled KerberosRc4Encryption = "Enabled" +) + +func PossibleValuesForKerberosRc4Encryption() []string { + return []string{ + string(KerberosRc4EncryptionDisabled), + string(KerberosRc4EncryptionEnabled), + } +} + +func parseKerberosRc4Encryption(input string) (*KerberosRc4Encryption, error) { + vals := map[string]KerberosRc4Encryption{ + "disabled": KerberosRc4EncryptionDisabled, + "enabled": KerberosRc4EncryptionEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KerberosRc4Encryption(input) + return &out, nil +} + type Ldaps string const ( @@ -173,6 +229,46 @@ func parseNtlmV1(input string) (*NtlmV1, error) { return &out, nil } +type Status string + +const ( + StatusFailure Status = "Failure" + StatusNone Status = "None" + StatusOK Status = "OK" + StatusRunning Status = "Running" + StatusSkipped Status = "Skipped" + StatusWarning Status = "Warning" +) + +func PossibleValuesForStatus() []string { + return []string{ + string(StatusFailure), + string(StatusNone), + string(StatusOK), + string(StatusRunning), + string(StatusSkipped), + string(StatusWarning), + } +} + +func parseStatus(input string) (*Status, error) { + vals := map[string]Status{ + "failure": StatusFailure, + "none": StatusNone, + "ok": StatusOK, + "running": StatusRunning, + "skipped": StatusSkipped, + "warning": StatusWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Status(input) + return &out, nil +} + type SyncKerberosPasswords string const ( diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/id_domainservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/id_domainservice.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_createorupdate_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_createorupdate_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_createorupdate_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_delete_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_delete_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_delete_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_get_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_get_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_get_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_list_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_list_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_list_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_listbyresourcegroup_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_listbyresourcegroup_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_listbyresourcegroup_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_update_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/method_update_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_update_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnostics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnostics.go new file mode 100644 index 000000000000..4bd1c047c3a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnostics.go @@ -0,0 +1,9 @@ +package domainservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigDiagnostics struct { + LastExecuted *string `json:"lastExecuted,omitempty"` + ValidatorResults *[]ConfigDiagnosticsValidatorResult `json:"validatorResults,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnosticsvalidatorresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnosticsvalidatorresult.go new file mode 100644 index 000000000000..25159b76c0ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnosticsvalidatorresult.go @@ -0,0 +1,11 @@ +package domainservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigDiagnosticsValidatorResult struct { + Issues *[]ConfigDiagnosticsValidatorResultIssue `json:"issues,omitempty"` + ReplicaSetSubnetDisplayName *string `json:"replicaSetSubnetDisplayName,omitempty"` + Status *Status `json:"status,omitempty"` + ValidatorId *string `json:"validatorId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnosticsvalidatorresultissue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnosticsvalidatorresultissue.go new file mode 100644 index 000000000000..f7cfa21f854d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_configdiagnosticsvalidatorresultissue.go @@ -0,0 +1,9 @@ +package domainservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigDiagnosticsValidatorResultIssue struct { + DescriptionParams *[]string `json:"descriptionParams,omitempty"` + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_domainsecuritysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_domainsecuritysettings.go similarity index 78% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_domainsecuritysettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_domainsecuritysettings.go index 615c6db89039..e96833e181e7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_domainsecuritysettings.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_domainsecuritysettings.go @@ -4,6 +4,8 @@ package domainservices // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DomainSecuritySettings struct { + KerberosArmoring *KerberosArmoring `json:"kerberosArmoring,omitempty"` + KerberosRc4Encryption *KerberosRc4Encryption `json:"kerberosRc4Encryption,omitempty"` NtlmV1 *NtlmV1 `json:"ntlmV1,omitempty"` SyncKerberosPasswords *SyncKerberosPasswords `json:"syncKerberosPasswords,omitempty"` SyncNtlmPasswords *SyncNtlmPasswords `json:"syncNtlmPasswords,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_domainservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_domainservice.go similarity index 81% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_domainservice.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_domainservice.go index 358faf586a70..01e872cfa6dd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_domainservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_domainservice.go @@ -1,5 +1,9 @@ package domainservices +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -9,6 +13,7 @@ type DomainService struct { Location *string `json:"location,omitempty"` Name *string `json:"name,omitempty"` Properties *DomainServiceProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_domainserviceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_domainserviceproperties.go similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_domainserviceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_domainserviceproperties.go index 98090afe2d7c..9825521dce65 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_domainserviceproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_domainserviceproperties.go @@ -4,6 +4,7 @@ package domainservices // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DomainServiceProperties struct { + ConfigDiagnostics *ConfigDiagnostics `json:"configDiagnostics,omitempty"` DeploymentId *string `json:"deploymentId,omitempty"` DomainConfigurationType *string `json:"domainConfigurationType,omitempty"` DomainName *string `json:"domainName,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_foresttrust.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_foresttrust.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_foresttrust.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_foresttrust.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_healthalert.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_healthalert.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_healthalert.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_healthalert.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_healthmonitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_healthmonitor.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_healthmonitor.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_healthmonitor.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_ldapssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_ldapssettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_ldapssettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_ldapssettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_migrationprogress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_migrationprogress.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_migrationprogress.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_migrationprogress.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_migrationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_migrationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_migrationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_migrationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_notificationsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_notificationsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_notificationsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_notificationsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_replicaset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_replicaset.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_replicaset.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_replicaset.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_resourceforestsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_resourceforestsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/model_resourceforestsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/model_resourceforestsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/version.go index 983028832103..5bd9e4b8ecd5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/version.go @@ -5,7 +5,7 @@ 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 = "2020-01-01" +const defaultApiVersion = "2021-05-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/domainservices/%s", defaultApiVersion) diff --git a/vendor/modules.txt b/vendor/modules.txt index dd20050d6d83..a0f543d204c5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -193,7 +193,7 @@ github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage # github.com/hashicorp/go-azure-sdk v0.20220725.1163004 ## explicit; go 1.18 -github.com/hashicorp/go-azure-sdk/resource-manager/aad/2020-01-01/domainservices +github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices 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 github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores From 9d4d0bfd5ab4f2b0ee98b222fcd6b7002c9d656a Mon Sep 17 00:00:00 2001 From: kt Date: Tue, 2 Aug 2022 08:52:54 -0700 Subject: [PATCH 011/100] CHANGELOG #17737 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 307c79cf720f..114d490a0aca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* domainservice: updating to use API Version `2021-05-01` [GH-17737] * Data Source: `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] * `azurerm_firewall` - the property `sku_tier` is now updateable [GH-17577] * `azurerm_linux_virtual_machine_scale_set` - the property `instances` is now Optional and defaults to `0` [GH-17836] From 132f1ed008b7727e34cbee4895468629d1ef2e56 Mon Sep 17 00:00:00 2001 From: Neil Ye Date: Tue, 2 Aug 2022 23:53:34 +0800 Subject: [PATCH 012/100] azurerm_subnet - support new service for delegation (#17796) --- internal/services/network/subnet_resource.go | 2 + .../services/network/subnet_resource_test.go | 47 +++++++++++++++++++ website/docs/r/subnet.html.markdown | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/internal/services/network/subnet_resource.go b/internal/services/network/subnet_resource.go index 4b59b47d7608..7f636ec5ede0 100644 --- a/internal/services/network/subnet_resource.go +++ b/internal/services/network/subnet_resource.go @@ -131,6 +131,8 @@ func resourceSubnet() *pluginsdk.Resource { "Microsoft.Synapse/workspaces", "Microsoft.Web/hostingEnvironments", "Microsoft.Web/serverFarms", + "NGINX.NGINXPLUS/nginxDeployments", + "PaloAltoNetworks.Cloudngfw/firewalls", }, false), }, diff --git a/internal/services/network/subnet_resource_test.go b/internal/services/network/subnet_resource_test.go index 234ca72420fa..26beaec0cf06 100644 --- a/internal/services/network/subnet_resource_test.go +++ b/internal/services/network/subnet_resource_test.go @@ -300,6 +300,28 @@ func TestAccSubnet_updateAddressPrefix(t *testing.T) { }) } +func TestAccSubnet_updateServiceDelegation(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_subnet", "test") + r := SubnetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.updateServiceDelegation(data, "NGINX.NGINXPLUS/nginxDeployments"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.updateServiceDelegation(data, "PaloAltoNetworks.Cloudngfw/firewalls"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func (t SubnetResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { id, err := parse.SubnetID(state.ID) if err != nil { @@ -663,6 +685,31 @@ resource "azurerm_subnet" "test" { `, r.template(data)) } +func (r SubnetResource) updateServiceDelegation(data acceptance.TestData, serviceName string) string { + return fmt.Sprintf(` +%s + +resource "azurerm_subnet" "test" { + name = "internal" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.2.0/24"] + + delegation { + name = "first" + + service_delegation { + name = "%s" + + actions = [ + "Microsoft.Network/virtualNetworks/subnets/join/action", + ] + } + } +} +`, r.template(data), serviceName) +} + func (SubnetResource) template(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/website/docs/r/subnet.html.markdown b/website/docs/r/subnet.html.markdown index 1ae4e7397f14..55967cf56aeb 100644 --- a/website/docs/r/subnet.html.markdown +++ b/website/docs/r/subnet.html.markdown @@ -91,7 +91,7 @@ A `service_delegation` block supports the following: -> **NOTE:** Delegating to services may not be available in all regions. Check that the service you are delegating to is available in your region using the [Azure CLI](https://docs.microsoft.com/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). Also, `actions` is specific to each service type. The exact list of `actions` needs to be retrieved using the aforementioned [Azure CLI](https://docs.microsoft.com/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). -* `name` - (Required) The name of service to delegate to. Possible values include `Microsoft.ApiManagement/service`, `Microsoft.AzureCosmosDB/clusters`, `Microsoft.BareMetal/AzureVMware`, `Microsoft.BareMetal/CrayServers`, `Microsoft.Batch/batchAccounts`, `Microsoft.ContainerInstance/containerGroups`, `Microsoft.ContainerService/managedClusters`, `Microsoft.Databricks/workspaces`, `Microsoft.DBforMySQL/flexibleServers`, `Microsoft.DBforMySQL/serversv2`, `Microsoft.DBforPostgreSQL/flexibleServers`, `Microsoft.DBforPostgreSQL/serversv2`, `Microsoft.DBforPostgreSQL/singleServers`, `Microsoft.HardwareSecurityModules/dedicatedHSMs`, `Microsoft.Kusto/clusters`, `Microsoft.Logic/integrationServiceEnvironments`, `Microsoft.MachineLearningServices/workspaces`, `Microsoft.Netapp/volumes`, `Microsoft.Network/managedResolvers`, `Microsoft.PowerPlatform/vnetaccesslinks`, `Microsoft.ServiceFabricMesh/networks`, `Microsoft.Sql/managedInstances`, `Microsoft.Sql/servers`, `Microsoft.StoragePool/diskPools`, `Microsoft.StreamAnalytics/streamingJobs`, `Microsoft.Synapse/workspaces`, `Microsoft.Web/hostingEnvironments`, and `Microsoft.Web/serverFarms`. +* `name` - (Required) The name of service to delegate to. Possible values include `Microsoft.ApiManagement/service`, `Microsoft.AzureCosmosDB/clusters`, `Microsoft.BareMetal/AzureVMware`, `Microsoft.BareMetal/CrayServers`, `Microsoft.Batch/batchAccounts`, `Microsoft.ContainerInstance/containerGroups`, `Microsoft.ContainerService/managedClusters`, `Microsoft.Databricks/workspaces`, `Microsoft.DBforMySQL/flexibleServers`, `Microsoft.DBforMySQL/serversv2`, `Microsoft.DBforPostgreSQL/flexibleServers`, `Microsoft.DBforPostgreSQL/serversv2`, `Microsoft.DBforPostgreSQL/singleServers`, `Microsoft.HardwareSecurityModules/dedicatedHSMs`, `Microsoft.Kusto/clusters`, `Microsoft.Logic/integrationServiceEnvironments`, `Microsoft.MachineLearningServices/workspaces`, `Microsoft.Netapp/volumes`, `Microsoft.Network/managedResolvers`, `Microsoft.PowerPlatform/vnetaccesslinks`, `Microsoft.ServiceFabricMesh/networks`, `Microsoft.Sql/managedInstances`, `Microsoft.Sql/servers`, `Microsoft.StoragePool/diskPools`, `Microsoft.StreamAnalytics/streamingJobs`, `Microsoft.Synapse/workspaces`, `Microsoft.Web/hostingEnvironments`, `Microsoft.Web/serverFarms`, `NGINX.NGINXPLUS/nginxDeployments` and `PaloAltoNetworks.Cloudngfw/firewalls`. * `actions` - (Optional) A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values include `Microsoft.Network/networkinterfaces/*`, `Microsoft.Network/virtualNetworks/subnets/action`, `Microsoft.Network/virtualNetworks/subnets/join/action`, `Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action` and `Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action`. From 4ece915bc5c5fdb1acad90cd21110d0b90afd154 Mon Sep 17 00:00:00 2001 From: Yichun Ma Date: Wed, 3 Aug 2022 00:01:55 +0800 Subject: [PATCH 013/100] `r\mssql_virtual_machine`: add state refresh for `auto_patching` (#17203) --- .../mssql/mssql_virtual_machine_resource.go | 73 ++++++++++++++++++- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/internal/services/mssql/mssql_virtual_machine_resource.go b/internal/services/mssql/mssql_virtual_machine_resource.go index a87ba5565bcb..19c25b180b14 100644 --- a/internal/services/mssql/mssql_virtual_machine_resource.go +++ b/internal/services/mssql/mssql_virtual_machine_resource.go @@ -409,6 +409,29 @@ func resourceMsSqlVirtualMachineCreateUpdate(d *pluginsdk.ResourceData, meta int } } + // Wait for the auto patching settings to take effect + // See: https://github.com/Azure/azure-rest-api-specs/issues/12818 + if autoPatching := d.Get("auto_patching"); (d.IsNewResource() && len(autoPatching.([]interface{})) > 0) || (!d.IsNewResource() && d.HasChange("auto_patching")) { + log.Printf("[DEBUG] Waiting for SQL Virtual Machine %q AutoPatchingSettings to take effect", d.Id()) + stateConf := &pluginsdk.StateChangeConf{ + Pending: []string{"Retry", "Pending"}, + Target: []string{"Updated"}, + Refresh: resourceMsSqlVirtualMachineAutoPatchingSettingsRefreshFunc(ctx, client, d), + MinTimeout: 1 * time.Minute, + ContinuousTargetOccurence: 2, + } + + if d.IsNewResource() { + stateConf.Timeout = d.Timeout(pluginsdk.TimeoutCreate) + } else { + stateConf.Timeout = d.Timeout(pluginsdk.TimeoutUpdate) + } + + if _, err := stateConf.WaitForStateContext(ctx); err != nil { + return fmt.Errorf("waiting for SQL Virtual Machine %q AutoPatchingSettings to take effect: %+v", d.Id(), err) + } + } + return resourceMsSqlVirtualMachineRead(d, meta) } @@ -688,6 +711,48 @@ func flattenSqlVirtualMachineAutoBackup(autoBackup *sqlvirtualmachines.AutoBacku } } +func resourceMsSqlVirtualMachineAutoPatchingSettingsRefreshFunc(ctx context.Context, client *sqlvirtualmachines.SqlVirtualMachinesClient, d *pluginsdk.ResourceData) pluginsdk.StateRefreshFunc { + return func() (interface{}, string, error) { + id, err := sqlvirtualmachines.ParseSqlVirtualMachineID(d.Id()) + if err != nil { + return nil, "Error", err + } + + resp, err := client.Get(ctx, *id, sqlvirtualmachines.GetOperationOptions{Expand: utils.String("*")}) + if err != nil { + return nil, "Retry", err + } + + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + autoPatchingSettings := flattenSqlVirtualMachineAutoPatching(props.AutoPatchingSettings) + + if len(autoPatchingSettings) == 0 { + if v, ok := d.GetOk("auto_patching"); !ok || len(v.([]interface{})) == 0 { + return resp, "Updated", nil + } + return resp, "Pending", nil + } + + if v, ok := d.GetOk("auto_patching"); !ok || len(v.([]interface{})) == 0 { + return resp, "Pending", nil + } + + for prop, val := range autoPatchingSettings[0].(map[string]interface{}) { + v := d.Get(fmt.Sprintf("auto_patching.0.%s", prop)) + if v != val { + return resp, "Pending", nil + } + } + + return resp, "Updated", nil + } + } + + return resp, "Retry", nil + } +} + func expandSqlVirtualMachineAutoPatchingSettings(input []interface{}) *sqlvirtualmachines.AutoPatchingSettings { if len(input) == 0 { return nil @@ -709,14 +774,14 @@ func flattenSqlVirtualMachineAutoPatching(autoPatching *sqlvirtualmachines.AutoP return []interface{}{} } - var startHour int64 + var startHour int if autoPatching.MaintenanceWindowStartingHour != nil { - startHour = *autoPatching.MaintenanceWindowStartingHour + startHour = int(*autoPatching.MaintenanceWindowStartingHour) } - var duration int64 + var duration int if autoPatching.MaintenanceWindowDuration != nil { - duration = *autoPatching.MaintenanceWindowDuration + duration = int(*autoPatching.MaintenanceWindowDuration) } var dayOfWeek string From e97e2119defd9146ea48e44c89ddb3748580eddb Mon Sep 17 00:00:00 2001 From: Xiaxin <92154856+xiaxyi@users.noreply.github.com> Date: Wed, 3 Aug 2022 00:02:41 +0800 Subject: [PATCH 014/100] Updating Eventhub as the log analytics destination (#17668) --- .../log_analytics_data_export_resource.go | 43 +++++- ...log_analytics_data_export_resource_test.go | 47 ++++++- .../2021-06-22/automationaccount/README.md | 128 ++++++++++++++++++ 3 files changed, 212 insertions(+), 6 deletions(-) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/README.md diff --git a/internal/services/loganalytics/log_analytics_data_export_resource.go b/internal/services/loganalytics/log_analytics_data_export_resource.go index ea975f3c9f65..96f1ed9e98ef 100644 --- a/internal/services/loganalytics/log_analytics_data_export_resource.go +++ b/internal/services/loganalytics/log_analytics_data_export_resource.go @@ -3,9 +3,12 @@ package loganalytics import ( "fmt" "log" + "strings" "time" "github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2020-08-01/operationalinsights" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -107,16 +110,30 @@ func resourceOperationalinsightsDataExportCreateUpdate(d *pluginsdk.ResourceData } } + destinationId := d.Get("destination_resource_id").(string) + parameters := operationalinsights.DataExport{ DataExportProperties: &operationalinsights.DataExportProperties{ Destination: &operationalinsights.Destination{ - ResourceID: utils.String(d.Get("destination_resource_id").(string)), + ResourceID: utils.String(destinationId), }, TableNames: utils.ExpandStringSlice(d.Get("table_names").(*pluginsdk.Set).List()), Enable: utils.Bool(d.Get("enabled").(bool)), }, } + if strings.Contains(destinationId, "Microsoft.EventHub") { + eventhubId, err := eventhubs.ParseEventhubID(destinationId) + if err != nil { + return fmt.Errorf("parsing destination eventhub id error: %+v", err) + } + destinationId = namespaces.NewNamespaceID(eventhubId.SubscriptionId, eventhubId.ResourceGroupName, eventhubId.NamespaceName).ID() + parameters.DataExportProperties.Destination.ResourceID = utils.String(destinationId) + parameters.DataExportProperties.Destination.DestinationMetaData = &operationalinsights.DestinationMetaData{ + EventHubName: utils.String(eventhubId.EventHubName), + } + } + if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.WorkspaceName, id.DataexportName, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } @@ -149,7 +166,12 @@ func resourceOperationalinsightsDataExportRead(d *pluginsdk.ResourceData, meta i d.Set("workspace_resource_id", parse.NewLogAnalyticsWorkspaceID(id.SubscriptionId, id.ResourceGroup, id.WorkspaceName).ID()) if props := resp.DataExportProperties; props != nil { d.Set("export_rule_id", props.DataExportID) - d.Set("destination_resource_id", flattenDataExportDestination(props.Destination)) + + destinationId, err := flattenDataExportDestination(props.Destination) + if err != nil { + return fmt.Errorf("flattening destination ID error: %+v", err) + } + d.Set("destination_resource_id", destinationId) d.Set("enabled", props.Enable) d.Set("table_names", utils.FlattenStringSlice(props.TableNames)) } @@ -172,15 +194,26 @@ func resourceOperationalinsightsDataExportDelete(d *pluginsdk.ResourceData, meta return nil } -func flattenDataExportDestination(input *operationalinsights.Destination) string { +func flattenDataExportDestination(input *operationalinsights.Destination) (string, error) { if input == nil { - return "" + return "", nil } var resourceID string if input.ResourceID != nil { resourceID = *input.ResourceID + if input.Type == operationalinsights.TypeEventHub { + if input.DestinationMetaData != nil && input.DestinationMetaData.EventHubName != nil { + eventhubName := *input.DestinationMetaData.EventHubName + eventhubNamespaceId, err := eventhubs.ParseNamespaceID(resourceID) + eventhubId := eventhubs.NewEventhubID(eventhubNamespaceId.SubscriptionId, eventhubNamespaceId.ResourceGroupName, eventhubNamespaceId.NamespaceName, eventhubName) + if err != nil { + return "", fmt.Errorf("parsing destination eventhub namespace ID error") + } + resourceID = eventhubId.ID() + } + } } - return resourceID + return resourceID, nil } diff --git a/internal/services/loganalytics/log_analytics_data_export_resource_test.go b/internal/services/loganalytics/log_analytics_data_export_resource_test.go index 264f82c0c0e3..fc2dc003238a 100644 --- a/internal/services/loganalytics/log_analytics_data_export_resource_test.go +++ b/internal/services/loganalytics/log_analytics_data_export_resource_test.go @@ -85,6 +85,21 @@ func TestAccLogAnalyticsDataExportRule_complete(t *testing.T) { }) } +func TestAccLogAnalyticsDataExportRule_toEventhubs(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_log_analytics_data_export_rule", "test") + r := LogAnalyticsDataExportRuleResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.toEventHub(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func (t LogAnalyticsDataExportRuleResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { id, err := parse.LogAnalyticsDataExportID(state.ID) if err != nil { @@ -125,7 +140,22 @@ resource "azurerm_storage_account" "test" { account_tier = "Standard" account_replication_type = "LRS" } -`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomString) + +resource "azurerm_eventhub_namespace" "test" { + name = "acctest-EHN-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku = "Standard" +} + +resource "azurerm_eventhub" "test" { + name = "acctest-EH-%d" + namespace_name = azurerm_eventhub_namespace.test.name + resource_group_name = azurerm_resource_group.test.name + partition_count = 2 + message_retention = 7 +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomString, data.RandomInteger, data.RandomInteger) } func (r LogAnalyticsDataExportRuleResource) basic(data acceptance.TestData) string { @@ -184,3 +214,18 @@ resource "azurerm_log_analytics_data_export_rule" "test" { } `, r.template(data), data.RandomInteger) } + +func (r LogAnalyticsDataExportRuleResource) toEventHub(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_log_analytics_data_export_rule" "test" { + name = "acctest-DER-%d" + resource_group_name = azurerm_resource_group.test.name + workspace_resource_id = azurerm_log_analytics_workspace.test.id + destination_resource_id = azurerm_eventhub.test.id + table_names = ["Heartbeat"] + enabled = true +} +`, r.template(data), data.RandomInteger) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/README.md new file mode 100644 index 000000000000..f0e30e273d51 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/README.md @@ -0,0 +1,128 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount` Documentation + +The `automationaccount` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2021-06-22`). + +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/automation/2021-06-22/automationaccount" +``` + + +### Client Initialization + +```go +client := automationaccount.NewAutomationAccountClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AutomationAccountClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := automationaccount.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue") + +payload := automationaccount.AutomationAccountCreateOrUpdateParameters{ + // ... +} + + +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: `AutomationAccountClient.Delete` + +```go +ctx := context.TODO() +id := automationaccount.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue") + +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: `AutomationAccountClient.Get` + +```go +ctx := context.TODO() +id := automationaccount.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue") + +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: `AutomationAccountClient.List` + +```go +ctx := context.TODO() +id := automationaccount.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AutomationAccountClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := automationaccount.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AutomationAccountClient.Update` + +```go +ctx := context.TODO() +id := automationaccount.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue") + +payload := automationaccount.AutomationAccountUpdateParameters{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` From 4620cb506b866b649c7f666e54ba2431825a2475 Mon Sep 17 00:00:00 2001 From: catriona-m <86247157+catriona-m@users.noreply.github.com> Date: Tue, 2 Aug 2022 17:36:30 +0100 Subject: [PATCH 015/100] add github token to wating-response labeler (#17849) --- .github/workflows/issue-comment-created.yaml | 1 + .github/workflows/pull-request-reviewed.yaml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issue-comment-created.yaml b/.github/workflows/issue-comment-created.yaml index 626be7cc4868..d11a8adb1162 100644 --- a/.github/workflows/issue-comment-created.yaml +++ b/.github/workflows/issue-comment-created.yaml @@ -26,4 +26,5 @@ jobs: if: ${{ endsWith(github.event.comment.body, '/wr') }} with: labels: waiting-response + github_token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pull-request-reviewed.yaml b/.github/workflows/pull-request-reviewed.yaml index fb656a4a13b9..8eb4e6d63a4c 100644 --- a/.github/workflows/pull-request-reviewed.yaml +++ b/.github/workflows/pull-request-reviewed.yaml @@ -12,4 +12,5 @@ jobs: steps: - uses: actions-ecosystem/action-add-labels@v1 with: - labels: waiting-response \ No newline at end of file + labels: waiting-response + github_token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file From 856b397e89c671df57726188fb50fadc67ddb414 Mon Sep 17 00:00:00 2001 From: Jiawei Tao Date: Wed, 3 Aug 2022 10:56:12 +0800 Subject: [PATCH 016/100] Network: Add support for orbitalGateway --- internal/services/network/subnet_resource.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/services/network/subnet_resource.go b/internal/services/network/subnet_resource.go index 4b59b47d7608..4467203f3ef2 100644 --- a/internal/services/network/subnet_resource.go +++ b/internal/services/network/subnet_resource.go @@ -131,6 +131,7 @@ func resourceSubnet() *pluginsdk.Resource { "Microsoft.Synapse/workspaces", "Microsoft.Web/hostingEnvironments", "Microsoft.Web/serverFarms", + "Microsoft.Orbital/orbitalGateway", }, false), }, From b4f0888a820e7e57b742f58c74da645eebb4c07c Mon Sep 17 00:00:00 2001 From: Tom Harvey Date: Wed, 3 Aug 2022 12:33:32 +0200 Subject: [PATCH 017/100] updating to include #17854 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 114d490a0aca..aa8692fd9707 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: * `azurerm_log_analytics_cluster` - updated validation for the `size_gb` property [GH-17780] * `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] * `azurerm_shared_image` - improved validation for the `publisher`, `offer` and `sku` properties in the `identifier` block [GH-17547] +* `azurerm_subnet` - support for the service delegation `Microsoft.Orbital/orbitalGateway` [GH-17854] BUG FIXES: From d3fcfc296fa098b8f46b50793df711e44d0dd0e4 Mon Sep 17 00:00:00 2001 From: Tao <104055472+teowa@users.noreply.github.com> Date: Wed, 3 Aug 2022 20:21:08 +0800 Subject: [PATCH 018/100] fix doc of data collection rule (#17857) --- website/docs/r/monitor_data_collection_rule.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/monitor_data_collection_rule.html.markdown b/website/docs/r/monitor_data_collection_rule.html.markdown index 0fc117fc7ca6..a9a305eb0e32 100644 --- a/website/docs/r/monitor_data_collection_rule.html.markdown +++ b/website/docs/r/monitor_data_collection_rule.html.markdown @@ -72,7 +72,7 @@ resource "azurerm_monitor_data_collection_rule" "example" { performance_counter { streams = ["Microsoft-Perf", "Microsoft-InsightsMetrics"] sampling_frequency_in_seconds = 10 - counter_specifiers = ["Processor(*)\\%% Processor Time"] + counter_specifiers = ["Processor(*)\\% Processor Time"] name = "test-datasource-perfcounter" } @@ -98,7 +98,7 @@ resource "azurerm_monitor_data_collection_rule" "example" { tags = { foo = "bar" } - depend_on = [ + depends_on = [ azurerm_log_analytics_solution.example ] } From d1c989b6aefb84a5f264ac7555e3cc6a1c1235e2 Mon Sep 17 00:00:00 2001 From: Heng Lu <79895375+ms-henglu@users.noreply.github.com> Date: Wed, 3 Aug 2022 20:24:56 +0800 Subject: [PATCH 019/100] `azurerm_kubernetes_cluster` - fix failed tests (#17861) --- .../containers/kubernetes_cluster_other_resource_test.go | 2 +- .../services/containers/kubernetes_cluster_resource_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/services/containers/kubernetes_cluster_other_resource_test.go b/internal/services/containers/kubernetes_cluster_other_resource_test.go index e319eb8d09bb..b36176c0d2d3 100644 --- a/internal/services/containers/kubernetes_cluster_other_resource_test.go +++ b/internal/services/containers/kubernetes_cluster_other_resource_test.go @@ -166,7 +166,7 @@ func TestAccKubernetesCluster_nodeLabels(t *testing.T) { Config: r.nodeLabelsConfig(data, labels3), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - acceptance.TestCheckNoResourceAttr(data.ResourceName, "default_node_pool.0.node_labels"), + check.That(data.ResourceName).Key("default_node_pool.0.node_labels.%").HasValue("0"), ), }, }) diff --git a/internal/services/containers/kubernetes_cluster_resource_test.go b/internal/services/containers/kubernetes_cluster_resource_test.go index 08c986c1fcef..330eef1f377d 100644 --- a/internal/services/containers/kubernetes_cluster_resource_test.go +++ b/internal/services/containers/kubernetes_cluster_resource_test.go @@ -17,8 +17,8 @@ import ( type KubernetesClusterResource struct{} var ( - olderKubernetesVersion = "1.21.7" - currentKubernetesVersion = "1.22.4" + olderKubernetesVersion = "1.22.11" + currentKubernetesVersion = "1.23.5" olderKubernetesVersionAlias = "1.22" currentKubernetesVersionAlias = "1.23" ) From d1fe8d1efbc9a57ded8f50bdc05f41e32591fd26 Mon Sep 17 00:00:00 2001 From: catriona-m <86247157+catriona-m@users.noreply.github.com> Date: Wed, 3 Aug 2022 23:57:46 +0100 Subject: [PATCH 020/100] gha - fix and improvements to waiting-response (#17870) --- .github/workflows/issue-comment-created.yaml | 4 +++- .github/workflows/pull-request-reviewed.yaml | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/issue-comment-created.yaml b/.github/workflows/issue-comment-created.yaml index d11a8adb1162..b6db2af6c7eb 100644 --- a/.github/workflows/issue-comment-created.yaml +++ b/.github/workflows/issue-comment-created.yaml @@ -22,9 +22,11 @@ jobs: with: github_token: "${{ secrets.GITHUB_TOKEN }}" labels: waiting-response - - uses: actions-ecosystem/action-add-labels@v1 + - uses: actions-ecosystem/action-add-labels@v1.1.0 if: ${{ endsWith(github.event.comment.body, '/wr') }} with: labels: waiting-response github_token: "${{ secrets.GITHUB_TOKEN }}" + number: ${{ github.event.pull_request.number }} + repo: ${{ github.repository }} diff --git a/.github/workflows/pull-request-reviewed.yaml b/.github/workflows/pull-request-reviewed.yaml index 8eb4e6d63a4c..4cf98b190562 100644 --- a/.github/workflows/pull-request-reviewed.yaml +++ b/.github/workflows/pull-request-reviewed.yaml @@ -7,10 +7,20 @@ on: jobs: add-waiting-response: - if: github.event.review.state != 'approved' + if: github.event.review.state != 'approved' && github.actor != github.event.pull_request.user.login runs-on: ubuntu-latest steps: - - uses: actions-ecosystem/action-add-labels@v1 + - uses: actions-ecosystem/action-add-labels@v1.1.0 with: labels: waiting-response - github_token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file + github_token: "${{ secrets.GITHUB_TOKEN }}" + number: ${{ github.event.pull_request.number }} + repo: ${{ github.repository }} + remove-waiting-response: + if: github.actor == github.event.pull_request.user.login + runs-on: ubuntu-latest + steps: + - uses: actions-ecosystem/action-remove-labels@v1 + with: + github_token: "${{ secrets.GITHUB_TOKEN }}" + labels: waiting-response \ No newline at end of file From fb2102850ebf927c3fbbfaecb256f097e254f9f2 Mon Sep 17 00:00:00 2001 From: Xiaxin <92154856+xiaxyi@users.noreply.github.com> Date: Thu, 4 Aug 2022 15:02:24 +0800 Subject: [PATCH 021/100] `azurerm_eventhub_namespace`: support latest released properties:`local_authentication_enabled`,`public_network_access_enabled`,`minimum_tls_version` (#17194) 1. update eventhub namespace SDK from 2021-01-01-preview to stable 2021-11-01 2. Add SAS Auth switch for eventhub namespace --- internal/services/eventhub/client/client.go | 2 +- ...namespace_customer_managed_key_resource.go | 2 +- ...pace_customer_managed_key_resource_test.go | 2 +- .../eventhub_namespace_data_source.go | 2 +- .../eventhub/eventhub_namespace_resource.go | 115 +++++++++++++--- .../eventhub_namespace_resource_test.go | 124 +++++++++++++++++- .../services/eventhub/eventhub_resource.go | 2 +- .../log_analytics_data_export_resource.go | 2 +- .../namespaces/README.md | 6 +- .../namespaces/client.go | 0 .../namespaces/constants.go | 62 +++++++++ .../namespaces/id_namespace.go | 0 .../method_createorupdate_autorest.go | 0 .../namespaces/method_delete_autorest.go | 0 .../namespaces/method_get_autorest.go | 0 .../namespaces/method_list_autorest.go | 0 .../method_listbyresourcegroup_autorest.go | 0 .../namespaces/method_update_autorest.go | 0 .../namespaces/model_connectionstate.go | 0 .../namespaces/model_ehnamespace.go | 0 .../namespaces/model_ehnamespaceproperties.go | 2 + .../namespaces/model_encryption.go | 0 .../namespaces/model_keyvaultproperties.go | 0 .../namespaces/model_privateendpoint.go | 0 .../model_privateendpointconnection.go | 0 ...del_privateendpointconnectionproperties.go | 0 .../namespaces/model_sku.go | 0 .../model_userassignedidentityproperties.go | 0 .../namespaces/predicates.go | 0 .../namespaces/version.go | 2 +- vendor/modules.txt | 2 +- .../docs/d/eventhub_namespace.html.markdown | 2 + .../docs/r/eventhub_namespace.html.markdown | 6 + 33 files changed, 306 insertions(+), 27 deletions(-) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/README.md (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/constants.go (74%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/id_namespace.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/method_createorupdate_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/method_delete_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/method_get_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/method_list_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/method_listbyresourcegroup_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/method_update_autorest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_connectionstate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_ehnamespace.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_ehnamespaceproperties.go (92%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_encryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_keyvaultproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_privateendpoint.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_privateendpointconnection.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_privateendpointconnectionproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_sku.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/model_userassignedidentityproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/{2021-11-01 => 2022-01-01-preview}/namespaces/version.go (86%) diff --git a/internal/services/eventhub/client/client.go b/internal/services/eventhub/client/client.go index 63feaea95012..3bc1ba3640d5 100644 --- a/internal/services/eventhub/client/client.go +++ b/internal/services/eventhub/client/client.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs" "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs" "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces" "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource.go b/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource.go index f65e8f6fd09d..6f3425229502 100644 --- a/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource.go +++ b/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource.go @@ -7,7 +7,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" diff --git a/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource_test.go b/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource_test.go index 32b0325aae9c..ab4d4c6e8473 100644 --- a/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource_test.go +++ b/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/eventhub/eventhub_namespace_data_source.go b/internal/services/eventhub/eventhub_namespace_data_source.go index 6e016ff9fee0..c67c5d809f0b 100644 --- a/internal/services/eventhub/eventhub_namespace_data_source.go +++ b/internal/services/eventhub/eventhub_namespace_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" diff --git a/internal/services/eventhub/eventhub_namespace_resource.go b/internal/services/eventhub/eventhub_namespace_resource.go index a9a676c9c9f5..bf9ca2bddc45 100644 --- a/internal/services/eventhub/eventhub_namespace_resource.go +++ b/internal/services/eventhub/eventhub_namespace_resource.go @@ -16,8 +16,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces" "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces" "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -190,6 +190,29 @@ func resourceEventHubNamespace() *pluginsdk.Resource { }, }, + "local_authentication_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + + "minimum_tls_version": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + string(namespaces.TlsVersionOnePointZero), + string(namespaces.TlsVersionOnePointOne), + string(namespaces.TlsVersionOnePointTwo), + }, false), + }, + + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "default_primary_connection_string_alias": { Type: pluginsdk.TypeString, Computed: true, @@ -228,22 +251,26 @@ func resourceEventHubNamespace() *pluginsdk.Resource { "tags": commonschema.Tags(), }, - CustomizeDiff: pluginsdk.CustomizeDiffShim(func(ctx context.Context, d *pluginsdk.ResourceDiff, v interface{}) error { - oldSku, newSku := d.GetChange("sku") - if d.HasChange("sku") { - if strings.EqualFold(newSku.(string), string(namespaces.SkuNamePremium)) || strings.EqualFold(oldSku.(string), string(namespaces.SkuTierPremium)) { - log.Printf("[DEBUG] cannot migrate a namespace from or to Premium SKU") - d.ForceNew("sku") - } - if strings.EqualFold(newSku.(string), string(namespaces.SkuTierPremium)) { - zoneRedundant := d.Get("zone_redundant").(bool) - if !zoneRedundant { - return fmt.Errorf("zone_redundant needs to be set to true when using premium SKU") + + CustomizeDiff: pluginsdk.CustomDiffWithAll( + pluginsdk.CustomizeDiffShim(func(ctx context.Context, d *pluginsdk.ResourceDiff, v interface{}) error { + oldSku, newSku := d.GetChange("sku") + if d.HasChange("sku") { + if strings.EqualFold(newSku.(string), string(namespaces.SkuNamePremium)) || strings.EqualFold(oldSku.(string), string(namespaces.SkuTierPremium)) { + log.Printf("[DEBUG] cannot migrate a namespace from or to Premium SKU") + d.ForceNew("sku") + } + if strings.EqualFold(newSku.(string), string(namespaces.SkuTierPremium)) { + zoneRedundant := d.Get("zone_redundant").(bool) + if !zoneRedundant { + return fmt.Errorf("zone_redundant needs to be set to true when using premium SKU") + } } } - } - return nil - }), + return nil + }), + pluginsdk.CustomizeDiffShim(eventhubTLSVersionDiff), + ), } } @@ -278,6 +305,16 @@ func resourceEventHubNamespaceCreate(d *pluginsdk.ResourceData, meta interface{} return fmt.Errorf("expanding `identity`: %+v", err) } + publicNetworkEnabled := namespaces.PublicNetworkAccessEnabled + if !d.Get("public_network_access_enabled").(bool) { + publicNetworkEnabled = namespaces.PublicNetworkAccessDisabled + } + + disableLocalAuth := false + if !d.Get("local_authentication_enabled").(bool) { + disableLocalAuth = true + } + parameters := namespaces.EHNamespace{ Location: &location, Sku: &namespaces.Sku{ @@ -292,6 +329,8 @@ func resourceEventHubNamespaceCreate(d *pluginsdk.ResourceData, meta interface{} Properties: &namespaces.EHNamespaceProperties{ IsAutoInflateEnabled: utils.Bool(autoInflateEnabled), ZoneRedundant: utils.Bool(zoneRedundant), + DisableLocalAuth: utils.Bool(disableLocalAuth), + PublicNetworkAccess: &publicNetworkEnabled, }, Tags: tags.Expand(t), } @@ -300,6 +339,11 @@ func resourceEventHubNamespaceCreate(d *pluginsdk.ResourceData, meta interface{} parameters.Properties.ClusterArmId = utils.String(v) } + if tlsValue := d.Get("minimum_tls_version").(string); tlsValue != "" { + minimumTls := namespaces.TlsVersion(tlsValue) + parameters.Properties.MinimumTlsVersion = &minimumTls + } + if v, ok := d.GetOk("maximum_throughput_units"); ok { parameters.Properties.MaximumThroughputUnits = utils.Int64(int64(v.(int))) } @@ -347,6 +391,16 @@ func resourceEventHubNamespaceUpdate(d *pluginsdk.ResourceData, meta interface{} autoInflateEnabled := d.Get("auto_inflate_enabled").(bool) zoneRedundant := d.Get("zone_redundant").(bool) + publicNetworkEnabled := namespaces.PublicNetworkAccessEnabled + if !d.Get("public_network_access_enabled").(bool) { + publicNetworkEnabled = namespaces.PublicNetworkAccessDisabled + } + + disableLocalAuth := false + if !d.Get("local_authentication_enabled").(bool) { + disableLocalAuth = true + } + identity, err := identity.ExpandSystemAndUserAssignedMap(d.Get("identity").([]interface{})) if err != nil { return fmt.Errorf("expanding `identity`: %+v", err) @@ -366,6 +420,8 @@ func resourceEventHubNamespaceUpdate(d *pluginsdk.ResourceData, meta interface{} Properties: &namespaces.EHNamespaceProperties{ IsAutoInflateEnabled: utils.Bool(autoInflateEnabled), ZoneRedundant: utils.Bool(zoneRedundant), + DisableLocalAuth: utils.Bool(disableLocalAuth), + PublicNetworkAccess: &publicNetworkEnabled, }, Tags: tags.Expand(t), } @@ -374,6 +430,11 @@ func resourceEventHubNamespaceUpdate(d *pluginsdk.ResourceData, meta interface{} parameters.Properties.ClusterArmId = utils.String(v) } + if tlsValue := d.Get("minimum_tls_version").(string); tlsValue != "" { + minimumTls := namespaces.TlsVersion(tlsValue) + parameters.Properties.MinimumTlsVersion = &minimumTls + } + if v, ok := d.GetOk("maximum_throughput_units"); ok { parameters.Properties.MaximumThroughputUnits = utils.Int64(int64(v.(int))) } @@ -471,6 +532,22 @@ func resourceEventHubNamespaceRead(d *pluginsdk.ResourceData, meta interface{}) d.Set("maximum_throughput_units", int(*props.MaximumThroughputUnits)) d.Set("zone_redundant", props.ZoneRedundant) d.Set("dedicated_cluster_id", props.ClusterArmId) + + localAuthDisabled := false + if props.DisableLocalAuth != nil { + localAuthDisabled = *props.DisableLocalAuth + } + d.Set("local_authentication_enabled", !localAuthDisabled) + + publicNetworkAccess := true + if props.PublicNetworkAccess != nil && *props.PublicNetworkAccess == namespaces.PublicNetworkAccessDisabled { + publicNetworkAccess = false + } + d.Set("public_network_access_enabled", publicNetworkAccess) + + if props.MinimumTlsVersion != nil { + d.Set("minimum_tls_version", *props.MinimumTlsVersion) + } } if err := tags.FlattenAndSet(d, model.Tags); err != nil { @@ -712,3 +789,11 @@ func resourceVnetRuleHash(v interface{}) int { } return pluginsdk.HashString(buf.String()) } + +func eventhubTLSVersionDiff(ctx context.Context, d *pluginsdk.ResourceDiff, _ interface{}) (err error) { + old, new := d.GetChange("minimum_tls_version") + if old != "" && new == "" { + err = fmt.Errorf("`minimum_tls_version` has been set before, please set a valid value for this property ") + } + return +} diff --git a/internal/services/eventhub/eventhub_namespace_resource_test.go b/internal/services/eventhub/eventhub_namespace_resource_test.go index c0ac2b59cf57..9712741a2f93 100644 --- a/internal/services/eventhub/eventhub_namespace_resource_test.go +++ b/internal/services/eventhub/eventhub_namespace_resource_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -326,6 +326,21 @@ func TestAccEventHubNamespace_BasicWithCapacity(t *testing.T) { }) } +func TestAccEventHubNamespace_BasicWithLocalAuthProperty(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_eventhub_namespace", "test") + r := EventHubNamespaceResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.localAuthProperty(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("local_authentication_enabled").HasValue("false"), + ), + }, + }) +} + func TestAccEventHubNamespace_BasicWithCapacityUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_eventhub_namespace", "test") r := EventHubNamespaceResource{} @@ -428,6 +443,50 @@ func TestAccEventHubNamespace_maximumThroughputUnitsUpdate(t *testing.T) { }) } +func TestAccEventHubNamespace_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_eventhub_namespace", "test") + r := EventHubNamespaceResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + { + Config: r.publicNetworkAccessUpdate(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + }) +} + +func TestAccEventHubNamespace_minimumTLSUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_eventhub_namespace", "test") + r := EventHubNamespaceResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("minimum_tls_version").HasValue("1.2"), + ), + }, + { + Config: r.minimumTLSUpdate(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("minimum_tls_version").HasValue("1.1"), + ), + }, + }) +} + func TestAccEventHubNamespace_autoInfalteDisabledWithAutoInflateUnits(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_eventhub_namespace", "test") r := EventHubNamespaceResource{} @@ -924,6 +983,69 @@ resource "azurerm_eventhub_namespace" "test" { `, data.RandomInteger, data.Locations.Primary, data.RandomInteger, capacity) } +func (EventHubNamespaceResource) localAuthProperty(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_eventhub_namespace" "test" { + name = "acctesteventhubnamespace-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku = "Basic" + local_authentication_enabled = false +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) +} + +func (EventHubNamespaceResource) publicNetworkAccessUpdate(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_eventhub_namespace" "test" { + name = "acctesteventhubnamespace-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku = "Basic" + public_network_access_enabled = false +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) +} + +func (EventHubNamespaceResource) minimumTLSUpdate(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_eventhub_namespace" "test" { + name = "acctesteventhubnamespace-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + sku = "Basic" + minimum_tls_version = "1.1" +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) +} + func (EventHubNamespaceResource) maximumThroughputUnitsUpdate(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/internal/services/eventhub/eventhub_resource.go b/internal/services/eventhub/eventhub_resource.go index 96c37b2e7a3e..ffaa7ffb3e4a 100644 --- a/internal/services/eventhub/eventhub_resource.go +++ b/internal/services/eventhub/eventhub_resource.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/loganalytics/log_analytics_data_export_resource.go b/internal/services/loganalytics/log_analytics_data_export_resource.go index 96f1ed9e98ef..01feeeb602d4 100644 --- a/internal/services/loganalytics/log_analytics_data_export_resource.go +++ b/internal/services/loganalytics/log_analytics_data_export_resource.go @@ -8,7 +8,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2020-08-01/operationalinsights" "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs" - "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/README.md index 7266d603fa8b..90bd26a208a2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). 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/eventhub/2021-11-01/namespaces" +import "github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/constants.go similarity index 74% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/constants.go index 6558e700ccbf..0dcfbe5460ac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/constants.go @@ -104,6 +104,37 @@ func parsePrivateLinkConnectionStatus(input string) (*PrivateLinkConnectionStatu return &out, nil } +type PublicNetworkAccess string + +const ( + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" + PublicNetworkAccessSecuredByPerimeter PublicNetworkAccess = "SecuredByPerimeter" +) + +func PossibleValuesForPublicNetworkAccess() []string { + return []string{ + string(PublicNetworkAccessDisabled), + string(PublicNetworkAccessEnabled), + string(PublicNetworkAccessSecuredByPerimeter), + } +} + +func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) { + vals := map[string]PublicNetworkAccess{ + "disabled": PublicNetworkAccessDisabled, + "enabled": PublicNetworkAccessEnabled, + "securedbyperimeter": PublicNetworkAccessSecuredByPerimeter, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicNetworkAccess(input) + return &out, nil +} + type SkuName string const ( @@ -165,3 +196,34 @@ func parseSkuTier(input string) (*SkuTier, error) { out := SkuTier(input) return &out, nil } + +type TlsVersion string + +const ( + TlsVersionOnePointOne TlsVersion = "1.1" + TlsVersionOnePointTwo TlsVersion = "1.2" + TlsVersionOnePointZero TlsVersion = "1.0" +) + +func PossibleValuesForTlsVersion() []string { + return []string{ + string(TlsVersionOnePointOne), + string(TlsVersionOnePointTwo), + string(TlsVersionOnePointZero), + } +} + +func parseTlsVersion(input string) (*TlsVersion, error) { + vals := map[string]TlsVersion{ + "1.1": TlsVersionOnePointOne, + "1.2": TlsVersionOnePointTwo, + "1.0": TlsVersionOnePointZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TlsVersion(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_createorupdate_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_createorupdate_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_createorupdate_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_delete_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_delete_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_delete_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_get_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_list_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_list_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_list_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_listbyresourcegroup_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_listbyresourcegroup_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_listbyresourcegroup_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update_autorest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/method_update_autorest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update_autorest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_connectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_connectionstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_connectionstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_connectionstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_ehnamespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_ehnamespace.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_ehnamespace.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_ehnamespace.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_ehnamespaceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_ehnamespaceproperties.go similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_ehnamespaceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_ehnamespaceproperties.go index 65d06e6cf5b4..aad420d3c16a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_ehnamespaceproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_ehnamespaceproperties.go @@ -19,8 +19,10 @@ type EHNamespaceProperties struct { KafkaEnabled *bool `json:"kafkaEnabled,omitempty"` MaximumThroughputUnits *int64 `json:"maximumThroughputUnits,omitempty"` MetricId *string `json:"metricId,omitempty"` + MinimumTlsVersion *TlsVersion `json:"minimumTlsVersion,omitempty"` PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` + PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"` Status *string `json:"status,omitempty"` UpdatedAt *string `json:"updatedAt,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_encryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_encryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_encryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_encryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_keyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_keyvaultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_keyvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_keyvaultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_privateendpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_privateendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_privateendpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_privateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_privateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_privateendpointconnectionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_privateendpointconnectionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_privateendpointconnectionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_userassignedidentityproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_userassignedidentityproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/model_userassignedidentityproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/model_userassignedidentityproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/version.go similarity index 86% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/version.go index e7fef9f37bd3..c7efc2b68fa9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/version.go @@ -5,7 +5,7 @@ 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-11-01" +const defaultApiVersion = "2022-01-01-preview" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) diff --git a/vendor/modules.txt b/vendor/modules.txt index a0f543d204c5..27d4aacdc714 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -227,8 +227,8 @@ github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumerg github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters -github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets +github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules diff --git a/website/docs/d/eventhub_namespace.html.markdown b/website/docs/d/eventhub_namespace.html.markdown index 021f41d33556..061f62a243ad 100644 --- a/website/docs/d/eventhub_namespace.html.markdown +++ b/website/docs/d/eventhub_namespace.html.markdown @@ -46,6 +46,8 @@ output "eventhub_namespace_id" { * `dedicated_cluster_id` - The ID of the EventHub Dedicated Cluster where this Namespace exists. +* `local_authentication_enabled` - Is this EventHub Namespace SAS authentication enabled? + * `tags` - A mapping of tags to assign to the EventHub Namespace. The following attributes are exported only if there is an authorization rule named diff --git a/website/docs/r/eventhub_namespace.html.markdown b/website/docs/r/eventhub_namespace.html.markdown index b4fde1cb63aa..18775bba3ebd 100644 --- a/website/docs/r/eventhub_namespace.html.markdown +++ b/website/docs/r/eventhub_namespace.html.markdown @@ -59,6 +59,12 @@ The following arguments are supported: * `network_rulesets` - (Optional) A `network_rulesets` block as defined below. +* `local_authentication_enabled` - (Optional) Is SAS authentication enabled for the EventHub Namespace? + +* `public_network_access_enabled` - (Optional) Is public network access enabled for the EventHub Namespace? Defaults to `true`. + +* `minimum_tls_version` - (Optional) The minimum supported TLS version for this EventHub Namespace. Valid values are: `1.0`, `1.1` and `1.2`. The current default minimum TLS version is `1.2`. + --- A `identity` block supports the following: From cbe33c2a792d33e48c222493622709eb2fb8cb9c Mon Sep 17 00:00:00 2001 From: magodo Date: Thu, 4 Aug 2022 15:04:49 +0800 Subject: [PATCH 022/100] Update to include #17194 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa8692fd9707..81441a39b426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ENHANCEMENTS: * `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] * `azurerm_shared_image` - improved validation for the `publisher`, `offer` and `sku` properties in the `identifier` block [GH-17547] * `azurerm_subnet` - support for the service delegation `Microsoft.Orbital/orbitalGateway` [GH-17854] +* `azurerm_eventhub_namespace` - support for `local_authentication_enabled`, `public_network_access_enabled` and `minimum_tls_version` [GH-17194] BUG FIXES: From ca8db0c146f37a69f94660a5fe090893edea31ab Mon Sep 17 00:00:00 2001 From: Mike Madeja Date: Thu, 4 Aug 2022 11:12:47 -0500 Subject: [PATCH 023/100] changed setting to optional --- internal/services/postgres/postgresql_server_resource.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/services/postgres/postgresql_server_resource.go b/internal/services/postgres/postgresql_server_resource.go index d65cb06779f6..2ea1c37089af 100644 --- a/internal/services/postgres/postgresql_server_resource.go +++ b/internal/services/postgres/postgresql_server_resource.go @@ -220,7 +220,8 @@ func resourcePostgreSQLServer() *pluginsdk.Resource { "ssl_enforcement_enabled": { Type: pluginsdk.TypeBool, - Required: true, + Optional: true, + Default: false, }, "threat_detection_policy": { From de274a56b65350ed53927ccdefa8dc7f2918c473 Mon Sep 17 00:00:00 2001 From: Mike Madeja Date: Thu, 4 Aug 2022 11:23:02 -0500 Subject: [PATCH 024/100] updated markdown for PostgreSQL --- website/docs/r/postgresql_server.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/postgresql_server.html.markdown b/website/docs/r/postgresql_server.html.markdown index d3a84caf46f8..d228131fb765 100644 --- a/website/docs/r/postgresql_server.html.markdown +++ b/website/docs/r/postgresql_server.html.markdown @@ -82,7 +82,7 @@ The following arguments are supported: * `restore_point_in_time` - (Optional) When `create_mode` is `PointInTimeRestore` the point in time to restore from `creation_source_server_id`. -* `ssl_enforcement_enabled` - (Optional) Specifies if SSL should be enforced on connections. Possible values are `true` and `false`. +* `ssl_enforcement_enabled` - (Optional) Specifies if SSL should be enforced on connections. Defaults to `false`. -> **NOTE:** `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`. From 9b21c7ef99d1b70e6d4028a9cd7075ed426f244a Mon Sep 17 00:00:00 2001 From: Mike Madeja Date: Thu, 4 Aug 2022 11:55:53 -0500 Subject: [PATCH 025/100] updated TLS --- internal/services/postgres/postgresql_server_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/postgres/postgresql_server_resource.go b/internal/services/postgres/postgresql_server_resource.go index 2ea1c37089af..f99001559e52 100644 --- a/internal/services/postgres/postgresql_server_resource.go +++ b/internal/services/postgres/postgresql_server_resource.go @@ -214,7 +214,7 @@ func resourcePostgreSQLServer() *pluginsdk.Resource { "ssl_minimal_tls_version_enforced": { Type: pluginsdk.TypeString, Optional: true, - Default: string(servers.MinimalTlsVersionEnumTLSOneTwo), + Default: string(servers.MinimalTlsVersionEnumTLSEnforcementDisabled), ValidateFunc: validation.StringInSlice(servers.PossibleValuesForMinimalTlsVersionEnum(), false), }, From 074285a77dd58285dc4e76c8ead86fb572f7b951 Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 4 Aug 2022 11:46:34 -0700 Subject: [PATCH 026/100] CHANGELOG #17194 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81441a39b426..b30017432073 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ENHANCEMENTS: * `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] * `azurerm_shared_image` - improved validation for the `publisher`, `offer` and `sku` properties in the `identifier` block [GH-17547] * `azurerm_subnet` - support for the service delegation `Microsoft.Orbital/orbitalGateway` [GH-17854] -* `azurerm_eventhub_namespace` - support for `local_authentication_enabled`, `public_network_access_enabled` and `minimum_tls_version` [GH-17194] +* `azurerm_eventhub_namespace` - support for the `local_authentication_enabled`, `public_network_access_enabled`, and `minimum_tls_version` properties [GH-17194] BUG FIXES: From c999570f26bb175e4234ac1913d0f081dac5dc25 Mon Sep 17 00:00:00 2001 From: jackofallops <11830746+jackofallops@users.noreply.github.com> Date: Thu, 4 Aug 2022 20:39:18 +0100 Subject: [PATCH 027/100] `azurerm_api_management` - update `sku_name` validation to accept new Premium SKUs (#17887) --- .../apimanagement/validate/api_management_sku.go | 2 +- .../validate/api_management_sku_test.go | 14 ++++++++++++-- website/docs/r/api_management.html.markdown | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/internal/services/apimanagement/validate/api_management_sku.go b/internal/services/apimanagement/validate/api_management_sku.go index e73eab348767..0616c65f6a82 100644 --- a/internal/services/apimanagement/validate/api_management_sku.go +++ b/internal/services/apimanagement/validate/api_management_sku.go @@ -9,7 +9,7 @@ import ( func ApimSkuName() pluginsdk.SchemaValidateFunc { return validation.StringMatch( - regexp.MustCompile(`^Consumption_0$|^Basic_(1|2)$|^Developer_1$|^Premium_([1-9]|10)$|^Standard_[1-4]$`), + regexp.MustCompile(`^Consumption_0$|^Basic_(1|2)$|^Developer_1$|^Premium_([1-9][0-9]{0,1})$|^Standard_[1-4]$`), `This is not a valid Api Management sku name.`, ) } diff --git a/internal/services/apimanagement/validate/api_management_sku_test.go b/internal/services/apimanagement/validate/api_management_sku_test.go index fdac8f2a6786..8ae2e7a74d01 100644 --- a/internal/services/apimanagement/validate/api_management_sku_test.go +++ b/internal/services/apimanagement/validate/api_management_sku_test.go @@ -39,10 +39,20 @@ func TestApimSkuName(t *testing.T) { valid: false, }, { - name: "Premium_11", - input: "Premium_11", + name: "Premium_101", + input: "Premium_101", valid: false, }, + { + name: "Premium_10", + input: "Premium_10", + valid: true, + }, + { + name: "Premium_12", + input: "Premium_12", + valid: true, + }, { name: "Premium_7", input: "Premium_7", diff --git a/website/docs/r/api_management.html.markdown b/website/docs/r/api_management.html.markdown index 5e27337bcdce..b3f9f981a42b 100644 --- a/website/docs/r/api_management.html.markdown +++ b/website/docs/r/api_management.html.markdown @@ -53,6 +53,8 @@ The following arguments are supported: * `sku_name` - (Required) `sku_name` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `Standard` and `Premium`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `Developer_1`). +~> **NOTE:** Premium SKU's are limited to a default maximum of 12 (i.e. `Premium_12`), this can, however, be increased via support request. + --- * `additional_location` - (Optional) One or more `additional_location` blocks as defined below. From a8f0ebbc71c8e8f7cf75c09c4d82d58e86ac4763 Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 4 Aug 2022 12:39:54 -0700 Subject: [PATCH 028/100] CHANGELOG #17887 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b30017432073..f64541455a93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ENHANCEMENTS: * domainservice: updating to use API Version `2021-05-01` [GH-17737] * Data Source: `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] +* `azurerm_api_management` - update the `sku_name` property validation to accept newer Premium SKUs [GH-17887] * `azurerm_firewall` - the property `sku_tier` is now updateable [GH-17577] * `azurerm_linux_virtual_machine_scale_set` - the property `instances` is now Optional and defaults to `0` [GH-17836] * `azurerm_log_analytics_cluster` - updated validation for the `size_gb` property [GH-17780] From 04754cf265a18cbffe1a594c19b7cc2137b8f502 Mon Sep 17 00:00:00 2001 From: Yichun Ma Date: Fri, 5 Aug 2022 10:46:30 +0800 Subject: [PATCH 029/100] `d\shared_image_version`: Fix paging (#17822) --- .../shared_image_version_data_source.go | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/internal/services/compute/shared_image_version_data_source.go b/internal/services/compute/shared_image_version_data_source.go index 38bde5406b64..68cf07227afb 100644 --- a/internal/services/compute/shared_image_version_data_source.go +++ b/internal/services/compute/shared_image_version_data_source.go @@ -168,34 +168,40 @@ func obtainImage(client *compute.GalleryImageVersionsClient, ctx context.Context switch galleryImageVersionName { case "latest": - images, err := client.ListByGalleryImage(ctx, resourceGroup, galleryName, galleryImageName) + imagesIterator, err := client.ListByGalleryImageComplete(ctx, resourceGroup, galleryName, galleryImageName) if err != nil { - if utils.ResponseWasNotFound(images.Response().Response) { + if utils.ResponseWasNotFound(imagesIterator.Response().Response) { return nil, notFoundError } return nil, fmt.Errorf("retrieving Shared Image Versions (Image %q / Gallery %q / Resource Group %q): %+v", galleryImageName, galleryName, resourceGroup, err) } + images := make([]compute.GalleryImageVersion, 0) + for imagesIterator.NotDone() { + images = append(images, imagesIterator.Value()) + if err := imagesIterator.NextWithContext(ctx); err != nil { + return nil, fmt.Errorf("listing Shared Image Versions (Image %q / Gallery %q / Resource Group %q): %+v", galleryImageName, galleryName, resourceGroup, err) + } + } + // the last image in the list is the latest version - if len(images.Values()) > 0 { - values := images.Values() - var errs []error + if len(images) > 0 { if sortBySemVer { - values, errs = sortSharedImageVersions(values) + var errs []error + images, errs = sortSharedImageVersions(images) if len(errs) > 0 { return nil, fmt.Errorf("parsing version(s): %v", errs) } } - image := values[len(values)-1] + image := images[len(images)-1] return &image, nil } - return nil, notFoundError case "recent": - images, err := client.ListByGalleryImage(ctx, resourceGroup, galleryName, galleryImageName) + imagesIterator, err := client.ListByGalleryImageComplete(ctx, resourceGroup, galleryName, galleryImageName) if err != nil { - if utils.ResponseWasNotFound(images.Response().Response) { + if utils.ResponseWasNotFound(imagesIterator.Response().Response) { return nil, notFoundError } return nil, fmt.Errorf("retrieving Shared Image Versions (Image %q / Gallery %q / Resource Group %q): %+v", galleryImageName, galleryName, resourceGroup, err) @@ -203,13 +209,18 @@ func obtainImage(client *compute.GalleryImageVersionsClient, ctx context.Context var image *compute.GalleryImageVersion var recentDate *time.Time // compare dates until we find the image that was updated most recently - for _, currImage := range images.Values() { + for imagesIterator.NotDone() { + currImage := imagesIterator.Value() if profile := currImage.PublishingProfile; profile != nil { if profile.PublishedDate != nil && (recentDate == nil || profile.PublishedDate.Time.After(*recentDate)) { recentDate = &profile.PublishedDate.Time image = &currImage } } + + if err := imagesIterator.NextWithContext(ctx); err != nil { + return nil, fmt.Errorf("listing Shared Image Versions (Image %q / Gallery %q / Resource Group %q): %+v", galleryImageName, galleryName, resourceGroup, err) + } } if image != nil { From d7b049fd0ca4d5c065c806c76f0ce9d9b500e671 Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 4 Aug 2022 19:50:03 -0700 Subject: [PATCH 030/100] v3.17.0 --- CHANGELOG.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f64541455a93..808b00fa27cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,21 @@ -## 3.17.0 (Unreleased) +## 3.17.0 (August 04, 2022) ENHANCEMENTS: -* domainservice: updating to use API Version `2021-05-01` [GH-17737] -* Data Source: `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] -* `azurerm_api_management` - update the `sku_name` property validation to accept newer Premium SKUs [GH-17887] -* `azurerm_firewall` - the property `sku_tier` is now updateable [GH-17577] -* `azurerm_linux_virtual_machine_scale_set` - the property `instances` is now Optional and defaults to `0` [GH-17836] -* `azurerm_log_analytics_cluster` - updated validation for the `size_gb` property [GH-17780] -* `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` [GH-17776] -* `azurerm_shared_image` - improved validation for the `publisher`, `offer` and `sku` properties in the `identifier` block [GH-17547] -* `azurerm_subnet` - support for the service delegation `Microsoft.Orbital/orbitalGateway` [GH-17854] -* `azurerm_eventhub_namespace` - support for the `local_authentication_enabled`, `public_network_access_enabled`, and `minimum_tls_version` properties [GH-17194] +* domainservice: updating to use API Version `2021-05-01` ([#17737](https://github.com/hashicorp/terraform-provider-azurerm/issues/17737)) +* Data Source: `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` ([#17776](https://github.com/hashicorp/terraform-provider-azurerm/issues/17776)) +* `azurerm_api_management` - update the `sku_name` property validation to accept newer Premium SKUs ([#17887](https://github.com/hashicorp/terraform-provider-azurerm/issues/17887)) +* `azurerm_firewall` - the property `sku_tier` is now updateable ([#17577](https://github.com/hashicorp/terraform-provider-azurerm/issues/17577)) +* `azurerm_linux_virtual_machine_scale_set` - the property `instances` is now Optional and defaults to `0` ([#17836](https://github.com/hashicorp/terraform-provider-azurerm/issues/17836)) +* `azurerm_log_analytics_cluster` - updated validation for the `size_gb` property ([#17780](https://github.com/hashicorp/terraform-provider-azurerm/issues/17780)) +* `azurerm_proximity_placement_group` - refactoring to use `hashicorp/go-azure-sdk` ([#17776](https://github.com/hashicorp/terraform-provider-azurerm/issues/17776)) +* `azurerm_shared_image` - improved validation for the `publisher`, `offer` and `sku` properties in the `identifier` block ([#17547](https://github.com/hashicorp/terraform-provider-azurerm/issues/17547)) +* `azurerm_subnet` - support for the service delegation `Microsoft.Orbital/orbitalGateway` ([#17854](https://github.com/hashicorp/terraform-provider-azurerm/issues/17854)) +* `azurerm_eventhub_namespace` - support for the `local_authentication_enabled`, `public_network_access_enabled`, and `minimum_tls_version` properties ([#17194](https://github.com/hashicorp/terraform-provider-azurerm/issues/17194)) BUG FIXES: -* Data Source: `azurerm_private_dns_zone` - returning the correct Resource ID when not specifying the `resource_group_name` [GH-17729] +* Data Source: `azurerm_private_dns_zone` - returning the correct Resource ID when not specifying the `resource_group_name` ([#17729](https://github.com/hashicorp/terraform-provider-azurerm/issues/17729)) ## 3.16.0 (July 28, 2022) From cd80664f81f6773a64b61b56dec96c489f1451b8 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Fri, 5 Aug 2022 09:37:21 +0200 Subject: [PATCH 031/100] build: using Go 1.18.5 --- .github/workflows/depscheck.yaml | 2 +- .github/workflows/gencheck.yaml | 2 +- .github/workflows/golint.yaml | 2 +- .github/workflows/gradually-deprecated.yaml | 2 +- .github/workflows/link-milestone.yaml | 2 +- .github/workflows/tflint.yaml | 2 +- .github/workflows/thirty-two-bit.yaml | 2 +- .github/workflows/unit-test.yaml | 2 +- .github/workflows/validate-examples.yaml | 2 +- .github/workflows/website-lint.yaml | 2 +- .go-version | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/depscheck.yaml b/.github/workflows/depscheck.yaml index 29335ca659b5..9474d204a130 100644 --- a/.github/workflows/depscheck.yaml +++ b/.github/workflows/depscheck.yaml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - run: make tools - run: make depscheck diff --git a/.github/workflows/gencheck.yaml b/.github/workflows/gencheck.yaml index 00e1d253774a..5b67e882edfd 100644 --- a/.github/workflows/gencheck.yaml +++ b/.github/workflows/gencheck.yaml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - run: make tools - run: make gencheck diff --git a/.github/workflows/golint.yaml b/.github/workflows/golint.yaml index 9e436960a83d..5dd06d52c0d1 100644 --- a/.github/workflows/golint.yaml +++ b/.github/workflows/golint.yaml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - uses: golangci/golangci-lint-action@v2 with: version: 'v1.45.0' diff --git a/.github/workflows/gradually-deprecated.yaml b/.github/workflows/gradually-deprecated.yaml index 3b854851353f..51c3abe97f8f 100644 --- a/.github/workflows/gradually-deprecated.yaml +++ b/.github/workflows/gradually-deprecated.yaml @@ -16,5 +16,5 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - run: ./scripts/run-gradually-deprecated.sh diff --git a/.github/workflows/link-milestone.yaml b/.github/workflows/link-milestone.yaml index b497805f8e22..a531f5136f01 100644 --- a/.github/workflows/link-milestone.yaml +++ b/.github/workflows/link-milestone.yaml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - run: | go install github.com/stephybun/link-milestone@latest link-milestone diff --git a/.github/workflows/tflint.yaml b/.github/workflows/tflint.yaml index c8e4400abaa6..74e6a65f4365 100644 --- a/.github/workflows/tflint.yaml +++ b/.github/workflows/tflint.yaml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - run: make tools - run: make tflint diff --git a/.github/workflows/thirty-two-bit.yaml b/.github/workflows/thirty-two-bit.yaml index 658d2f5c5ab0..97ad3a9713bf 100644 --- a/.github/workflows/thirty-two-bit.yaml +++ b/.github/workflows/thirty-two-bit.yaml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - run: make tools - run: GOARCH=386 GOOS=linux go build -o 32bitbuild . diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index cb1820ea7ef1..69116e6920f2 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - run: make test env: diff --git a/.github/workflows/validate-examples.yaml b/.github/workflows/validate-examples.yaml index 7ef44548a1dc..23e3a238d075 100644 --- a/.github/workflows/validate-examples.yaml +++ b/.github/workflows/validate-examples.yaml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - run: make tools - run: make validate-examples diff --git a/.github/workflows/website-lint.yaml b/.github/workflows/website-lint.yaml index 57fd18b081d5..954a754cb5d9 100644 --- a/.github/workflows/website-lint.yaml +++ b/.github/workflows/website-lint.yaml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.18.1' + go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - run: make tools - run: make website-lint diff --git a/.go-version b/.go-version index 5ce8b3959987..8e8b0a9335a8 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.18.1 \ No newline at end of file +1.18.5 From 306b5cb3a14a69d456cc585acbaab6876b359852 Mon Sep 17 00:00:00 2001 From: Tao <104055472+teowa@users.noreply.github.com> Date: Fri, 5 Aug 2022 18:03:33 +0800 Subject: [PATCH 032/100] fix doc of schduled query rule: add `tags` (#17901) --- .../r/monitor_scheduled_query_rules_alert.html.markdown | 7 +++++++ .../docs/r/monitor_scheduled_query_rules_log.html.markdown | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/website/docs/r/monitor_scheduled_query_rules_alert.html.markdown b/website/docs/r/monitor_scheduled_query_rules_alert.html.markdown index 3f9f06ce8ea9..b1a217a9b5c6 100644 --- a/website/docs/r/monitor_scheduled_query_rules_alert.html.markdown +++ b/website/docs/r/monitor_scheduled_query_rules_alert.html.markdown @@ -59,6 +59,9 @@ resource "azurerm_monitor_scheduled_query_rules_alert" "example" { operator = "GreaterThan" threshold = 3 } + tags = { + foo = "bar" + } } # Example: Alerting Action Cross-Resource @@ -92,6 +95,9 @@ QUERY operator = "GreaterThan" threshold = 3 } + tags = { + foo = "bar" + } } ``` @@ -114,6 +120,7 @@ The following arguments are supported: * `enabled` - (Optional) Whether this scheduled query rule is enabled. Default is `true`. * `severity` - (Optional) Severity of the alert. Possible values include: 0, 1, 2, 3, or 4. * `throttling` - (Optional) Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive). +* `tags` - (Optional) A mapping of tags to assign to the resource. --- diff --git a/website/docs/r/monitor_scheduled_query_rules_log.html.markdown b/website/docs/r/monitor_scheduled_query_rules_log.html.markdown index 840017e057df..e0dde4c6a270 100644 --- a/website/docs/r/monitor_scheduled_query_rules_log.html.markdown +++ b/website/docs/r/monitor_scheduled_query_rules_log.html.markdown @@ -76,6 +76,9 @@ resource "azurerm_monitor_scheduled_query_rules_log" "example" { data_source_id = azurerm_log_analytics_workspace.example.id description = "Scheduled query rule LogToMetric example" enabled = true + tags = { + foo = "bar" + } } ``` @@ -89,6 +92,7 @@ The following arguments are supported: * `data_source_id` - (Required) The resource URI over which log search query is to be run. * `description` - (Optional) The description of the scheduled query rule. * `enabled` - (Optional) Whether this scheduled query rule is enabled. Default is `true`. +* `tags` - (Optional) A mapping of tags to assign to the resource. --- From 5bbf4f60cf20f4da53b6a9f69fe5b66b51d94bff Mon Sep 17 00:00:00 2001 From: Chris Zembower Date: Fri, 5 Aug 2022 06:17:25 -0400 Subject: [PATCH 033/100] typos, note regarding lack of MSI support in vnet (#17888) --- website/docs/r/container_group.html.markdown | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/website/docs/r/container_group.html.markdown b/website/docs/r/container_group.html.markdown index 7e0b07b920be..b7fcf3916ed0 100644 --- a/website/docs/r/container_group.html.markdown +++ b/website/docs/r/container_group.html.markdown @@ -3,7 +3,7 @@ subcategory: "Container" layout: "azurerm" page_title: "Azure Resource Manager: azurerm_container_group" description: |- - Create as an Azure Container Group instance. + Manages an Azure Container Group instance. --- # azurerm_container_group @@ -78,7 +78,7 @@ The following arguments are supported: * `diagnostics` - (Optional) A `diagnostics` block as documented below. -* `dns_name_label` - (Optional) The DNS label/name for the container groups IP. Changing this forces a new resource to be created. +* `dns_name_label` - (Optional) The DNS label/name for the container group's IP. Changing this forces a new resource to be created. ~> **Note:** DNS label/name is not supported when deploying to virtual networks. @@ -92,9 +92,9 @@ The following arguments are supported: * `key_vault_key_id` - (Optional) The Key Vault key URI for CMK encryption. Changing this forces a new resource to be created. -* `network_profile_id` - (Optional) Network profile ID for deploying to virtual network. +* `network_profile_id` - (Optional) Network profile ID for deploying to a virtual network. -* `image_registry_credential` - (Optional) A `image_registry_credential` block as documented below. Changing this forces a new resource to be created. +* `image_registry_credential` - (Optional) An `image_registry_credential` block as documented below. Changing this forces a new resource to be created. * `restart_policy` - (Optional) Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`. Changing this forces a new resource to be created. @@ -106,12 +106,13 @@ An `identity` block supports the following: * `type` - (Required) Specifies the type of Managed Service Identity that should be configured on this Container Group. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). -~> **NOTE:** When `type` is set to `SystemAssigned`, identity the Principal ID can be retrieved after the container group has been created. See [documentation](https://docs.microsoft.com/azure/active-directory/managed-service-identity/overview) for more information. +~> **NOTE:** When `type` is set to `SystemAssigned`, the identity of the Principal ID can be retrieved after the container group has been created. See [documentation](https://docs.microsoft.com/azure/active-directory/managed-service-identity/overview) for more information. * `identity_ids` - (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Container Group. ~> **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. +~> **NOTE:** Currently you can't use a managed identity in a container group deployed to a virtual network. --- An `init_container` block supports: @@ -166,7 +167,7 @@ A `container` block supports: --- -A `exposed_port` block supports: +An `exposed_port` block supports: * `port` - (Required) The port number the container will expose. Changing this forces a new resource to be created. @@ -182,7 +183,7 @@ A `diagnostics` block supports: --- -A `image_registry_credential` block supports: +An `image_registry_credential` block supports: * `username` - (Required) The username with which to connect to the registry. Changing this forces a new resource to be created. From c09176dbb29ab5fc5c79a546a6e35687177b98fa Mon Sep 17 00:00:00 2001 From: themadsicilian <175916+themadsicilian@users.noreply.github.com> Date: Fri, 5 Aug 2022 05:36:01 -0500 Subject: [PATCH 034/100] Corrected role assignment example usage (#17894) --- website/docs/r/datadog_monitors.html.markdown | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/website/docs/r/datadog_monitors.html.markdown b/website/docs/r/datadog_monitors.html.markdown index 395069f3c46f..8cbd6c581fef 100644 --- a/website/docs/r/datadog_monitors.html.markdown +++ b/website/docs/r/datadog_monitors.html.markdown @@ -118,9 +118,15 @@ To enable metrics flow, perform role assignment on the identity created above. ` ### Role assignment on the monitor created ```hcl +data "azurerm_subscription" "primary" {} + +data "azurerm_role_definition" "monitoring_reader" { + name = "Monitoring Reader" +} + resource "azurerm_role_assignment" "example" { scope = data.azurerm_subscription.primary.id - role_definition_id = "/subscriptions/XXXX-XXXX-XXXX/providers/Microsoft.Authorization/roleDefinitions/43d0d8ad-25c7-4714-9337-8ba259a9fe05" + role_definition_id = data.azurerm_role_definition.monitoring_reader.role_definition_id principal_id = azurerm_datadog_monitor.example.identity.0.principal_id } ``` From 7b4070bf3007a0f4f1db127dc37d73971c97b567 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 5 Aug 2022 15:31:20 +0200 Subject: [PATCH 035/100] fix: typo in Azure Orbital service delegation name (#17896) * fix: typo in Azure Orbital service delegation name * chore: updating subnet documentation Co-authored-by: Thomas MICHEL --- internal/services/network/subnet_resource.go | 2 +- website/docs/r/subnet.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/services/network/subnet_resource.go b/internal/services/network/subnet_resource.go index 5660e724667e..f44c210b7c68 100644 --- a/internal/services/network/subnet_resource.go +++ b/internal/services/network/subnet_resource.go @@ -131,7 +131,7 @@ func resourceSubnet() *pluginsdk.Resource { "Microsoft.Synapse/workspaces", "Microsoft.Web/hostingEnvironments", "Microsoft.Web/serverFarms", - "Microsoft.Orbital/orbitalGateway", + "Microsoft.Orbital/orbitalGateways", "NGINX.NGINXPLUS/nginxDeployments", "PaloAltoNetworks.Cloudngfw/firewalls", }, false), diff --git a/website/docs/r/subnet.html.markdown b/website/docs/r/subnet.html.markdown index 55967cf56aeb..0de4f242a347 100644 --- a/website/docs/r/subnet.html.markdown +++ b/website/docs/r/subnet.html.markdown @@ -91,7 +91,7 @@ A `service_delegation` block supports the following: -> **NOTE:** Delegating to services may not be available in all regions. Check that the service you are delegating to is available in your region using the [Azure CLI](https://docs.microsoft.com/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). Also, `actions` is specific to each service type. The exact list of `actions` needs to be retrieved using the aforementioned [Azure CLI](https://docs.microsoft.com/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). -* `name` - (Required) The name of service to delegate to. Possible values include `Microsoft.ApiManagement/service`, `Microsoft.AzureCosmosDB/clusters`, `Microsoft.BareMetal/AzureVMware`, `Microsoft.BareMetal/CrayServers`, `Microsoft.Batch/batchAccounts`, `Microsoft.ContainerInstance/containerGroups`, `Microsoft.ContainerService/managedClusters`, `Microsoft.Databricks/workspaces`, `Microsoft.DBforMySQL/flexibleServers`, `Microsoft.DBforMySQL/serversv2`, `Microsoft.DBforPostgreSQL/flexibleServers`, `Microsoft.DBforPostgreSQL/serversv2`, `Microsoft.DBforPostgreSQL/singleServers`, `Microsoft.HardwareSecurityModules/dedicatedHSMs`, `Microsoft.Kusto/clusters`, `Microsoft.Logic/integrationServiceEnvironments`, `Microsoft.MachineLearningServices/workspaces`, `Microsoft.Netapp/volumes`, `Microsoft.Network/managedResolvers`, `Microsoft.PowerPlatform/vnetaccesslinks`, `Microsoft.ServiceFabricMesh/networks`, `Microsoft.Sql/managedInstances`, `Microsoft.Sql/servers`, `Microsoft.StoragePool/diskPools`, `Microsoft.StreamAnalytics/streamingJobs`, `Microsoft.Synapse/workspaces`, `Microsoft.Web/hostingEnvironments`, `Microsoft.Web/serverFarms`, `NGINX.NGINXPLUS/nginxDeployments` and `PaloAltoNetworks.Cloudngfw/firewalls`. +* `name` - (Required) The name of service to delegate to. Possible values include `Microsoft.ApiManagement/service`, `Microsoft.AzureCosmosDB/clusters`, `Microsoft.BareMetal/AzureVMware`, `Microsoft.BareMetal/CrayServers`, `Microsoft.Batch/batchAccounts`, `Microsoft.ContainerInstance/containerGroups`, `Microsoft.ContainerService/managedClusters`, `Microsoft.Databricks/workspaces`, `Microsoft.DBforMySQL/flexibleServers`, `Microsoft.DBforMySQL/serversv2`, `Microsoft.DBforPostgreSQL/flexibleServers`, `Microsoft.DBforPostgreSQL/serversv2`, `Microsoft.DBforPostgreSQL/singleServers`, `Microsoft.HardwareSecurityModules/dedicatedHSMs`, `Microsoft.Kusto/clusters`, `Microsoft.Logic/integrationServiceEnvironments`, `Microsoft.MachineLearningServices/workspaces`, `Microsoft.Netapp/volumes`, `Microsoft.Network/managedResolvers`, `Microsoft.Orbital/orbitalGateways`, `Microsoft.PowerPlatform/vnetaccesslinks`, `Microsoft.ServiceFabricMesh/networks`, `Microsoft.Sql/managedInstances`, `Microsoft.Sql/servers`, `Microsoft.StoragePool/diskPools`, `Microsoft.StreamAnalytics/streamingJobs`, `Microsoft.Synapse/workspaces`, `Microsoft.Web/hostingEnvironments`, `Microsoft.Web/serverFarms`, `NGINX.NGINXPLUS/nginxDeployments` and `PaloAltoNetworks.Cloudngfw/firewalls`. * `actions` - (Optional) A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values include `Microsoft.Network/networkinterfaces/*`, `Microsoft.Network/virtualNetworks/subnets/action`, `Microsoft.Network/virtualNetworks/subnets/join/action`, `Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action` and `Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action`. From bff3ac87e88a5fa5ee123ba077f36e0875e485c6 Mon Sep 17 00:00:00 2001 From: Michael Madeja Date: Fri, 5 Aug 2022 08:55:42 -0500 Subject: [PATCH 036/100] Update website/docs/r/postgresql_server.html.markdown Co-authored-by: Tom Harvey --- website/docs/r/postgresql_server.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/postgresql_server.html.markdown b/website/docs/r/postgresql_server.html.markdown index d228131fb765..b4cd84056bbd 100644 --- a/website/docs/r/postgresql_server.html.markdown +++ b/website/docs/r/postgresql_server.html.markdown @@ -82,7 +82,7 @@ The following arguments are supported: * `restore_point_in_time` - (Optional) When `create_mode` is `PointInTimeRestore` the point in time to restore from `creation_source_server_id`. -* `ssl_enforcement_enabled` - (Optional) Specifies if SSL should be enforced on connections. Defaults to `false`. +* `ssl_enforcement_enabled` - (Required) Specifies if SSL should be enforced on connections. -> **NOTE:** `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`. From 6c11a2661722f2ce3b7e7bf92b6865f790df6d6d Mon Sep 17 00:00:00 2001 From: Mike Madeja Date: Fri, 5 Aug 2022 11:13:34 -0500 Subject: [PATCH 037/100] reverted to use SSL 1.2 --- internal/services/postgres/postgresql_server_resource.go | 5 ++--- website/docs/r/postgresql_server.html.markdown | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/services/postgres/postgresql_server_resource.go b/internal/services/postgres/postgresql_server_resource.go index f99001559e52..d65cb06779f6 100644 --- a/internal/services/postgres/postgresql_server_resource.go +++ b/internal/services/postgres/postgresql_server_resource.go @@ -214,14 +214,13 @@ func resourcePostgreSQLServer() *pluginsdk.Resource { "ssl_minimal_tls_version_enforced": { Type: pluginsdk.TypeString, Optional: true, - Default: string(servers.MinimalTlsVersionEnumTLSEnforcementDisabled), + Default: string(servers.MinimalTlsVersionEnumTLSOneTwo), ValidateFunc: validation.StringInSlice(servers.PossibleValuesForMinimalTlsVersionEnum(), false), }, "ssl_enforcement_enabled": { Type: pluginsdk.TypeBool, - Optional: true, - Default: false, + Required: true, }, "threat_detection_policy": { diff --git a/website/docs/r/postgresql_server.html.markdown b/website/docs/r/postgresql_server.html.markdown index d228131fb765..fd7258cec0fa 100644 --- a/website/docs/r/postgresql_server.html.markdown +++ b/website/docs/r/postgresql_server.html.markdown @@ -82,11 +82,11 @@ The following arguments are supported: * `restore_point_in_time` - (Optional) When `create_mode` is `PointInTimeRestore` the point in time to restore from `creation_source_server_id`. -* `ssl_enforcement_enabled` - (Optional) Specifies if SSL should be enforced on connections. Defaults to `false`. +* `ssl_enforcement_enabled` - (Required) Specifies if SSL should be enforced on connections. -> **NOTE:** `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`. -* `ssl_minimal_tls_version_enforced` - (Optional) The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLSEnforcementDisabled`. +* `ssl_minimal_tls_version_enforced` - (Optional) The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`. * `storage_mb` - (Optional) Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/postgresql/concepts-pricing-tiers#storage). From ba74ab5bf0a215a37bf37c87253c002e52bacb90 Mon Sep 17 00:00:00 2001 From: Mike Madeja Date: Fri, 5 Aug 2022 11:15:37 -0500 Subject: [PATCH 038/100] updated markdown for postresql_server --- website/docs/r/postgresql_server.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/postgresql_server.html.markdown b/website/docs/r/postgresql_server.html.markdown index fd7258cec0fa..a4f5021b0ef6 100644 --- a/website/docs/r/postgresql_server.html.markdown +++ b/website/docs/r/postgresql_server.html.markdown @@ -82,7 +82,7 @@ The following arguments are supported: * `restore_point_in_time` - (Optional) When `create_mode` is `PointInTimeRestore` the point in time to restore from `creation_source_server_id`. -* `ssl_enforcement_enabled` - (Required) Specifies if SSL should be enforced on connections. +* `ssl_enforcement_enabled` - (Required) Specifies if SSL should be enforced on connections. Possible values are `true` and `false`. -> **NOTE:** `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`. From 095faad37f77436de1fd857033de6cf23c951ba5 Mon Sep 17 00:00:00 2001 From: catriona-m <86247157+catriona-m@users.noreply.github.com> Date: Mon, 8 Aug 2022 16:36:51 +0100 Subject: [PATCH 039/100] gha -add check for Get in Delete func for typed resources (#17882) --- .github/workflows/issue-comment-created.yaml | 4 ++- .github/workflows/pull-request-reviewed.yaml | 2 ++ scripts/run-gradually-deprecated.sh | 29 ++++++++++++++------ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/issue-comment-created.yaml b/.github/workflows/issue-comment-created.yaml index b6db2af6c7eb..cb490db85eb0 100644 --- a/.github/workflows/issue-comment-created.yaml +++ b/.github/workflows/issue-comment-created.yaml @@ -7,6 +7,8 @@ on: jobs: issue_comment_triage: runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - uses: actions-ecosystem/action-remove-labels@v1 with: @@ -23,7 +25,7 @@ jobs: github_token: "${{ secrets.GITHUB_TOKEN }}" labels: waiting-response - uses: actions-ecosystem/action-add-labels@v1.1.0 - if: ${{ endsWith(github.event.comment.body, '/wr') }} + if: github.event.issue.pull_request && endsWith(github.event.comment.body, '/wr') with: labels: waiting-response github_token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pull-request-reviewed.yaml b/.github/workflows/pull-request-reviewed.yaml index 4cf98b190562..1595a56251b3 100644 --- a/.github/workflows/pull-request-reviewed.yaml +++ b/.github/workflows/pull-request-reviewed.yaml @@ -9,6 +9,8 @@ jobs: add-waiting-response: if: github.event.review.state != 'approved' && github.actor != github.event.pull_request.user.login runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - uses: actions-ecosystem/action-add-labels@v1.1.0 with: diff --git a/scripts/run-gradually-deprecated.sh b/scripts/run-gradually-deprecated.sh index 86c5459c4729..ab20f167c1fb 100755 --- a/scripts/run-gradually-deprecated.sh +++ b/scripts/run-gradually-deprecated.sh @@ -73,17 +73,28 @@ function runGraduallyDeprecatedFunctions { fi # check for d.Get inside Delete - deleteFuncName=$(grep -o "Delete: .*," "$f" -m1 | grep -o " .*Delete") + deleteFuncName=$(grep -o "Delete: .*," "$f" -m1 | grep -o " .*Delete"| tr -d " ") if [ "$deleteFuncName" != "" ]; then - deleteMethod=$(cat -n $f | sed -n -e "/func$deleteFuncName.*$/,/[[:digit:]]*\treturn nil/{ /func$deleteFuncName$/d; /[[:digit:]]*\treturn nil/d; p; }") - foundGet=$(echo "$deleteMethod" | grep "d\.Get(.*)" -m1) - if [ "$foundGet" != "" ]; - then - echo "$f $foundGet" - echo "Please do not use 'd.Get' within the Delete function as this does not work as expected in Delete" - exit 1 - fi + deleteMethod=$(cat -n $f | sed -n -e "/func $deleteFuncName.*$/,/[[:digit:]]*\treturn nil/{ /func $deleteFuncName$/d; /[[:digit:]]*\treturn nil/d; p; }") + foundGet=$(echo "$deleteMethod" | grep "d\.Get(.*)" -m1) + if [ "$foundGet" != "" ]; + then + echo "$f $foundGet" + echo "Please do not use 'd.Get' within the Delete function as this does not work as expected in Delete" + exit 1 + fi + else + # check for Get in typed resource + deleteFuncName=" Delete() sdk.ResourceFunc " + deleteMethod=$(cat -n $f | sed -n -e "/$deleteFuncName.*$/,/[[:digit:]]*\t\t\treturn nil/{ /$deleteFuncName.*$/d; /[[:digit:]]*\t\t\treturn nil/d; p; }") + foundGet=$(echo "$deleteMethod" | grep "metadata.ResourceData.Get" -m1) + if [ "$foundGet" != "" ]; + then + echo "$f $foundGet" + echo "Please do not use 'metadata.ResourceData.Get' within the Delete function as this does not work as expected in Delete" + exit 1 + fi fi done } From aa684885b6f271a15c3d401e34f7308221ca8b8e Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 8 Aug 2022 17:37:25 +0200 Subject: [PATCH 040/100] =?UTF-8?q?#17425=20=E2=80=94=20use=20dot=20operat?= =?UTF-8?q?or=20for=20`principal=5Fid`.=20(#17923)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Skwar --- website/docs/guides/managed_service_identity.html.markdown | 2 +- website/docs/r/virtual_machine_scale_set.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/guides/managed_service_identity.html.markdown b/website/docs/guides/managed_service_identity.html.markdown index 8cd44f8b3846..c717f7d701af 100644 --- a/website/docs/guides/managed_service_identity.html.markdown +++ b/website/docs/guides/managed_service_identity.html.markdown @@ -59,7 +59,7 @@ resource "azurerm_role_assignment" "example" { name = azurerm_virtual_machine.example.name scope = data.azurerm_subscription.primary.id role_definition_id = "${data.azurerm_subscription.subscription.id}${data.azurerm_role_definition.contributor.id}" - principal_id = azurerm_virtual_machine.example.identity[0]["principal_id"] + principal_id = azurerm_virtual_machine.example.identity[0].principal_id } ``` diff --git a/website/docs/r/virtual_machine_scale_set.html.markdown b/website/docs/r/virtual_machine_scale_set.html.markdown index 5bf3c11b2f8a..712aa71503d7 100644 --- a/website/docs/r/virtual_machine_scale_set.html.markdown +++ b/website/docs/r/virtual_machine_scale_set.html.markdown @@ -371,7 +371,7 @@ resource "azurerm_virtual_machine_scale_set" "example" { } output "principal_id" { - value = azurerm_virtual_machine_scale_set.example.identity[0]["principal_id"] + value = azurerm_virtual_machine_scale_set.example.identity[0].principal_id } ``` From d0269ae463502e3c097c42ddc95429262d182eb7 Mon Sep 17 00:00:00 2001 From: Wodans Son <20408400+WodansSon@users.noreply.github.com> Date: Tue, 9 Aug 2022 01:22:57 -0600 Subject: [PATCH 041/100] `azurerm_subnet` - deprecate old enforce fields in favour of the new enable fields (#17464) Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com> --- .../services/network/subnet_data_source.go | 33 ++- internal/services/network/subnet_resource.go | 219 ++++++++++++-- .../services/network/subnet_resource_test.go | 280 +++++++++++++++++- .../tf/pluginsdk/explicitly_null_config.go | 18 ++ website/docs/d/subnet.html.markdown | 6 +- website/docs/r/subnet.html.markdown | 8 +- 6 files changed, 514 insertions(+), 50 deletions(-) create mode 100644 internal/tf/pluginsdk/explicitly_null_config.go diff --git a/internal/services/network/subnet_data_source.go b/internal/services/network/subnet_data_source.go index 09fc30a119bc..41dfe63549d3 100644 --- a/internal/services/network/subnet_data_source.go +++ b/internal/services/network/subnet_data_source.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -14,7 +15,7 @@ import ( ) func dataSourceSubnet() *pluginsdk.Resource { - return &pluginsdk.Resource{ + resource := &pluginsdk.Resource{ Read: dataSourceSubnetRead, Timeouts: &pluginsdk.ResourceTimeout{ @@ -64,18 +65,31 @@ func dataSourceSubnet() *pluginsdk.Resource { Type: pluginsdk.TypeString, }, }, - - "enforce_private_link_endpoint_network_policies": { + "private_endpoint_network_policies_enabled": { Type: pluginsdk.TypeBool, Computed: true, }, - "enforce_private_link_service_network_policies": { + "private_link_service_network_policies_enabled": { Type: pluginsdk.TypeBool, Computed: true, }, }, } + + if !features.FourPointOhBeta() { + resource.Schema["enforce_private_link_endpoint_network_policies"] = &pluginsdk.Schema{ + Type: pluginsdk.TypeBool, + Computed: true, + } + + resource.Schema["enforce_private_link_service_network_policies"] = &pluginsdk.Schema{ + Type: pluginsdk.TypeBool, + Computed: true, + } + } + + return resource } func dataSourceSubnetRead(d *pluginsdk.ResourceData, meta interface{}) error { @@ -88,7 +102,7 @@ func dataSourceSubnetRead(d *pluginsdk.ResourceData, meta interface{}) error { resp, err := client.Get(ctx, id.ResourceGroup, id.VirtualNetworkName, id.Name, "") if err != nil { if utils.ResponseWasNotFound(resp.Response) { - return fmt.Errorf("Error: %s was not found", id) + return fmt.Errorf("%s was not found", id) } return fmt.Errorf("retrieving %s: %+v", id, err) } @@ -110,8 +124,13 @@ func dataSourceSubnetRead(d *pluginsdk.ResourceData, meta interface{}) error { d.Set("address_prefixes", utils.FlattenStringSlice(props.AddressPrefixes)) } - d.Set("enforce_private_link_endpoint_network_policies", flattenSubnetPrivateLinkNetworkPolicy(string(props.PrivateEndpointNetworkPolicies))) - d.Set("enforce_private_link_service_network_policies", flattenSubnetPrivateLinkNetworkPolicy(string(props.PrivateLinkServiceNetworkPolicies))) + if !features.FourPointOhBeta() { + d.Set("enforce_private_link_endpoint_network_policies", flattenEnforceSubnetNetworkPolicy(string(props.PrivateEndpointNetworkPolicies))) + d.Set("enforce_private_link_service_network_policies", flattenEnforceSubnetNetworkPolicy(string(props.PrivateLinkServiceNetworkPolicies))) + } + + d.Set("private_endpoint_network_policies_enabled", flattenSubnetNetworkPolicy(string(props.PrivateEndpointNetworkPolicies))) + d.Set("private_link_service_network_policies_enabled", flattenSubnetNetworkPolicy(string(props.PrivateLinkServiceNetworkPolicies))) networkSecurityGroupId := "" if props.NetworkSecurityGroup != nil && props.NetworkSecurityGroup.ID != nil { diff --git a/internal/services/network/subnet_resource.go b/internal/services/network/subnet_resource.go index f44c210b7c68..634857b0f371 100644 --- a/internal/services/network/subnet_resource.go +++ b/internal/services/network/subnet_resource.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate" @@ -24,7 +25,7 @@ import ( var SubnetResourceName = "azurerm_subnet" func resourceSubnet() *pluginsdk.Resource { - return &pluginsdk.Resource{ + resource := &pluginsdk.Resource{ Create: resourceSubnetCreate, Read: resourceSubnetRead, Update: resourceSubnetUpdate, @@ -160,19 +161,67 @@ func resourceSubnet() *pluginsdk.Resource { }, }, - "enforce_private_link_endpoint_network_policies": { - Type: pluginsdk.TypeBool, + "private_endpoint_network_policies_enabled": { + Type: pluginsdk.TypeBool, + Computed: func() bool { + return !features.FourPointOh() + }(), Optional: true, - Default: false, + Default: func() interface{} { + if !features.FourPointOh() { + return nil + } + return !features.FourPointOh() + }(), + ConflictsWith: func() []string { + if !features.FourPointOh() { + return []string{"enforce_private_link_endpoint_network_policies"} + } + return []string{} + }(), }, - "enforce_private_link_service_network_policies": { - Type: pluginsdk.TypeBool, + "private_link_service_network_policies_enabled": { + Type: pluginsdk.TypeBool, + Computed: func() bool { + return !features.FourPointOh() + }(), Optional: true, - Default: false, + Default: func() interface{} { + if !features.FourPointOh() { + return nil + } + return features.FourPointOh() + }(), + ConflictsWith: func() []string { + if !features.FourPointOh() { + return []string{"enforce_private_link_service_network_policies"} + } + return []string{} + }(), }, }, } + + if !features.FourPointOhBeta() { + resource.Schema["enforce_private_link_endpoint_network_policies"] = &pluginsdk.Schema{ + Type: pluginsdk.TypeBool, + Computed: true, + Optional: true, + Deprecated: "`enforce_private_link_endpoint_network_policies` will be removed in favour of the property `private_endpoint_network_policies_enabled` in version 4.0 of the AzureRM Provider", + ConflictsWith: []string{"private_endpoint_network_policies_enabled"}, + } + + resource.Schema["enforce_private_link_service_network_policies"] = &pluginsdk.Schema{ + Type: pluginsdk.TypeBool, + Computed: true, + Optional: true, + Deprecated: "`enforce_private_link_service_network_policies` will be removed in favour of the property `private_link_service_network_policies_enabled` in version 4.0 of the AzureRM Provider", + ConflictsWith: []string{"private_link_service_network_policies_enabled"}, + } + } + + return resource } // TODO: refactor the create/flatten functions @@ -215,10 +264,72 @@ func resourceSubnetCreate(d *pluginsdk.ResourceData, meta interface{}) error { // To enable private endpoints you must disable the network policies for the subnet because // Network policies like network security groups are not supported by private endpoints. - privateEndpointNetworkPolicies := d.Get("enforce_private_link_endpoint_network_policies").(bool) - privateLinkServiceNetworkPolicies := d.Get("enforce_private_link_service_network_policies").(bool) - properties.PrivateEndpointNetworkPolicies = network.VirtualNetworkPrivateEndpointNetworkPolicies(expandSubnetPrivateLinkNetworkPolicy(privateEndpointNetworkPolicies)) - properties.PrivateLinkServiceNetworkPolicies = network.VirtualNetworkPrivateLinkServiceNetworkPolicies(expandSubnetPrivateLinkNetworkPolicy(privateLinkServiceNetworkPolicies)) + var privateEndpointNetworkPolicies network.VirtualNetworkPrivateEndpointNetworkPolicies + var privateLinkServiceNetworkPolicies network.VirtualNetworkPrivateLinkServiceNetworkPolicies + + if features.FourPointOhBeta() { + privateEndpointNetworkPoliciesRaw := d.Get("private_endpoint_network_policies_enabled").(bool) + privateLinkServiceNetworkPoliciesRaw := d.Get("private_link_service_network_policies_enabled").(bool) + + privateEndpointNetworkPolicies = network.VirtualNetworkPrivateEndpointNetworkPolicies(expandSubnetNetworkPolicy(privateEndpointNetworkPoliciesRaw)) + privateLinkServiceNetworkPolicies = network.VirtualNetworkPrivateLinkServiceNetworkPolicies(expandSubnetNetworkPolicy(privateLinkServiceNetworkPoliciesRaw)) + } else { + var enforceOk bool + var enforceServiceOk bool + var enableOk bool + var enableServiceOk bool + var enforcePrivateEndpointNetworkPoliciesRaw bool + var enforcePrivateLinkServiceNetworkPoliciesRaw bool + var privateEndpointNetworkPoliciesRaw bool + var privateLinkServiceNetworkPoliciesRaw bool + + // Set the legacy default value since they are now computed optional + privateEndpointNetworkPolicies = network.VirtualNetworkPrivateEndpointNetworkPoliciesEnabled + privateLinkServiceNetworkPolicies = network.VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled + + // This is the only way I was able to figure out if the fields are actually in the config or not, + // which is needed here because these are all now optional computed fields... + if !pluginsdk.IsExplicitlyNullInConfig(d, "enforce_private_link_endpoint_network_policies") { + enforceOk = true + enforcePrivateEndpointNetworkPoliciesRaw = d.Get("enforce_private_link_endpoint_network_policies").(bool) + } + + if !pluginsdk.IsExplicitlyNullInConfig(d, "enforce_private_link_service_network_policies") { + enforceServiceOk = true + enforcePrivateLinkServiceNetworkPoliciesRaw = d.Get("enforce_private_link_service_network_policies").(bool) + } + + if !pluginsdk.IsExplicitlyNullInConfig(d, "private_endpoint_network_policies_enabled") { + enableOk = true + privateEndpointNetworkPoliciesRaw = d.Get("private_endpoint_network_policies_enabled").(bool) + } + + if !pluginsdk.IsExplicitlyNullInConfig(d, "private_link_service_network_policies_enabled") { + enableServiceOk = true + privateLinkServiceNetworkPoliciesRaw = d.Get("private_link_service_network_policies_enabled").(bool) + } + + // Only one of these values can be set since they conflict with each other + // if neither of them are set use the default values + if enforceOk || enableOk { + if enforceOk { + privateEndpointNetworkPolicies = network.VirtualNetworkPrivateEndpointNetworkPolicies(expandEnforceSubnetNetworkPolicy(enforcePrivateEndpointNetworkPoliciesRaw)) + } else if enableOk { + privateEndpointNetworkPolicies = network.VirtualNetworkPrivateEndpointNetworkPolicies(expandSubnetNetworkPolicy(privateEndpointNetworkPoliciesRaw)) + } + } + + if enforceServiceOk || enableServiceOk { + if enforceServiceOk { + privateLinkServiceNetworkPolicies = network.VirtualNetworkPrivateLinkServiceNetworkPolicies(expandEnforceSubnetNetworkPolicy(enforcePrivateLinkServiceNetworkPoliciesRaw)) + } else if enableServiceOk { + privateLinkServiceNetworkPolicies = network.VirtualNetworkPrivateLinkServiceNetworkPolicies(expandSubnetNetworkPolicy(privateLinkServiceNetworkPoliciesRaw)) + } + } + } + + properties.PrivateEndpointNetworkPolicies = privateEndpointNetworkPolicies + properties.PrivateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies serviceEndpointPoliciesRaw := d.Get("service_endpoint_policy_ids").(*pluginsdk.Set).List() properties.ServiceEndpointPolicies = expandSubnetServiceEndpointPolicies(serviceEndpointPoliciesRaw) @@ -324,14 +435,50 @@ func resourceSubnetUpdate(d *pluginsdk.ResourceData, meta interface{}) error { props.Delegations = expandSubnetDelegation(delegationsRaw) } - if d.HasChange("enforce_private_link_endpoint_network_policies") { - v := d.Get("enforce_private_link_endpoint_network_policies").(bool) - props.PrivateEndpointNetworkPolicies = network.VirtualNetworkPrivateEndpointNetworkPolicies(expandSubnetPrivateLinkNetworkPolicy(v)) - } + if features.FourPointOhBeta() { + if d.HasChange("private_endpoint_network_policies_enabled") { + v := d.Get("private_endpoint_network_policies_enabled").(bool) + props.PrivateEndpointNetworkPolicies = network.VirtualNetworkPrivateEndpointNetworkPolicies(expandSubnetNetworkPolicy(v)) + } + + if d.HasChange("private_link_service_network_policies_enabled") { + v := d.Get("private_link_service_network_policies_enabled").(bool) + props.PrivateLinkServiceNetworkPolicies = network.VirtualNetworkPrivateLinkServiceNetworkPolicies(expandSubnetNetworkPolicy(v)) + } + } else { + // This is the best case we can do in this state since they are computed optional fields now + // If you remove the fields from the config they will just persist as they are, if you change + // one it will update it to the value that was changed and in the read the other value will be + // updated as well to reflect the new value so it is safe to toggle between which field you want + // to use to define this behavior... + var privateEndpointNetworkPolicies network.VirtualNetworkPrivateEndpointNetworkPolicies + var privateLinkServiceNetworkPolicies network.VirtualNetworkPrivateLinkServiceNetworkPolicies + + if d.HasChange("enforce_private_link_endpoint_network_policies") || d.HasChange("private_endpoint_network_policies_enabled") { + enforcePrivateEndpointNetworkPoliciesRaw := d.Get("enforce_private_link_endpoint_network_policies").(bool) + privateEndpointNetworkPoliciesRaw := d.Get("private_endpoint_network_policies_enabled").(bool) + + if d.HasChange("enforce_private_link_endpoint_network_policies") { + privateEndpointNetworkPolicies = network.VirtualNetworkPrivateEndpointNetworkPolicies(expandEnforceSubnetNetworkPolicy(enforcePrivateEndpointNetworkPoliciesRaw)) + } else if d.HasChange("private_endpoint_network_policies_enabled") { + privateEndpointNetworkPolicies = network.VirtualNetworkPrivateEndpointNetworkPolicies(expandSubnetNetworkPolicy(privateEndpointNetworkPoliciesRaw)) + } + + props.PrivateEndpointNetworkPolicies = privateEndpointNetworkPolicies + } - if d.HasChange("enforce_private_link_service_network_policies") { - v := d.Get("enforce_private_link_service_network_policies").(bool) - props.PrivateLinkServiceNetworkPolicies = network.VirtualNetworkPrivateLinkServiceNetworkPolicies(expandSubnetPrivateLinkNetworkPolicy(v)) + if d.HasChange("enforce_private_link_service_network_policies") || d.HasChange("private_link_service_network_policies_enabled") { + enforcePrivateLinkServiceNetworkPoliciesRaw := d.Get("enforce_private_link_service_network_policies").(bool) + privateLinkServiceNetworkPoliciesRaw := d.Get("private_link_service_network_policies_enabled").(bool) + + if d.HasChange("enforce_private_link_service_network_policies") { + privateLinkServiceNetworkPolicies = network.VirtualNetworkPrivateLinkServiceNetworkPolicies(expandEnforceSubnetNetworkPolicy(enforcePrivateLinkServiceNetworkPoliciesRaw)) + } else if d.HasChange("private_link_service_network_policies_enabled") { + privateLinkServiceNetworkPolicies = network.VirtualNetworkPrivateLinkServiceNetworkPolicies(expandSubnetNetworkPolicy(privateLinkServiceNetworkPoliciesRaw)) + } + + props.PrivateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies + } } if d.HasChange("service_endpoints") { @@ -379,6 +526,7 @@ func resourceSubnetUpdate(d *pluginsdk.ResourceData, meta interface{}) error { MinTimeout: 1 * time.Minute, Timeout: time.Until(timeout), } + if _, err = vnetStateConf.WaitForStateContext(ctx); err != nil { return fmt.Errorf("waiting for provisioning state of virtual network for %s: %+v", id, err) } @@ -425,8 +573,13 @@ func resourceSubnetRead(d *pluginsdk.ResourceData, meta interface{}) error { return fmt.Errorf("flattening `delegation`: %+v", err) } - d.Set("enforce_private_link_endpoint_network_policies", flattenSubnetPrivateLinkNetworkPolicy(string(props.PrivateEndpointNetworkPolicies))) - d.Set("enforce_private_link_service_network_policies", flattenSubnetPrivateLinkNetworkPolicy(string(props.PrivateLinkServiceNetworkPolicies))) + if !features.FourPointOhBeta() { + d.Set("enforce_private_link_endpoint_network_policies", flattenEnforceSubnetNetworkPolicy(string(props.PrivateEndpointNetworkPolicies))) + d.Set("enforce_private_link_service_network_policies", flattenEnforceSubnetNetworkPolicy(string(props.PrivateLinkServiceNetworkPolicies))) + } + + d.Set("private_endpoint_network_policies_enabled", flattenSubnetNetworkPolicy(string(props.PrivateEndpointNetworkPolicies))) + d.Set("private_link_service_network_policies_enabled", flattenSubnetNetworkPolicy(string(props.PrivateLinkServiceNetworkPolicies))) serviceEndpoints := flattenSubnetServiceEndpoints(props.ServiceEndpoints) if err := d.Set("service_endpoints", serviceEndpoints); err != nil { @@ -569,24 +722,36 @@ func flattenSubnetDelegation(delegations *[]network.Delegation) []interface{} { return retDeles } -// TODO: confirm this logic below - -func expandSubnetPrivateLinkNetworkPolicy(enabled bool) string { +// TODO 4.0: Remove expandEnforceSubnetPrivateLinkNetworkPolicy function +func expandEnforceSubnetNetworkPolicy(enabled bool) string { // This is strange logic, but to get the schema to make sense for the end user // I exposed it with the same name that the Azure CLI does to be consistent // between the tool sets, which means true == Disabled. if enabled { - return "Disabled" + return string(network.VirtualNetworkPrivateEndpointNetworkPoliciesDisabled) + } + + return string(network.VirtualNetworkPrivateEndpointNetworkPoliciesEnabled) +} + +func expandSubnetNetworkPolicy(enabled bool) string { + if enabled { + return string(network.VirtualNetworkPrivateEndpointNetworkPoliciesEnabled) } - return "Enabled" + return string(network.VirtualNetworkPrivateEndpointNetworkPoliciesDisabled) } -func flattenSubnetPrivateLinkNetworkPolicy(input string) bool { +// TODO 4.0: Remove flattenEnforceSubnetPrivateLinkNetworkPolicy function +func flattenEnforceSubnetNetworkPolicy(input string) bool { // This is strange logic, but to get the schema to make sense for the end user // I exposed it with the same name that the Azure CLI does to be consistent // between the tool sets, which means true == Disabled. - return strings.EqualFold(input, "Disabled") + return strings.EqualFold(input, string(network.VirtualNetworkPrivateEndpointNetworkPoliciesDisabled)) +} + +func flattenSubnetNetworkPolicy(input string) bool { + return strings.EqualFold(input, string(network.VirtualNetworkPrivateEndpointNetworkPoliciesEnabled)) } func expandSubnetServiceEndpointPolicies(input []interface{}) *[]network.ServiceEndpointPolicy { diff --git a/internal/services/network/subnet_resource_test.go b/internal/services/network/subnet_resource_test.go index 26beaec0cf06..14e6a773dec1 100644 --- a/internal/services/network/subnet_resource_test.go +++ b/internal/services/network/subnet_resource_test.go @@ -8,6 +8,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" @@ -155,27 +156,27 @@ func TestAccSubnet_delegation(t *testing.T) { }) } -func TestAccSubnet_enforcePrivateLinkEndpointNetworkPolicies(t *testing.T) { +func TestAccSubnet_enablePrivateEndpointNetworkPolicies(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_subnet", "test") r := SubnetResource{} data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.enforcePrivateLinkEndpointNetworkPolicies(data, true), + Config: r.enablePrivateEndpointNetworkPolicies(data, true), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), }, data.ImportStep(), { - Config: r.enforcePrivateLinkEndpointNetworkPolicies(data, false), + Config: r.enablePrivateEndpointNetworkPolicies(data, false), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), }, data.ImportStep(), { - Config: r.enforcePrivateLinkEndpointNetworkPolicies(data, true), + Config: r.enablePrivateEndpointNetworkPolicies(data, true), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), @@ -184,27 +185,27 @@ func TestAccSubnet_enforcePrivateLinkEndpointNetworkPolicies(t *testing.T) { }) } -func TestAccSubnet_enforcePrivateLinkServiceNetworkPolicies(t *testing.T) { +func TestAccSubnet_enablePrivateLinkServiceNetworkPolicies(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_subnet", "test") r := SubnetResource{} data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.enforcePrivateLinkServiceNetworkPolicies(data, true), + Config: r.enablePrivateLinkServiceNetworkPolicies(data, true), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), }, data.ImportStep(), { - Config: r.enforcePrivateLinkServiceNetworkPolicies(data, false), + Config: r.enablePrivateLinkServiceNetworkPolicies(data, false), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), }, data.ImportStep(), { - Config: r.enforcePrivateLinkServiceNetworkPolicies(data, true), + Config: r.enablePrivateLinkServiceNetworkPolicies(data, true), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), @@ -213,6 +214,188 @@ func TestAccSubnet_enforcePrivateLinkServiceNetworkPolicies(t *testing.T) { }) } +// TODO 4.0: Remove test +func TestAccSubnet_enforcePrivateLinkEndpointNetworkPolicies(t *testing.T) { + if !features.FourPointOhBeta() { + data := acceptance.BuildTestData(t, "azurerm_subnet", "test") + r := SubnetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.enforcePrivateLinkEndpointNetworkPolicies(data, true), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.enforcePrivateLinkEndpointNetworkPolicies(data, false), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.enforcePrivateLinkEndpointNetworkPolicies(data, true), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) + } else { + t.Skip("@WodansSon: skipping due to deprecation of the 'enforce_private_link_endpoint_network_policies' field in 4.0") + } +} + +// TODO 4.0: Remove test +func TestAccSubnet_enforcePrivateLinkServiceNetworkPolicies(t *testing.T) { + if !features.FourPointOhBeta() { + data := acceptance.BuildTestData(t, "azurerm_subnet", "test") + r := SubnetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.enforcePrivateLinkServiceNetworkPolicies(data, true), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.enforcePrivateLinkServiceNetworkPolicies(data, false), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.enforcePrivateLinkServiceNetworkPolicies(data, true), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) + } else { + t.Skip("@WodansSon: skipping due to deprecation of the 'enforce_private_link_service_network_policies' field in 4.0") + } +} + +// TODO 4.0: Remove test +func TestAccSubnet_PrivateLinkPoliciesToggleWithEnforceFirst(t *testing.T) { + if !features.FourPointOhBeta() { + data := acceptance.BuildTestData(t, "azurerm_subnet", "test") + r := SubnetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.enforcePrivateLinkEndpointNetworkPolicies(data, true), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("enforce_private_link_endpoint_network_policies").HasValue("true"), + check.That(data.ResourceName).Key("enforce_private_link_service_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("false"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.enablePrivateEndpointNetworkPolicies(data, true), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("enforce_private_link_endpoint_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("enforce_private_link_service_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("true"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.enforcePrivateLinkServiceNetworkPolicies(data, true), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("enforce_private_link_endpoint_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("enforce_private_link_service_network_policies").HasValue("true"), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("true"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.enablePrivateLinkServiceNetworkPolicies(data, true), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("enforce_private_link_endpoint_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("enforce_private_link_service_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("true"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) + } else { + t.Skip("@WodansSon: skipping due to deprecation of the 'enforce_private_link_endpoint_network_policies' and 'enforce_private_link_service_network_policies' fields in 4.0") + } +} + +// TODO 4.0: Remove test +func TestAccSubnet_PrivateLinkPoliciesToggleWithEnabledFirst(t *testing.T) { + if !features.FourPointOhBeta() { + data := acceptance.BuildTestData(t, "azurerm_subnet", "test") + r := SubnetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.enablePrivateEndpointNetworkPolicies(data, false), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("enforce_private_link_endpoint_network_policies").HasValue("true"), + check.That(data.ResourceName).Key("enforce_private_link_service_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("false"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.enforcePrivateLinkEndpointNetworkPolicies(data, false), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("enforce_private_link_endpoint_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("enforce_private_link_service_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("true"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.enablePrivateLinkServiceNetworkPolicies(data, false), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("enforce_private_link_endpoint_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("enforce_private_link_service_network_policies").HasValue("true"), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("true"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.enforcePrivateLinkServiceNetworkPolicies(data, false), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("enforce_private_link_endpoint_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("enforce_private_link_service_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("true"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) + } else { + t.Skip("@WodansSon: skipping due to deprecation of the 'enforce_private_link_endpoint_network_policies' and 'enforce_private_link_service_network_policies' fields in 4.0") + } +} + func TestAccSubnet_serviceEndpoints(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_subnet", "test") r := SubnetResource{} @@ -300,6 +483,42 @@ func TestAccSubnet_updateAddressPrefix(t *testing.T) { }) } +func TestAccSubnet_privateLinkEndpointNetworkPoliciesValidateDefaultValues(t *testing.T) { + if features.FourPointOhBeta() { + data := acceptance.BuildTestData(t, "azurerm_subnet", "test") + r := SubnetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.privateLinkEndpointNetworkPoliciesDefaults(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("false"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) + } else { + data := acceptance.BuildTestData(t, "azurerm_subnet", "test") + r := SubnetResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.privateLinkEndpointNetworkPoliciesDefaults(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("enforce_private_link_endpoint_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("enforce_private_link_service_network_policies").HasValue("false"), + check.That(data.ResourceName).Key("private_endpoint_network_policies_enabled").HasValue("true"), + check.That(data.ResourceName).Key("private_link_service_network_policies_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) + } +} + func TestAccSubnet_updateServiceDelegation(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_subnet", "test") r := SubnetResource{} @@ -503,6 +722,37 @@ resource "azurerm_subnet" "test" { `, r.template(data)) } +func (r SubnetResource) enablePrivateEndpointNetworkPolicies(data acceptance.TestData, enabled bool) string { + return fmt.Sprintf(` +%s + +resource "azurerm_subnet" "test" { + name = "internal" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.2.0/24"] + + private_endpoint_network_policies_enabled = %t +} +`, r.template(data), enabled) +} + +func (r SubnetResource) enablePrivateLinkServiceNetworkPolicies(data acceptance.TestData, enabled bool) string { + return fmt.Sprintf(` +%s + +resource "azurerm_subnet" "test" { + name = "internal" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.2.0/24"] + + private_link_service_network_policies_enabled = %t +} +`, r.template(data), enabled) +} + +// TODO 4.0: Remove test func (r SubnetResource) enforcePrivateLinkEndpointNetworkPolicies(data acceptance.TestData, enabled bool) string { return fmt.Sprintf(` %s @@ -518,6 +768,7 @@ resource "azurerm_subnet" "test" { `, r.template(data), enabled) } +// TODO 4.0: Remove test func (r SubnetResource) enforcePrivateLinkServiceNetworkPolicies(data acceptance.TestData, enabled bool) string { return fmt.Sprintf(` %s @@ -533,6 +784,19 @@ resource "azurerm_subnet" "test" { `, r.template(data), enabled) } +func (r SubnetResource) privateLinkEndpointNetworkPoliciesDefaults(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_subnet" "test" { + name = "internal" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.2.0/24"] +} +`, r.template(data)) +} + func (SubnetResource) basic_addressPrefixes(data acceptance.TestData) string { return fmt.Sprintf(` resource "azurerm_resource_group" "test" { diff --git a/internal/tf/pluginsdk/explicitly_null_config.go b/internal/tf/pluginsdk/explicitly_null_config.go new file mode 100644 index 000000000000..5425d4f2c3d9 --- /dev/null +++ b/internal/tf/pluginsdk/explicitly_null_config.go @@ -0,0 +1,18 @@ +package pluginsdk + +// IsExplicitlyNullInConfig determines whether the specified 'configFieldName' +// exists in the configuration file or not. +// +// Returns 'true' if the 'configFieldName' is not found in the configuration file or 'false' if +// the 'configFieldName' is found in the configuration file. +func IsExplicitlyNullInConfig(d *ResourceData, configFieldName string) bool { + var isNull bool + + v := d.GetRawConfig().AsValueMap()[configFieldName] + + if v.IsNull() { + isNull = true + } + + return isNull +} diff --git a/website/docs/d/subnet.html.markdown b/website/docs/d/subnet.html.markdown index fb8aa235a224..23f4ca35f55a 100644 --- a/website/docs/d/subnet.html.markdown +++ b/website/docs/d/subnet.html.markdown @@ -33,14 +33,12 @@ output "subnet_id" { ## Attributes Reference * `id` - The ID of the Subnet. -* `address_prefix` - (Deprecated) The address prefix used for the subnet. * `address_prefixes` - The address prefixes for the subnet. -* `enforce_private_link_service_network_policies` - Enable or Disable network policies on private link service in the subnet. * `network_security_group_id` - The ID of the Network Security Group associated with the subnet. * `route_table_id` - The ID of the Route Table associated with this subnet. * `service_endpoints` - A list of Service Endpoints within this subnet. -* `enforce_private_link_endpoint_network_policies` - Enable or Disable network policies for the private link endpoint on the subnet. -* `enforce_private_link_service_network_policies` - Enable or Disable network policies for the private link service on the subnet. +* `private_endpoint_network_policies_enabled` - Enable or Disable network policies for the private endpoint on the subnet. +* `private_link_service_network_policies_enabled` - Enable or Disable network policies for the private link service on the subnet. ## Timeouts diff --git a/website/docs/r/subnet.html.markdown b/website/docs/r/subnet.html.markdown index 0de4f242a347..ae44cd181468 100644 --- a/website/docs/r/subnet.html.markdown +++ b/website/docs/r/subnet.html.markdown @@ -65,13 +65,13 @@ The following arguments are supported: * `delegation` - (Optional) One or more `delegation` blocks as defined below. -* `enforce_private_link_endpoint_network_policies` - (Optional) Enable or Disable network policies for the private link endpoint on the subnet. Setting this to `true` will **Disable** the policy and setting this to `false` will **Enable** the policy. Default value is `false`. +* `private_endpoint_network_policies_enabled` - (Optional) Enable or Disable network policies for the private endpoint on the subnet. Setting this to `true` will **Enable** the policy and setting this to `false` will **Disable** the policy. Defaults to `true`. --> **NOTE:** Network policies, like network security groups (NSG), are not supported for Private Link Endpoints or Private Link Services. In order to deploy a Private Link Endpoint on a given subnet, you must set the `enforce_private_link_endpoint_network_policies` attribute to `true`. This setting is only applicable for the Private Link Endpoint, for all other resources in the subnet access is controlled based via the Network Security Group which can be configured using the `azurerm_subnet_network_security_group_association` resource. +-> **NOTE:** Network policies, like network security groups (NSG), are not supported for Private Link Endpoints or Private Link Services. In order to deploy a Private Link Endpoint on a given subnet, you must set the `private_endpoint_network_policies_enabled` attribute to `false`. This setting is only applicable for the Private Link Endpoint, for all other resources in the subnet access is controlled based via the Network Security Group which can be configured using the `azurerm_subnet_network_security_group_association` resource. -* `enforce_private_link_service_network_policies` - (Optional) Enable or Disable network policies for the private link service on the subnet. Setting this to `true` will **Disable** the policy and setting this to `false` will **Enable** the policy. Default value is `false`. +* `private_link_service_network_policies_enabled` - (Optional) Enable or Disable network policies for the private link service on the subnet. Setting this to `true` will **Enable** the policy and setting this to `false` will **Disable** the policy. Defaults to `true`. --> **NOTE:** In order to deploy a Private Link Service on a given subnet, you must set the `enforce_private_link_service_network_policies` attribute to `true`. This setting is only applicable for the Private Link Service, for all other resources in the subnet access is controlled based on the Network Security Group which can be configured using the `azurerm_subnet_network_security_group_association` resource. +-> **NOTE:** In order to deploy a Private Link Service on a given subnet, you must set the `private_link_service_network_policies_enabled` attribute to `false`. This setting is only applicable for the Private Link Service, for all other resources in the subnet access is controlled based on the Network Security Group which can be configured using the `azurerm_subnet_network_security_group_association` resource. * `service_endpoints` - (Optional) The list of Service endpoints to associate with the subnet. Possible values include: `Microsoft.AzureActiveDirectory`, `Microsoft.AzureCosmosDB`, `Microsoft.ContainerRegistry`, `Microsoft.EventHub`, `Microsoft.KeyVault`, `Microsoft.ServiceBus`, `Microsoft.Sql`, `Microsoft.Storage` and `Microsoft.Web`. From 002d245f6b8e7ddbc9b87cce01fccb2910d695c2 Mon Sep 17 00:00:00 2001 From: jackofallops <11830746+jackofallops@users.noreply.github.com> Date: Tue, 9 Aug 2022 08:27:00 +0100 Subject: [PATCH 042/100] Update for #17464 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 808b00fa27cc..31ed685154e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 3.18.0 (Unreleased) + +ENHANCEMENTS: + +* `azurerm_subnet` - deprecate `enforce_private_link_endpoint_network_policies` property in favour of `private_endpoint_network_policies_enabled` [GH-17464] +* `azurerm_subnet` - deprecate `enforce_private_link_service_network_policies` property in favour of `private_link_service_network_policies_enabled` [GH-17464] + ## 3.17.0 (August 04, 2022) ENHANCEMENTS: From d589d08c6e0c1e81dd78f432fe720f6b0656ed35 Mon Sep 17 00:00:00 2001 From: Tao <104055472+teowa@users.noreply.github.com> Date: Tue, 9 Aug 2022 15:58:11 +0800 Subject: [PATCH 043/100] fix doc of schduled query rule alert: import command case sensitivity --- .../docs/r/monitor_scheduled_query_rules_alert.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/monitor_scheduled_query_rules_alert.html.markdown b/website/docs/r/monitor_scheduled_query_rules_alert.html.markdown index b1a217a9b5c6..16a375a49248 100644 --- a/website/docs/r/monitor_scheduled_query_rules_alert.html.markdown +++ b/website/docs/r/monitor_scheduled_query_rules_alert.html.markdown @@ -167,5 +167,5 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/l Scheduled Query Rule Alerts can be imported using the `resource id`, e.g. ```shell -terraform import azurerm_monitor_scheduled_query_rules_alert.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/scheduledqueryrules/myrulename +terraform import azurerm_monitor_scheduled_query_rules_alert.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/scheduledQueryRules/myrulename ``` From f0494ed28a8795628cf1cc7be11de2bfc254c49d Mon Sep 17 00:00:00 2001 From: Yun Liu Date: Tue, 9 Aug 2022 20:07:25 +0800 Subject: [PATCH 044/100] Update doc and deprecated warning in `azurerm_security_center_server_vulnerability_assessment` with correct resource name (#17874) * update doc with correct resource name * Update azurerm_security_center_server_vulnerability_assessment.html.markdown Co-authored-by: catriona-m <86247157+catriona-m@users.noreply.github.com> --- .../security_center_server_vulnerability_assessment_resource.go | 2 +- ...ecurity_center_server_vulnerability_assessment.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/services/securitycenter/security_center_server_vulnerability_assessment_resource.go b/internal/services/securitycenter/security_center_server_vulnerability_assessment_resource.go index b18b0331a4c3..e435b11ea828 100644 --- a/internal/services/securitycenter/security_center_server_vulnerability_assessment_resource.go +++ b/internal/services/securitycenter/security_center_server_vulnerability_assessment_resource.go @@ -40,7 +40,7 @@ func resourceServerVulnerabilityAssessment() *pluginsdk.Resource { Delete: pluginsdk.DefaultTimeout(10 * time.Minute), }, - DeprecationMessage: `This resource has been deprecated in favour of the 'azurerm_security_center_vm_server_vulnerability_assessment' resource and will be removed in v4.0 of the AzureRM Provider`, + DeprecationMessage: `This resource has been deprecated in favour of the 'azurerm_security_center_server_vulnerability_assessment_virtual_machine' resource and will be removed in v4.0 of the AzureRM Provider`, Schema: map[string]*pluginsdk.Schema{ "virtual_machine_id": { diff --git a/website/docs/r/azurerm_security_center_server_vulnerability_assessment.html.markdown b/website/docs/r/azurerm_security_center_server_vulnerability_assessment.html.markdown index 487fad33dde5..3ddb87f13552 100644 --- a/website/docs/r/azurerm_security_center_server_vulnerability_assessment.html.markdown +++ b/website/docs/r/azurerm_security_center_server_vulnerability_assessment.html.markdown @@ -10,7 +10,7 @@ description: |- Manages an Azure Server Vulnerability Assessment (Qualys) to a VM. --> **NOTE** This resource has been deprecated in favour of the `azurerm_security_center_vm_server_vulnerability_assessment` resource and will be removed in v3.0 of the AzureRM Provider. +-> **NOTE** This resource has been deprecated in favour of the `azurerm_security_center_server_vulnerability_assessment_virtual_machine` resource and will be removed in v4.0 of the AzureRM Provider. -> **NOTE** Azure Defender has to be enabled on the subscription in order for this resource to work. See this [documentation](https://docs.microsoft.com/azure/security-center/security-center-get-started) to get started. From 816e1ae1e78819e5b8489618597483cf1030513d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6nckemeyer?= Date: Tue, 9 Aug 2022 14:11:44 +0200 Subject: [PATCH 045/100] Fix function app examples (#17908) * fix: primary_access_key in function app * fix: linux function app example * fix: formatiing --- website/docs/r/linux_function_app.html.markdown | 5 +++-- website/docs/r/windows_function_app.html.markdown | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/website/docs/r/linux_function_app.html.markdown b/website/docs/r/linux_function_app.html.markdown index 74ef289e5da8..0bf6a7d29ed5 100644 --- a/website/docs/r/linux_function_app.html.markdown +++ b/website/docs/r/linux_function_app.html.markdown @@ -43,8 +43,9 @@ resource "azurerm_linux_function_app" "example" { resource_group_name = azurerm_resource_group.example.name location = azurerm_resource_group.example.location - storage_account_name = azurerm_storage_account.example.name - service_plan_id = azurerm_service_plan.example.id + storage_account_name = azurerm_storage_account.example.name + storage_account_access_key = azurerm_storage_account.example.primary_access_key + service_plan_id = azurerm_service_plan.example.id site_config {} } diff --git a/website/docs/r/windows_function_app.html.markdown b/website/docs/r/windows_function_app.html.markdown index 04a3d630c3d0..d1da0fe2f92a 100644 --- a/website/docs/r/windows_function_app.html.markdown +++ b/website/docs/r/windows_function_app.html.markdown @@ -43,8 +43,9 @@ resource "azurerm_windows_function_app" "example" { resource_group_name = azurerm_resource_group.example.name location = azurerm_resource_group.example.location - storage_account_name = azurerm_storage_account.example.name - service_plan_id = azurerm_service_plan.example.id + storage_account_name = azurerm_storage_account.example.name + storage_account_access_key = azurerm_storage_account.example.primary_access_key + service_plan_id = azurerm_service_plan.example.id site_config {} } From 0de1c69190e0c7517bcde9a06844761bcf44f1f2 Mon Sep 17 00:00:00 2001 From: Heng Lu <79895375+ms-henglu@users.noreply.github.com> Date: Tue, 9 Aug 2022 20:26:42 +0800 Subject: [PATCH 046/100] add note for spring cloud enterprise sku (#17920) * add note for spring cloud enterprise sku * update notes --- website/docs/r/spring_cloud_api_portal.html.markdown | 2 ++ .../r/spring_cloud_api_portal_custom_domain.html.markdown | 2 ++ website/docs/r/spring_cloud_build_deployment.html.markdown | 2 ++ .../docs/r/spring_cloud_build_pack_binding.html.markdown | 2 ++ website/docs/r/spring_cloud_builder.html.markdown | 2 ++ .../docs/r/spring_cloud_configuration_service.html.markdown | 2 ++ website/docs/r/spring_cloud_gateway.html.markdown | 2 ++ .../docs/r/spring_cloud_gateway_custom_domain.html.markdown | 2 ++ .../docs/r/spring_cloud_gateway_route_config.html.markdown | 2 ++ website/docs/r/spring_cloud_java_deployment.html.markdown | 2 ++ website/docs/r/spring_cloud_service.html.markdown | 6 +++--- 11 files changed, 23 insertions(+), 3 deletions(-) diff --git a/website/docs/r/spring_cloud_api_portal.html.markdown b/website/docs/r/spring_cloud_api_portal.html.markdown index ab0609962984..60ccc63acdfd 100644 --- a/website/docs/r/spring_cloud_api_portal.html.markdown +++ b/website/docs/r/spring_cloud_api_portal.html.markdown @@ -10,6 +10,8 @@ description: |- Manages a Spring Cloud API Portal. +-> **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier. + ## Example Usage ```hcl diff --git a/website/docs/r/spring_cloud_api_portal_custom_domain.html.markdown b/website/docs/r/spring_cloud_api_portal_custom_domain.html.markdown index f2b8d0cc4c31..33670abac43d 100644 --- a/website/docs/r/spring_cloud_api_portal_custom_domain.html.markdown +++ b/website/docs/r/spring_cloud_api_portal_custom_domain.html.markdown @@ -10,6 +10,8 @@ description: |- Manages a Spring Cloud API Portal Domain. +-> **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier. + ## Example Usage ```hcl diff --git a/website/docs/r/spring_cloud_build_deployment.html.markdown b/website/docs/r/spring_cloud_build_deployment.html.markdown index 3e3cdad80176..385fa58c37c5 100644 --- a/website/docs/r/spring_cloud_build_deployment.html.markdown +++ b/website/docs/r/spring_cloud_build_deployment.html.markdown @@ -10,6 +10,8 @@ description: |- Manages a Spring Cloud Build Deployment. +-> **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier. + ## Example Usage ```hcl diff --git a/website/docs/r/spring_cloud_build_pack_binding.html.markdown b/website/docs/r/spring_cloud_build_pack_binding.html.markdown index 1cf708ccc5fb..6c702155c19a 100644 --- a/website/docs/r/spring_cloud_build_pack_binding.html.markdown +++ b/website/docs/r/spring_cloud_build_pack_binding.html.markdown @@ -10,6 +10,8 @@ description: |- Manages a Spring Cloud Buildpack Binding. +-> **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier. + ## Example Usage ```hcl diff --git a/website/docs/r/spring_cloud_builder.html.markdown b/website/docs/r/spring_cloud_builder.html.markdown index 56c9fb734b6b..6c4afa76834f 100644 --- a/website/docs/r/spring_cloud_builder.html.markdown +++ b/website/docs/r/spring_cloud_builder.html.markdown @@ -10,6 +10,8 @@ description: |- Manages a Spring Cloud Builder. +-> **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier. + ## Example Usage ```hcl diff --git a/website/docs/r/spring_cloud_configuration_service.html.markdown b/website/docs/r/spring_cloud_configuration_service.html.markdown index b42b06b25087..b5a074804530 100644 --- a/website/docs/r/spring_cloud_configuration_service.html.markdown +++ b/website/docs/r/spring_cloud_configuration_service.html.markdown @@ -10,6 +10,8 @@ description: |- Manages a Spring Cloud Configuration Service. +-> **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier. + ## Example Usage ```hcl diff --git a/website/docs/r/spring_cloud_gateway.html.markdown b/website/docs/r/spring_cloud_gateway.html.markdown index 68c386a628fd..fc191207dfba 100644 --- a/website/docs/r/spring_cloud_gateway.html.markdown +++ b/website/docs/r/spring_cloud_gateway.html.markdown @@ -8,6 +8,8 @@ description: |- # azurerm_spring_cloud_gateway +-> **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier. + Manages a Spring Cloud Gateway. ## Example Usage diff --git a/website/docs/r/spring_cloud_gateway_custom_domain.html.markdown b/website/docs/r/spring_cloud_gateway_custom_domain.html.markdown index faff8df23e05..c047af4f5b4c 100644 --- a/website/docs/r/spring_cloud_gateway_custom_domain.html.markdown +++ b/website/docs/r/spring_cloud_gateway_custom_domain.html.markdown @@ -10,6 +10,8 @@ description: |- Manages a Spring Cloud Gateway Custom Domain. +-> **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier. + ## Example Usage ```hcl diff --git a/website/docs/r/spring_cloud_gateway_route_config.html.markdown b/website/docs/r/spring_cloud_gateway_route_config.html.markdown index 40adcdcbcdb1..f31053b3059c 100644 --- a/website/docs/r/spring_cloud_gateway_route_config.html.markdown +++ b/website/docs/r/spring_cloud_gateway_route_config.html.markdown @@ -10,6 +10,8 @@ description: |- Manages a Spring Cloud Gateway Route Config. +-> **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier. + ## Example Usage ```hcl diff --git a/website/docs/r/spring_cloud_java_deployment.html.markdown b/website/docs/r/spring_cloud_java_deployment.html.markdown index f116acdb26d4..2482f548b4fc 100644 --- a/website/docs/r/spring_cloud_java_deployment.html.markdown +++ b/website/docs/r/spring_cloud_java_deployment.html.markdown @@ -10,6 +10,8 @@ description: |- Manages an Azure Spring Cloud Deployment with a Java runtime. +-> **NOTE:** This resource is applicable only for Spring Cloud Service with basic and standard tier. + ## Example Usage ```hcl diff --git a/website/docs/r/spring_cloud_service.html.markdown b/website/docs/r/spring_cloud_service.html.markdown index e8d4b9cf2f34..c082bfd05aa9 100644 --- a/website/docs/r/spring_cloud_service.html.markdown +++ b/website/docs/r/spring_cloud_service.html.markdown @@ -62,15 +62,15 @@ The following arguments are supported: * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. -* `build_agent_pool_size` - (Optional) Specifies the size for this Spring Cloud Service's default build agent pool. Possible values are `S1`, `S2`, `S3`, `S4` and `S5`. +* `build_agent_pool_size` - (Optional) Specifies the size for this Spring Cloud Service's default build agent pool. Possible values are `S1`, `S2`, `S3`, `S4` and `S5`. This field is applicable only for Spring Cloud Service with enterprise tier. * `sku_name` - (Optional) Specifies the SKU Name for this Spring Cloud Service. Possible values are `B0`, `S0` and `E0`. Defaults to `S0`. * `network` - (Optional) A `network` block as defined below. Changing this forces a new resource to be created. -* `config_server_git_setting` - (Optional) A `config_server_git_setting` block as defined below. +* `config_server_git_setting` - (Optional) A `config_server_git_setting` block as defined below. This field is applicable only for Spring Cloud Service with basic and standard tier. -* `service_registry_enabled` - (Optional) Whether enable the default Service Registry. +* `service_registry_enabled` - (Optional) Whether enable the default Service Registry. This field is applicable only for Spring Cloud Service with enterprise tier. * `trace` - (Optional) A `trace` block as defined below. From 90265869f5daed14532f38b3e3f19b2c5876dccf Mon Sep 17 00:00:00 2001 From: JT <100274846+jiaweitao001@users.noreply.github.com> Date: Tue, 9 Aug 2022 20:47:43 +0800 Subject: [PATCH 047/100] backup_policy_vm_resource: fix validation issue when frequency is set to Hourly (#17880) --- .../recoveryservices/backup_policy_vm_resource.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/services/recoveryservices/backup_policy_vm_resource.go b/internal/services/recoveryservices/backup_policy_vm_resource.go index 7f6325f03ac3..80c96013db1c 100644 --- a/internal/services/recoveryservices/backup_policy_vm_resource.go +++ b/internal/services/recoveryservices/backup_policy_vm_resource.go @@ -353,6 +353,16 @@ func expandBackupProtectionPolicyVMSchedule(d *pluginsdk.ResourceData, times []d return nil, fmt.Errorf("`hour_duration` must be specified when `backup.0.frequency` is `Hourly`") } + if interval == 0 && duration == 0 { + return nil, fmt.Errorf("`hour_interval` and `hour_duration` must be specified when `backup.0.frequency` is `Hourly`") + } + if interval == 0 { + return nil, fmt.Errorf("`hour_interval` must be specified when `backup.0.frequency` is `Hourly`") + } + if duration == 0 { + return nil, fmt.Errorf("`hour_duration` must be specified when `backup.0.frequency` is `Hourly`") + } + if duration%interval != 0 { return nil, fmt.Errorf("`hour_duration` must be multiplier of `hour_interval`") } From b001430c6ec4c862a17a986b0df0c236dd81216d Mon Sep 17 00:00:00 2001 From: catriona-m <86247157+catriona-m@users.noreply.github.com> Date: Tue, 9 Aug 2022 13:53:53 +0100 Subject: [PATCH 048/100] update changelog for #17880 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ed685154e2..b5de449ba86a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ ENHANCEMENTS: * `azurerm_subnet` - deprecate `enforce_private_link_endpoint_network_policies` property in favour of `private_endpoint_network_policies_enabled` [GH-17464] * `azurerm_subnet` - deprecate `enforce_private_link_service_network_policies` property in favour of `private_link_service_network_policies_enabled` [GH-17464] + +BUG FIXES: + +`azurerm_backup_policy_vm` - now prevents crash when `frequency` is set to Hourly and, `hour_interval` and `hour_duration`are not set [GH-17880] + ## 3.17.0 (August 04, 2022) ENHANCEMENTS: From 254a50b44854eca4f79490ce293d810374e6bbf3 Mon Sep 17 00:00:00 2001 From: Tao <104055472+teowa@users.noreply.github.com> Date: Tue, 9 Aug 2022 21:46:21 +0800 Subject: [PATCH 049/100] New Resouce: `azurerm_monitor_data_collection_endpoint` (#17684) --- internal/services/monitor/client/client.go | 6 + ...nitor_data_collection_endpoint_resource.go | 298 ++++++++++++++++++ ..._data_collection_endpoint_resource_test.go | 158 ++++++++++ internal/services/monitor/registration.go | 1 + .../datacollectionendpoints/README.md | 128 ++++++++ .../datacollectionendpoints/client.go | 18 ++ .../datacollectionendpoints/constants.go | 99 ++++++ .../id_datacollectionendpoint.go | 124 ++++++++ .../method_create_autorest.go | 68 ++++ .../method_delete_autorest.go | 65 ++++ .../method_get_autorest.go | 67 ++++ .../method_listbyresourcegroup_autorest.go | 187 +++++++++++ .../method_listbysubscription_autorest.go | 187 +++++++++++ .../method_update_autorest.go | 68 ++++ .../model_configurationaccessendpointspec.go | 8 + .../model_datacollectionendpoint.go | 13 + .../model_datacollectionendpointresource.go | 20 ++ .../model_logsingestionendpointspec.go | 8 + .../model_networkruleset.go | 8 + .../model_resourceforupdate.go | 8 + .../datacollectionendpoints/predicates.go | 34 ++ .../datacollectionendpoints/version.go | 12 + vendor/modules.txt | 1 + ...tor_data_collection_endpoint.html.markdown | 78 +++++ 24 files changed, 1664 insertions(+) create mode 100644 internal/services/monitor/monitor_data_collection_endpoint_resource.go create mode 100644 internal/services/monitor/monitor_data_collection_endpoint_resource_test.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/id_datacollectionendpoint.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_create_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_delete_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_get_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbyresourcegroup_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbysubscription_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_update_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_configurationaccessendpointspec.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_datacollectionendpoint.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_datacollectionendpointresource.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_logsingestionendpointspec.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_networkruleset.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_resourceforupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/version.go create mode 100644 website/docs/r/monitor_data_collection_endpoint.html.markdown diff --git a/internal/services/monitor/client/client.go b/internal/services/monitor/client/client.go index a6c68daa2785..8c74928316e7 100644 --- a/internal/services/monitor/client/client.go +++ b/internal/services/monitor/client/client.go @@ -6,6 +6,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/preview/alertsmanagement/mgmt/2019-06-01-preview/alertsmanagement" classic "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-07-01-preview/insights" newActionGroupClient "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-09-01-preview/insights" + "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) @@ -26,6 +27,7 @@ type Client struct { ActivityLogAlertsClient *insights.ActivityLogAlertsClient AlertRulesClient *classic.AlertRulesClient DataCollectionRulesClient *datacollectionrules.DataCollectionRulesClient + DataCollectionEndpointsClient *datacollectionendpoints.DataCollectionEndpointsClient DiagnosticSettingsClient *classic.DiagnosticSettingsClient DiagnosticSettingsCategoryClient *classic.DiagnosticSettingsCategoryClient LogProfilesClient *classic.LogProfilesClient @@ -57,6 +59,9 @@ func NewClient(o *common.ClientOptions) *Client { AlertRulesClient := classic.NewAlertRulesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) o.ConfigureClient(&AlertRulesClient.Client, o.ResourceManagerAuthorizer) + DataCollectionEndpointsClient := datacollectionendpoints.NewDataCollectionEndpointsClientWithBaseURI(o.ResourceManagerEndpoint) + o.ConfigureClient(&DataCollectionEndpointsClient.Client, o.ResourceManagerAuthorizer) + DataCollectionRulesClient := datacollectionrules.NewDataCollectionRulesClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&DataCollectionRulesClient.Client, o.ResourceManagerAuthorizer) @@ -90,6 +95,7 @@ func NewClient(o *common.ClientOptions) *Client { ActivityLogAlertsClient: &ActivityLogAlertsClient, AlertRulesClient: &AlertRulesClient, DataCollectionRulesClient: &DataCollectionRulesClient, + DataCollectionEndpointsClient: &DataCollectionEndpointsClient, DiagnosticSettingsClient: &DiagnosticSettingsClient, DiagnosticSettingsCategoryClient: &DiagnosticSettingsCategoryClient, LogProfilesClient: &LogProfilesClient, diff --git a/internal/services/monitor/monitor_data_collection_endpoint_resource.go b/internal/services/monitor/monitor_data_collection_endpoint_resource.go new file mode 100644 index 000000000000..d2ae907b4c1a --- /dev/null +++ b/internal/services/monitor/monitor_data_collection_endpoint_resource.go @@ -0,0 +1,298 @@ +package monitor + +import ( + "context" + "fmt" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints" + "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type DataCollectionEndpoint struct { + Description string `tfschema:"description"` + Kind string `tfschema:"kind"` + Name string `tfschema:"name"` + Location string `tfschema:"location"` + EnablePublicNetworkAccess bool `tfschema:"public_network_access_enabled"` + ResourceGroupName string `tfschema:"resource_group_name"` + Tags map[string]interface{} `tfschema:"tags"` +} + +type DataCollectionEndpointResource struct { +} + +func (r DataCollectionEndpointResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "resource_group_name": commonschema.ResourceGroupName(), + + "location": commonschema.Location(), + + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + + "description": { + Type: pluginsdk.TypeString, + Optional: true, + }, + + "kind": { + Type: pluginsdk.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice( + datacollectionendpoints.PossibleValuesForKnownDataCollectionEndpointResourceKind(), false), + }, + + "tags": commonschema.Tags(), + } +} + +func (r DataCollectionEndpointResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r DataCollectionEndpointResource) ResourceType() string { + return "azurerm_monitor_data_collection_endpoint" +} + +func (r DataCollectionEndpointResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return datacollectionendpoints.ValidateDataCollectionEndpointID +} + +func (r DataCollectionEndpointResource) ModelObject() interface{} { + return &DataCollectionEndpoint{} +} + +func (r DataCollectionEndpointResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + metadata.Logger.Info("Decoding state..") + var state DataCollectionEndpoint + if err := metadata.Decode(&state); err != nil { + return err + } + + client := metadata.Client.Monitor.DataCollectionEndpointsClient + subscriptionId := metadata.Client.Account.SubscriptionId + + id := datacollectionendpoints.NewDataCollectionEndpointID(subscriptionId, state.ResourceGroupName, state.Name) + metadata.Logger.Infof("creating %s", id) + + existing, err := client.Get(ctx, id) + if err != nil && !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for the presence of an existing %s: %+v", id, err) + } + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(r.ResourceType(), id) + } + + input := datacollectionendpoints.DataCollectionEndpointResource{ + Kind: expandDataCollectionEndpointKind(state.Kind), + Location: azure.NormalizeLocation(state.Location), + Name: utils.String(state.Name), + Properties: &datacollectionendpoints.DataCollectionEndpoint{ + Description: utils.String(state.Description), + NetworkAcls: &datacollectionendpoints.NetworkRuleSet{ + PublicNetworkAccess: expandDataCollectionEndpointPublicNetworkAccess(state.EnablePublicNetworkAccess), + }, + }, + Tags: tags.Expand(state.Tags), + } + + if _, err := client.Create(ctx, id, input); err != nil { + return fmt.Errorf("creating %s: %+v", id, err) + } + + metadata.SetID(id) + return nil + }, + Timeout: 30 * time.Minute, + } +} + +func (r DataCollectionEndpointResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Monitor.DataCollectionEndpointsClient + id, err := datacollectionendpoints.ParseDataCollectionEndpointID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + metadata.Logger.Infof("retrieving %s", *id) + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + metadata.Logger.Infof("%s was not found - removing from state!", *id) + return metadata.MarkAsGone(id) + } + return fmt.Errorf("retrieving %s: %+v", *id, err) + } + var enablePublicNetWorkAccess bool + var description, kind, location string + var tag map[string]interface{} + if model := resp.Model; model != nil { + kind = flattenDataCollectionEndpointKind(model.Kind) + location = azure.NormalizeLocation(model.Location) + tag = tags.Flatten(model.Tags) + if prop := model.Properties; prop != nil { + description = flattenDataCollectionEndpointDescription(prop.Description) + if networkAcls := prop.NetworkAcls; networkAcls != nil { + enablePublicNetWorkAccess = flattenDataCollectionEndpointPublicNetworkAccess(networkAcls.PublicNetworkAccess) + } + } + } + + return metadata.Encode(&DataCollectionEndpoint{ + Description: description, + Kind: kind, + Location: location, + Name: id.DataCollectionEndpointName, + EnablePublicNetworkAccess: enablePublicNetWorkAccess, + ResourceGroupName: id.ResourceGroupName, + Tags: tag, + }) + }, + Timeout: 5 * time.Minute, + } +} + +func (r DataCollectionEndpointResource) Update() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + id, err := datacollectionendpoints.ParseDataCollectionEndpointID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + metadata.Logger.Infof("updating %s..", *id) + client := metadata.Client.Monitor.DataCollectionEndpointsClient + resp, err := client.Get(ctx, *id) + if err != nil { + return fmt.Errorf("retrieving %s: %+v", *id, err) + } + if resp.Model == nil { + return fmt.Errorf("unexpected null model of %s", *id) + } + existing := resp.Model + if existing.Properties == nil { + return fmt.Errorf("unexpected null properties of %s", *id) + } + + var state DataCollectionEndpoint + if err := metadata.Decode(&state); err != nil { + return err + } + + if metadata.ResourceData.HasChange("description") { + existing.Properties.Description = utils.String(state.Description) + } + + if metadata.ResourceData.HasChange("kind") { + existing.Kind = expandDataCollectionEndpointKind(state.Kind) + } + + if metadata.ResourceData.HasChange("public_network_access") { + existing.Properties.NetworkAcls = &datacollectionendpoints.NetworkRuleSet{ + PublicNetworkAccess: expandDataCollectionEndpointPublicNetworkAccess(state.EnablePublicNetworkAccess), + } + } + + if metadata.ResourceData.HasChange("tags") { + existing.Tags = tags.Expand(state.Tags) + } + + if _, err := client.Create(ctx, *id, *existing); err != nil { + return fmt.Errorf("updating %s: %+v", *id, err) + } + return nil + + }, + Timeout: 30 * time.Minute, + } +} + +func (r DataCollectionEndpointResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Monitor.DataCollectionEndpointsClient + id, err := datacollectionendpoints.ParseDataCollectionEndpointID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + metadata.Logger.Infof("deleting %s..", *id) + resp, err := client.Delete(ctx, *id) + if err != nil && !response.WasNotFound(resp.HttpResponse) { + return fmt.Errorf("deleting %s: %+v", *id, err) + } + return nil + }, + Timeout: 30 * time.Minute, + } +} + +func expandDataCollectionEndpointKind(input string) *datacollectionendpoints.KnownDataCollectionEndpointResourceKind { + if input == "" { + return nil + } + + result := datacollectionendpoints.KnownDataCollectionEndpointResourceKind(input) + return &result +} + +func expandDataCollectionEndpointPublicNetworkAccess(input bool) *datacollectionendpoints.KnownPublicNetworkAccessOptions { + var result datacollectionendpoints.KnownPublicNetworkAccessOptions + if input { + result = datacollectionendpoints.KnownPublicNetworkAccessOptionsEnabled + } else { + result = datacollectionendpoints.KnownPublicNetworkAccessOptionsDisabled + } + return &result +} + +func flattenDataCollectionEndpointKind(input *datacollectionendpoints.KnownDataCollectionEndpointResourceKind) string { + if input == nil { + return "" + } + + return string(*input) +} + +func flattenDataCollectionEndpointDescription(input *string) string { + if input == nil { + return "" + } + + return *input +} + +func flattenDataCollectionEndpointPublicNetworkAccess(input *datacollectionendpoints.KnownPublicNetworkAccessOptions) bool { + if input == nil { + return false + } + var result bool + if *input == datacollectionendpoints.KnownPublicNetworkAccessOptionsEnabled { + result = true + } else if *input == datacollectionendpoints.KnownPublicNetworkAccessOptionsDisabled { + result = false + } + return result +} diff --git a/internal/services/monitor/monitor_data_collection_endpoint_resource_test.go b/internal/services/monitor/monitor_data_collection_endpoint_resource_test.go new file mode 100644 index 000000000000..0561fb1b929f --- /dev/null +++ b/internal/services/monitor/monitor_data_collection_endpoint_resource_test.go @@ -0,0 +1,158 @@ +package monitor_test + +import ( + "context" + "fmt" + "testing" + + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type MonitorDataCollectionEndpointResource struct{} + +func (r MonitorDataCollectionEndpointResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + id, err := datacollectionendpoints.ParseDataCollectionEndpointID(state.ID) + if err != nil { + return nil, err + } + + resp, err := client.Monitor.DataCollectionEndpointsClient.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return utils.Bool(false), nil + } + return nil, fmt.Errorf("retrieving %s: %+v", *id, err) + } + return utils.Bool(true), nil +} + +func TestAccMonitorDataCollectionEndpoint_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_monitor_data_collection_endpoint", "test") + r := MonitorDataCollectionEndpointResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccMonitorDataCollectionEndpoint_requiresImport(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_monitor_data_collection_endpoint", "test") + r := MonitorDataCollectionEndpointResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.RequiresImportErrorStep(r.requiresImport), + }) +} + +func TestAccMonitorDataCollectionEndpoint_update(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_monitor_data_collection_endpoint", "test") + r := MonitorDataCollectionEndpointResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.complete(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccMonitorDataCollectionEndpoint_complete(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_monitor_data_collection_endpoint", "test") + r := MonitorDataCollectionEndpointResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.complete(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func (r MonitorDataCollectionEndpointResource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s +resource "azurerm_monitor_data_collection_endpoint" "test" { + name = "acctestmdcr-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location +} +`, r.template(data), data.RandomInteger) +} + +func (r MonitorDataCollectionEndpointResource) complete(data acceptance.TestData) string { + return fmt.Sprintf(` +%[1]s +resource "azurerm_monitor_data_collection_endpoint" "test" { + name = "acctestmdce-%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + kind = "Windows" + public_network_access_enabled = false + description = "acc test monitor_data_collection_endpoint complete" + tags = { + ENV = "test" + } +} +`, r.template(data), data.RandomInteger) +} + +func (r MonitorDataCollectionEndpointResource) requiresImport(data acceptance.TestData) string { + return fmt.Sprintf(` +%s +resource "azurerm_monitor_data_collection_endpoint" "import" { + name = azurerm_monitor_data_collection_endpoint.test.name + resource_group_name = azurerm_monitor_data_collection_endpoint.test.resource_group_name + location = azurerm_monitor_data_collection_endpoint.test.location +} +`, r.basic(data)) +} + +func (r MonitorDataCollectionEndpointResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} +resource "azurerm_resource_group" "test" { + name = "acctestRG-DataCollectionEndpoint-%[1]d" + location = "%[2]s" +} +`, data.RandomInteger, data.Locations.Primary) +} diff --git a/internal/services/monitor/registration.go b/internal/services/monitor/registration.go index 6518c29456bc..e08ea8eba644 100644 --- a/internal/services/monitor/registration.go +++ b/internal/services/monitor/registration.go @@ -23,6 +23,7 @@ func (r Registration) DataSources() []sdk.DataSource { func (r Registration) Resources() []sdk.Resource { return []sdk.Resource{ DataCollectionRuleResource{}, + DataCollectionEndpointResource{}, } } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/README.md new file mode 100644 index 000000000000..09a277cf8582 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/README.md @@ -0,0 +1,128 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints` Documentation + +The `datacollectionendpoints` SDK allows for interaction with the Azure Resource Manager Service `insights` (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/insights/2021-04-01/datacollectionendpoints" +``` + + +### Client Initialization + +```go +client := datacollectionendpoints.NewDataCollectionEndpointsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DataCollectionEndpointsClient.Create` + +```go +ctx := context.TODO() +id := datacollectionendpoints.NewDataCollectionEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataCollectionEndpointValue") + +payload := datacollectionendpoints.DataCollectionEndpointResource{ + // ... +} + + +read, err := client.Create(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DataCollectionEndpointsClient.Delete` + +```go +ctx := context.TODO() +id := datacollectionendpoints.NewDataCollectionEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataCollectionEndpointValue") + +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: `DataCollectionEndpointsClient.Get` + +```go +ctx := context.TODO() +id := datacollectionendpoints.NewDataCollectionEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataCollectionEndpointValue") + +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: `DataCollectionEndpointsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := datacollectionendpoints.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `DataCollectionEndpointsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := datacollectionendpoints.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `DataCollectionEndpointsClient.Update` + +```go +ctx := context.TODO() +id := datacollectionendpoints.NewDataCollectionEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataCollectionEndpointValue") + +payload := datacollectionendpoints.ResourceForUpdate{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/client.go new file mode 100644 index 000000000000..9ded58c2b9a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/client.go @@ -0,0 +1,18 @@ +package datacollectionendpoints + +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 DataCollectionEndpointsClient struct { + Client autorest.Client + baseUri string +} + +func NewDataCollectionEndpointsClientWithBaseURI(endpoint string) DataCollectionEndpointsClient { + return DataCollectionEndpointsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/constants.go new file mode 100644 index 000000000000..e9b335d98f5f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/constants.go @@ -0,0 +1,99 @@ +package datacollectionendpoints + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KnownDataCollectionEndpointProvisioningState string + +const ( + KnownDataCollectionEndpointProvisioningStateCreating KnownDataCollectionEndpointProvisioningState = "Creating" + KnownDataCollectionEndpointProvisioningStateDeleting KnownDataCollectionEndpointProvisioningState = "Deleting" + KnownDataCollectionEndpointProvisioningStateFailed KnownDataCollectionEndpointProvisioningState = "Failed" + KnownDataCollectionEndpointProvisioningStateSucceeded KnownDataCollectionEndpointProvisioningState = "Succeeded" + KnownDataCollectionEndpointProvisioningStateUpdating KnownDataCollectionEndpointProvisioningState = "Updating" +) + +func PossibleValuesForKnownDataCollectionEndpointProvisioningState() []string { + return []string{ + string(KnownDataCollectionEndpointProvisioningStateCreating), + string(KnownDataCollectionEndpointProvisioningStateDeleting), + string(KnownDataCollectionEndpointProvisioningStateFailed), + string(KnownDataCollectionEndpointProvisioningStateSucceeded), + string(KnownDataCollectionEndpointProvisioningStateUpdating), + } +} + +func parseKnownDataCollectionEndpointProvisioningState(input string) (*KnownDataCollectionEndpointProvisioningState, error) { + vals := map[string]KnownDataCollectionEndpointProvisioningState{ + "creating": KnownDataCollectionEndpointProvisioningStateCreating, + "deleting": KnownDataCollectionEndpointProvisioningStateDeleting, + "failed": KnownDataCollectionEndpointProvisioningStateFailed, + "succeeded": KnownDataCollectionEndpointProvisioningStateSucceeded, + "updating": KnownDataCollectionEndpointProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KnownDataCollectionEndpointProvisioningState(input) + return &out, nil +} + +type KnownDataCollectionEndpointResourceKind string + +const ( + KnownDataCollectionEndpointResourceKindLinux KnownDataCollectionEndpointResourceKind = "Linux" + KnownDataCollectionEndpointResourceKindWindows KnownDataCollectionEndpointResourceKind = "Windows" +) + +func PossibleValuesForKnownDataCollectionEndpointResourceKind() []string { + return []string{ + string(KnownDataCollectionEndpointResourceKindLinux), + string(KnownDataCollectionEndpointResourceKindWindows), + } +} + +func parseKnownDataCollectionEndpointResourceKind(input string) (*KnownDataCollectionEndpointResourceKind, error) { + vals := map[string]KnownDataCollectionEndpointResourceKind{ + "linux": KnownDataCollectionEndpointResourceKindLinux, + "windows": KnownDataCollectionEndpointResourceKindWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KnownDataCollectionEndpointResourceKind(input) + return &out, nil +} + +type KnownPublicNetworkAccessOptions string + +const ( + KnownPublicNetworkAccessOptionsDisabled KnownPublicNetworkAccessOptions = "Disabled" + KnownPublicNetworkAccessOptionsEnabled KnownPublicNetworkAccessOptions = "Enabled" +) + +func PossibleValuesForKnownPublicNetworkAccessOptions() []string { + return []string{ + string(KnownPublicNetworkAccessOptionsDisabled), + string(KnownPublicNetworkAccessOptionsEnabled), + } +} + +func parseKnownPublicNetworkAccessOptions(input string) (*KnownPublicNetworkAccessOptions, error) { + vals := map[string]KnownPublicNetworkAccessOptions{ + "disabled": KnownPublicNetworkAccessOptionsDisabled, + "enabled": KnownPublicNetworkAccessOptionsEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KnownPublicNetworkAccessOptions(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/id_datacollectionendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/id_datacollectionendpoint.go new file mode 100644 index 000000000000..a67615cdc875 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/id_datacollectionendpoint.go @@ -0,0 +1,124 @@ +package datacollectionendpoints + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = DataCollectionEndpointId{} + +// DataCollectionEndpointId is a struct representing the Resource ID for a Data Collection Endpoint +type DataCollectionEndpointId struct { + SubscriptionId string + ResourceGroupName string + DataCollectionEndpointName string +} + +// NewDataCollectionEndpointID returns a new DataCollectionEndpointId struct +func NewDataCollectionEndpointID(subscriptionId string, resourceGroupName string, dataCollectionEndpointName string) DataCollectionEndpointId { + return DataCollectionEndpointId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + DataCollectionEndpointName: dataCollectionEndpointName, + } +} + +// ParseDataCollectionEndpointID parses 'input' into a DataCollectionEndpointId +func ParseDataCollectionEndpointID(input string) (*DataCollectionEndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(DataCollectionEndpointId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := DataCollectionEndpointId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.DataCollectionEndpointName, ok = parsed.Parsed["dataCollectionEndpointName"]; !ok { + return nil, fmt.Errorf("the segment 'dataCollectionEndpointName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseDataCollectionEndpointIDInsensitively parses 'input' case-insensitively into a DataCollectionEndpointId +// note: this method should only be used for API response data and not user input +func ParseDataCollectionEndpointIDInsensitively(input string) (*DataCollectionEndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(DataCollectionEndpointId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := DataCollectionEndpointId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.DataCollectionEndpointName, ok = parsed.Parsed["dataCollectionEndpointName"]; !ok { + return nil, fmt.Errorf("the segment 'dataCollectionEndpointName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateDataCollectionEndpointID checks that 'input' can be parsed as a Data Collection Endpoint ID +func ValidateDataCollectionEndpointID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseDataCollectionEndpointID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Data Collection Endpoint ID +func (id DataCollectionEndpointId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Insights/dataCollectionEndpoints/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DataCollectionEndpointName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Data Collection Endpoint ID +func (id DataCollectionEndpointId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftInsights", "Microsoft.Insights", "Microsoft.Insights"), + resourceids.StaticSegment("staticDataCollectionEndpoints", "dataCollectionEndpoints", "dataCollectionEndpoints"), + resourceids.UserSpecifiedSegment("dataCollectionEndpointName", "dataCollectionEndpointValue"), + } +} + +// String returns a human-readable description of this Data Collection Endpoint ID +func (id DataCollectionEndpointId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Data Collection Endpoint Name: %q", id.DataCollectionEndpointName), + } + return fmt.Sprintf("Data Collection Endpoint (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_create_autorest.go new file mode 100644 index 000000000000..a6b993592fb9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_create_autorest.go @@ -0,0 +1,68 @@ +package datacollectionendpoints + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + HttpResponse *http.Response + Model *DataCollectionEndpointResource +} + +// Create ... +func (c DataCollectionEndpointsClient) Create(ctx context.Context, id DataCollectionEndpointId, input DataCollectionEndpointResource) (result CreateOperationResponse, err error) { + req, err := c.preparerForCreate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Create", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Create", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Create", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreate prepares the Create request. +func (c DataCollectionEndpointsClient) preparerForCreate(ctx context.Context, id DataCollectionEndpointId, input DataCollectionEndpointResource) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreate handles the response to the Create request. The method always +// closes the http.Response Body. +func (c DataCollectionEndpointsClient) responderForCreate(resp *http.Response) (result CreateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_delete_autorest.go new file mode 100644 index 000000000000..2ff778d189eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_delete_autorest.go @@ -0,0 +1,65 @@ +package datacollectionendpoints + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 DataCollectionEndpointsClient) Delete(ctx context.Context, id DataCollectionEndpointId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c DataCollectionEndpointsClient) preparerForDelete(ctx context.Context, id DataCollectionEndpointId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c DataCollectionEndpointsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_get_autorest.go new file mode 100644 index 000000000000..d5069e6b354b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_get_autorest.go @@ -0,0 +1,67 @@ +package datacollectionendpoints + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *DataCollectionEndpointResource +} + +// Get ... +func (c DataCollectionEndpointsClient) Get(ctx context.Context, id DataCollectionEndpointId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c DataCollectionEndpointsClient) preparerForGet(ctx context.Context, id DataCollectionEndpointId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c DataCollectionEndpointsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbyresourcegroup_autorest.go new file mode 100644 index 000000000000..56c3282359ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbyresourcegroup_autorest.go @@ -0,0 +1,187 @@ +package datacollectionendpoints + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + Model *[]DataCollectionEndpointResource + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListByResourceGroupOperationResponse, error) +} + +type ListByResourceGroupCompleteResult struct { + Items []DataCollectionEndpointResource +} + +func (r ListByResourceGroupOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp ListByResourceGroupOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// ListByResourceGroup ... +func (c DataCollectionEndpointsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroup(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListByResourceGroup", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListByResourceGroup(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListByResourceGroup", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c DataCollectionEndpointsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DataCollectionEndpointResourceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DataCollectionEndpointsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DataCollectionEndpointResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]DataCollectionEndpointResource, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} + +// preparerForListByResourceGroup prepares the ListByResourceGroup request. +func (c DataCollectionEndpointsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Insights/dataCollectionEndpoints", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListByResourceGroupWithNextLink prepares the ListByResourceGroup request with the given nextLink token. +func (c DataCollectionEndpointsClient) preparerForListByResourceGroupWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByResourceGroup handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (c DataCollectionEndpointsClient) responderForListByResourceGroup(resp *http.Response) (result ListByResourceGroupOperationResponse, err error) { + type page struct { + Values []DataCollectionEndpointResource `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroupWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListByResourceGroup", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByResourceGroup(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListByResourceGroup", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbysubscription_autorest.go new file mode 100644 index 000000000000..8e15c9877897 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbysubscription_autorest.go @@ -0,0 +1,187 @@ +package datacollectionendpoints + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + Model *[]DataCollectionEndpointResource + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListBySubscriptionOperationResponse, error) +} + +type ListBySubscriptionCompleteResult struct { + Items []DataCollectionEndpointResource +} + +func (r ListBySubscriptionOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListBySubscriptionOperationResponse) LoadMore(ctx context.Context) (resp ListBySubscriptionOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// ListBySubscription ... +func (c DataCollectionEndpointsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscription(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListBySubscription", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListBySubscription(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListBySubscription", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c DataCollectionEndpointsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, DataCollectionEndpointResourceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DataCollectionEndpointsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DataCollectionEndpointResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]DataCollectionEndpointResource, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} + +// preparerForListBySubscription prepares the ListBySubscription request. +func (c DataCollectionEndpointsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Insights/dataCollectionEndpoints", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListBySubscriptionWithNextLink prepares the ListBySubscription request with the given nextLink token. +func (c DataCollectionEndpointsClient) preparerForListBySubscriptionWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListBySubscription handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (c DataCollectionEndpointsClient) responderForListBySubscription(resp *http.Response) (result ListBySubscriptionOperationResponse, err error) { + type page struct { + Values []DataCollectionEndpointResource `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscriptionWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListBySubscription", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListBySubscription(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "ListBySubscription", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_update_autorest.go new file mode 100644 index 000000000000..9ab2bbe320ab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_update_autorest.go @@ -0,0 +1,68 @@ +package datacollectionendpoints + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + Model *DataCollectionEndpointResource +} + +// Update ... +func (c DataCollectionEndpointsClient) Update(ctx context.Context, id DataCollectionEndpointId, input ResourceForUpdate) (result UpdateOperationResponse, err error) { + req, err := c.preparerForUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Update", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Update", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "datacollectionendpoints.DataCollectionEndpointsClient", "Update", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForUpdate prepares the Update request. +func (c DataCollectionEndpointsClient) preparerForUpdate(ctx context.Context, id DataCollectionEndpointId, input ResourceForUpdate) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForUpdate handles the response to the Update request. The method always +// closes the http.Response Body. +func (c DataCollectionEndpointsClient) responderForUpdate(resp *http.Response) (result UpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_configurationaccessendpointspec.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_configurationaccessendpointspec.go new file mode 100644 index 000000000000..e35b5822daca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_configurationaccessendpointspec.go @@ -0,0 +1,8 @@ +package datacollectionendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationAccessEndpointSpec struct { + Endpoint *string `json:"endpoint,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_datacollectionendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_datacollectionendpoint.go new file mode 100644 index 000000000000..8b85bdd7b560 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_datacollectionendpoint.go @@ -0,0 +1,13 @@ +package datacollectionendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataCollectionEndpoint struct { + ConfigurationAccess *ConfigurationAccessEndpointSpec `json:"configurationAccess,omitempty"` + Description *string `json:"description,omitempty"` + ImmutableId *string `json:"immutableId,omitempty"` + LogsIngestion *LogsIngestionEndpointSpec `json:"logsIngestion,omitempty"` + NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"` + ProvisioningState *KnownDataCollectionEndpointProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_datacollectionendpointresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_datacollectionendpointresource.go new file mode 100644 index 000000000000..e9b56ee8cd15 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_datacollectionendpointresource.go @@ -0,0 +1,20 @@ +package datacollectionendpoints + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataCollectionEndpointResource struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind *KnownDataCollectionEndpointResourceKind `json:"kind,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *DataCollectionEndpoint `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_logsingestionendpointspec.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_logsingestionendpointspec.go new file mode 100644 index 000000000000..398fc326eead --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_logsingestionendpointspec.go @@ -0,0 +1,8 @@ +package datacollectionendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogsIngestionEndpointSpec struct { + Endpoint *string `json:"endpoint,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_networkruleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_networkruleset.go new file mode 100644 index 000000000000..86bef2b88107 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_networkruleset.go @@ -0,0 +1,8 @@ +package datacollectionendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkRuleSet struct { + PublicNetworkAccess *KnownPublicNetworkAccessOptions `json:"publicNetworkAccess,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_resourceforupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_resourceforupdate.go new file mode 100644 index 000000000000..ef06bf24059e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/model_resourceforupdate.go @@ -0,0 +1,8 @@ +package datacollectionendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceForUpdate struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/predicates.go new file mode 100644 index 000000000000..04b7e34cc603 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/predicates.go @@ -0,0 +1,34 @@ +package datacollectionendpoints + +type DataCollectionEndpointResourceOperationPredicate struct { + Etag *string + Id *string + Location *string + Name *string + Type *string +} + +func (p DataCollectionEndpointResourceOperationPredicate) Matches(input DataCollectionEndpointResource) bool { + + if p.Etag != nil && (input.Etag == nil && *p.Etag != *input.Etag) { + return false + } + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/version.go new file mode 100644 index 000000000000..883bbd46c618 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/version.go @@ -0,0 +1,12 @@ +package datacollectionendpoints + +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/datacollectionendpoints/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 27d4aacdc714..d26fe4465340 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -231,6 +231,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkru github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms +github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests diff --git a/website/docs/r/monitor_data_collection_endpoint.html.markdown b/website/docs/r/monitor_data_collection_endpoint.html.markdown new file mode 100644 index 000000000000..60302e1f1145 --- /dev/null +++ b/website/docs/r/monitor_data_collection_endpoint.html.markdown @@ -0,0 +1,78 @@ +--- +subcategory: "Monitor" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_monitor_data_collection_endpoint" +description: |- + Manages a Data Collection Endpoint. +--- + +# azurerm_monitor_data_collection_endpoint + +Manages a Data Collection Endpoint. + +## Example Usage + +```hcl +# Generated from AccTest TestAccMonitorDataCollectionEndpoint_complete +provider "azurerm" { + features {} +} +resource "azurerm_resource_group" "example" { + name = "example-rg" + location = "West Europe" +} +resource "azurerm_monitor_data_collection_endpoint" "example" { + name = "example-mdce" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + kind = "Windows" + public_network_access_enabled = true + description = "monitor_data_collection_endpoint example" + tags = { + foo = "bar" + } +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `location` - (Required) The Azure Region where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. + +* `name` - (Required) The name which should be used for this Data Collection Endpoint. Changing this forces a new Data Collection Endpoint to be created. + +* `resource_group_name` - (Required) The name of the Resource Group where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. + +--- + +* `description` - (Optional) Specifies a description for the Data Collection Endpoint. + +* `kind` - (Optional) The kind of the Data Collection Endpoint. Possible values are `Linux` and `Windows`. + +* `public_network_access_enabled` - (Optional) Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. Default to `true`. + +* `tags` - (Optional) A mapping of tags which should be assigned to the Data Collection Endpoint. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Data Collection Endpoint. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating the Data Collection Endpoint. +* `read` - (Defaults to 5 minutes) Used when retrieving the Data Collection Endpoint. +* `update` - (Defaults to 30 minutes) Used when updating the Data Collection Endpoint. +* `delete` - (Defaults to 30 minutes) Used when deleting the Data Collection Endpoint. + +## Import + +Data Collection Endpoints can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_monitor_data_collection_endpoint.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1 +``` From 1efe139c267dcbe508d86fb50322c002a367d396 Mon Sep 17 00:00:00 2001 From: kt Date: Tue, 9 Aug 2022 06:48:52 -0700 Subject: [PATCH 050/100] CHANGELOG #17684 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5de449ba86a..4b4342d2f719 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 3.18.0 (Unreleased) +FEATURES: + +* **New Resource**: `azurerm_monitor_data_collection_endpoint` [GH-17684] + ENHANCEMENTS: * `azurerm_subnet` - deprecate `enforce_private_link_endpoint_network_policies` property in favour of `private_endpoint_network_policies_enabled` [GH-17464] From 04deb754a95542d1e086ffa1b4a9715b62539f8e Mon Sep 17 00:00:00 2001 From: kt Date: Tue, 9 Aug 2022 07:14:15 -0700 Subject: [PATCH 051/100] Update guide-opening-a-pr.md --- contributing/topics/guide-opening-a-pr.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contributing/topics/guide-opening-a-pr.md b/contributing/topics/guide-opening-a-pr.md index 957b52b6d214..bb17d9c196d1 100644 --- a/contributing/topics/guide-opening-a-pr.md +++ b/contributing/topics/guide-opening-a-pr.md @@ -54,6 +54,7 @@ Examples of good PR titles: - `azurerm_storage_management_policy - Mark rule.filters.blob_type as required` - `azurerm_container_registry - support updating replications on demand` +- `azurerm_automation_account - support for the encrytion, local_authentication_enabled, and tags properties` - `Data Source: azurerm_automation_account - prevent panic (#15474) by adding a nil check` - `Upgrade bot API version from 2021-03-01 to 2021-05-01-preview` - `New Resource: azurerm_managed_disk_sas_token` @@ -68,6 +69,7 @@ Examples of poorly written PR titles: - `upgrade sdk` - `upgrade compute api` - `add cosmos property` +- `support encryption, local_authentication_enabled properties` ### Description @@ -77,4 +79,4 @@ It should also link to any related issues/PRs and include the following for any ``` fixes #1234,#5678 - ``` \ No newline at end of file + ``` From 9a3f3ccb8eb94c7a96fd1532f1b5161763cb8c0c Mon Sep 17 00:00:00 2001 From: Yichun Ma Date: Tue, 9 Aug 2022 22:36:43 +0800 Subject: [PATCH 052/100] `r\site_recovery_replicated_vm`: Add support for `target_disk_encryption` (#15783) --- .../site_recovery_replicated_vm_resource.go | 134 +++++++++ ...te_recovery_replicated_vm_resource_test.go | 274 ++++++++++++++++++ .../site_recovery_replicated_vm.html.markdown | 26 ++ 3 files changed, 434 insertions(+) diff --git a/internal/services/recoveryservices/site_recovery_replicated_vm_resource.go b/internal/services/recoveryservices/site_recovery_replicated_vm_resource.go index bd15cf701759..539cba753f20 100644 --- a/internal/services/recoveryservices/site_recovery_replicated_vm_resource.go +++ b/internal/services/recoveryservices/site_recovery_replicated_vm_resource.go @@ -14,6 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + keyVaultValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -186,6 +187,63 @@ func resourceSiteRecoveryReplicatedVM() *pluginsdk.Resource { ValidateFunc: azure.ValidateResourceID, DiffSuppressFunc: suppress.CaseDifference, }, + + "target_disk_encryption": { + Type: pluginsdk.TypeList, + ConfigMode: pluginsdk.SchemaConfigModeAttr, + Optional: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "disk_encryption_key": { + Type: pluginsdk.TypeList, + ConfigMode: pluginsdk.SchemaConfigModeAttr, + Required: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "secret_url": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: keyVaultValidate.NestedItemId, + }, + + "vault_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: keyVaultValidate.VaultID, + }, + }, + }, + }, + "key_encryption_key": { + Type: pluginsdk.TypeList, + ConfigMode: pluginsdk.SchemaConfigModeAttr, + Optional: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "key_url": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: keyVaultValidate.NestedItemId, + }, + + "vault_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: keyVaultValidate.VaultID, + }, + }, + }, + }, + }, + }, + }, }, }, }, @@ -291,6 +349,7 @@ func resourceSiteRecoveryReplicatedItemCreate(d *pluginsdk.ResourceData, meta in RecoveryReplicaDiskAccountType: &targetReplicaDiskType, RecoveryTargetDiskAccountType: &targetDiskType, RecoveryDiskEncryptionSetID: &targetEncryptionDiskSetID, + DiskEncryptionInfo: expandTargetDiskEncryption(diskInput["target_disk_encryption"].([]interface{})), }) } @@ -388,6 +447,7 @@ func resourceSiteRecoveryReplicatedItemUpdateInternal(ctx context.Context, d *pl DiskID: &diskId, RecoveryReplicaDiskAccountType: &targetReplicaDiskType, RecoveryTargetDiskAccountType: &targetDiskType, + DiskEncryptionInfo: expandTargetDiskEncryption(diskInput["target_disk_encryption"].([]interface{})), }) } @@ -515,6 +575,8 @@ func resourceSiteRecoveryReplicatedItemRead(d *pluginsdk.ResourceData, meta inte } diskOutput["target_disk_encryption_set_id"] = recoveryEncryptionSetId + diskOutput["target_disk_encryption"] = flattenTargetDiskEncryption(disk) + disksOutput = append(disksOutput, diskOutput) } d.Set("managed_disk", pluginsdk.NewSet(resourceSiteRecoveryReplicatedVMDiskHash, disksOutput)) @@ -653,3 +715,75 @@ func waitForReplicationToBeHealthyRefreshFunc(d *pluginsdk.ResourceData, meta in return resp, *resp.Properties.ReplicationHealth, nil } } + +func expandTargetDiskEncryption(diskEncryptionInfoList []interface{}) *siterecovery.DiskEncryptionInfo { + if len(diskEncryptionInfoList) == 0 { + return &siterecovery.DiskEncryptionInfo{} + } + diskEncryptionInfoMap := diskEncryptionInfoList[0].(map[string]interface{}) + + dek := diskEncryptionInfoMap["disk_encryption_key"].([]interface{})[0].(map[string]interface{}) + diskEncryptionInfo := &siterecovery.DiskEncryptionInfo{ + DiskEncryptionKeyInfo: &siterecovery.DiskEncryptionKeyInfo{ + SecretIdentifier: utils.String(dek["secret_url"].(string)), + KeyVaultResourceArmID: utils.String(dek["vault_id"].(string)), + }, + } + + if keyEncryptionKey := diskEncryptionInfoMap["key_encryption_key"].([]interface{}); len(keyEncryptionKey) > 0 { + kek := keyEncryptionKey[0].(map[string]interface{}) + diskEncryptionInfo.KeyEncryptionKeyInfo = &siterecovery.KeyEncryptionKeyInfo{ + KeyIdentifier: utils.String(kek["key_url"].(string)), + KeyVaultResourceArmID: utils.String(kek["vault_id"].(string)), + } + } + + return diskEncryptionInfo +} + +func flattenTargetDiskEncryption(disk siterecovery.A2AProtectedManagedDiskDetails) []interface{} { + secretUrl := "" + dekVaultId := "" + keyUrl := "" + kekVaultId := "" + + if disk.SecretIdentifier != nil { + secretUrl = *disk.SecretIdentifier + } + if disk.DekKeyVaultArmID != nil { + dekVaultId = *disk.DekKeyVaultArmID + } + if disk.KeyIdentifier != nil { + keyUrl = *disk.KeyIdentifier + } + if disk.KekKeyVaultArmID != nil { + kekVaultId = *disk.KekKeyVaultArmID + } + + if secretUrl == "" && dekVaultId == "" && keyUrl == "" && kekVaultId == "" { + return []interface{}{} + } + + diskEncryptionKeys := make([]interface{}, 0) + if secretUrl != "" || dekVaultId != "" { + diskEncryptionKeys = append(diskEncryptionKeys, map[string]interface{}{ + "secret_url": secretUrl, + "vault_id": dekVaultId, + }) + } + + keyEncryptionKeys := make([]interface{}, 0) + if keyUrl != "" || kekVaultId != "" { + keyEncryptionKeys = append(keyEncryptionKeys, map[string]interface{}{ + "key_url": keyUrl, + "vault_id": kekVaultId, + }) + } + + return []interface{}{ + map[string]interface{}{ + "disk_encryption_key": diskEncryptionKeys, + "key_encryption_key": keyEncryptionKeys, + }, + } +} diff --git a/internal/services/recoveryservices/site_recovery_replicated_vm_resource_test.go b/internal/services/recoveryservices/site_recovery_replicated_vm_resource_test.go index 7c11849d169a..be81e6c00052 100644 --- a/internal/services/recoveryservices/site_recovery_replicated_vm_resource_test.go +++ b/internal/services/recoveryservices/site_recovery_replicated_vm_resource_test.go @@ -60,6 +60,21 @@ func TestAccSiteRecoveryReplicatedVm_zone2zone(t *testing.T) { }) } +func TestAccSiteRecoveryReplicatedVm_targetDiskEncryption(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_site_recovery_replicated_vm", "test") + r := SiteRecoveryReplicatedVmResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.targetDiskEncryption(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func (SiteRecoveryReplicatedVmResource) basic(data acceptance.TestData) string { return fmt.Sprintf(` provider "azurerm" { @@ -882,6 +897,265 @@ resource "azurerm_site_recovery_replicated_vm" "test" { `, data.RandomInteger, data.Locations.Primary, data.Locations.Secondary) } +func (SiteRecoveryReplicatedVmResource) targetDiskEncryption(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features { + key_vault { + purge_soft_delete_on_destroy = false + purge_soft_deleted_keys_on_destroy = false + purge_soft_deleted_secrets_on_destroy = false + } + } +} + +data "azurerm_client_config" "current" {} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-recovery-%[1]d-1" + location = "%[2]s" +} +resource "azurerm_resource_group" "test2" { + name = "acctestRG-recovery-%[1]d-2" + location = "%[3]s" +} + +resource "azurerm_key_vault" "test1" { + name = "acckv-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + tenant_id = data.azurerm_client_config.current.tenant_id + sku_name = "premium" + enabled_for_disk_encryption = true + purge_protection_enabled = true +} + +resource "azurerm_key_vault_access_policy" "service-principal" { + key_vault_id = azurerm_key_vault.test1.id + tenant_id = data.azurerm_client_config.current.tenant_id + object_id = data.azurerm_client_config.current.object_id + + key_permissions = [ + "Create", + "Delete", + "Get", + "Update", + ] + + secret_permissions = [ + "Get", + "Delete", + "Set", + ] +} + +resource "azurerm_key_vault_key" "test1" { + name = "examplekey" + key_vault_id = azurerm_key_vault.test1.id + key_type = "RSA" + key_size = 3072 + + key_opts = [ + "decrypt", + "encrypt", + "sign", + "unwrapKey", + "verify", + "wrapKey", + ] + + depends_on = [ + azurerm_key_vault_access_policy.service-principal + ] +} + +resource "azurerm_recovery_services_vault" "test" { + name = "acctest-vault-%[1]d" + location = azurerm_resource_group.test2.location + resource_group_name = azurerm_resource_group.test2.name + sku = "Standard" + soft_delete_enabled = false +} +resource "azurerm_site_recovery_fabric" "test1" { + resource_group_name = azurerm_resource_group.test2.name + recovery_vault_name = azurerm_recovery_services_vault.test.name + name = "acctest-fabric1-%[1]d" + location = azurerm_resource_group.test.location +} +resource "azurerm_site_recovery_protection_container" "test1" { + resource_group_name = azurerm_resource_group.test2.name + recovery_vault_name = azurerm_recovery_services_vault.test.name + recovery_fabric_name = azurerm_site_recovery_fabric.test1.name + name = "acctest-protection-cont1-%[1]d" +} +resource "azurerm_site_recovery_protection_container" "test2" { + resource_group_name = azurerm_resource_group.test2.name + recovery_vault_name = azurerm_recovery_services_vault.test.name + recovery_fabric_name = azurerm_site_recovery_fabric.test1.name + name = "acctest-protection-cont2-t-%[1]d" +} +resource "azurerm_site_recovery_replication_policy" "test" { + resource_group_name = azurerm_resource_group.test2.name + recovery_vault_name = azurerm_recovery_services_vault.test.name + name = "acctest-policy-%[1]d" + recovery_point_retention_in_minutes = 24 * 60 + application_consistent_snapshot_frequency_in_minutes = 4 * 60 +} +resource "azurerm_site_recovery_protection_container_mapping" "test" { + resource_group_name = azurerm_resource_group.test2.name + recovery_vault_name = azurerm_recovery_services_vault.test.name + recovery_fabric_name = azurerm_site_recovery_fabric.test1.name + recovery_source_protection_container_name = azurerm_site_recovery_protection_container.test1.name + recovery_target_protection_container_id = azurerm_site_recovery_protection_container.test2.id + recovery_replication_policy_id = azurerm_site_recovery_replication_policy.test.id + name = "mapping-%[1]d" +} +resource "azurerm_virtual_network" "test1" { + name = "net-%[1]d" + resource_group_name = azurerm_resource_group.test.name + address_space = ["192.168.1.0/24"] + location = azurerm_site_recovery_fabric.test1.location +} +resource "azurerm_subnet" "test1" { + name = "snet-%[1]d" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test1.name + address_prefixes = ["192.168.1.0/24"] +} +resource "azurerm_network_interface" "test" { + name = "vm-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + ip_configuration { + name = "vm-%[1]d" + subnet_id = azurerm_subnet.test1.id + private_ip_address_allocation = "Dynamic" + } +} + +resource "azurerm_windows_virtual_machine" "vm" { + name = "acctvm%[4]s" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + size = "Standard_D2s_v3" + admin_username = "adminuser" + admin_password = "P@ssw0rd1234!" + zone = "1" + network_interface_ids = [ + azurerm_network_interface.test.id, + ] + + source_image_reference { + publisher = "MicrosoftWindowsServer" + offer = "WindowsServer" + sku = "2022-Datacenter" + version = "latest" + } + + os_disk { + storage_account_type = "Standard_LRS" + caching = "ReadWrite" + } +} + +resource "azurerm_virtual_machine_extension" "test" { + name = "AzureDiskEncryption" + publisher = "Microsoft.Azure.Security" + type = "AzureDiskEncryption" + type_handler_version = "2.2" + auto_upgrade_minor_version = false + virtual_machine_id = azurerm_windows_virtual_machine.vm.id + + settings = < Date: Tue, 9 Aug 2022 07:37:28 -0700 Subject: [PATCH 053/100] CHANGELOG #15783 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b4342d2f719..33e516856826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ FEATURES: * **New Resource**: `azurerm_monitor_data_collection_endpoint` [GH-17684] ENHANCEMENTS: - +* `azurerm_site_recovery_replicated_vm` - support for the `target_disk_encryption` block [GH-15783] * `azurerm_subnet` - deprecate `enforce_private_link_endpoint_network_policies` property in favour of `private_endpoint_network_policies_enabled` [GH-17464] * `azurerm_subnet` - deprecate `enforce_private_link_service_network_policies` property in favour of `private_link_service_network_policies_enabled` [GH-17464] From ebd138d57949f8bcc25b025c725fd87afb902100 Mon Sep 17 00:00:00 2001 From: xuzhang3 <57888764+xuzhang3@users.noreply.github.com> Date: Wed, 10 Aug 2022 00:14:29 +0800 Subject: [PATCH 054/100] [azurerm_express_route_circuit_peering]- enhance - support for ipv4_enabled gateway_manager_etag (#17338) Co-authored-by: xuzhang3 --- .../express_route_circuit_peering_resource.go | 113 +++++++++++++----- ...xpress_route_circuit_peering.html.markdown | 66 +++++++++- 2 files changed, 144 insertions(+), 35 deletions(-) diff --git a/internal/services/network/express_route_circuit_peering_resource.go b/internal/services/network/express_route_circuit_peering_resource.go index 250c9b10e0e9..e29705151b27 100644 --- a/internal/services/network/express_route_circuit_peering_resource.go +++ b/internal/services/network/express_route_circuit_peering_resource.go @@ -58,12 +58,24 @@ func resourceExpressRouteCircuitPeering() *pluginsdk.Resource { "primary_peer_address_prefix": { Type: pluginsdk.TypeString, - Required: true, + Optional: true, + RequiredWith: []string{ + "secondary_peer_address_prefix", + }, }, "secondary_peer_address_prefix": { Type: pluginsdk.TypeString, - Required: true, + Optional: true, + RequiredWith: []string{ + "primary_peer_address_prefix", + }, + }, + + "ipv4_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, }, "vlan_id": { @@ -119,7 +131,7 @@ func resourceExpressRouteCircuitPeering() *pluginsdk.Resource { Schema: map[string]*pluginsdk.Schema{ "microsoft_peering": { Type: pluginsdk.TypeList, - Required: true, + Optional: true, MaxItems: 1, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ @@ -159,6 +171,12 @@ func resourceExpressRouteCircuitPeering() *pluginsdk.Resource { Required: true, }, + "enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "route_filter_id": { Type: pluginsdk.TypeString, Optional: true, @@ -188,6 +206,11 @@ func resourceExpressRouteCircuitPeering() *pluginsdk.Resource { Optional: true, ValidateFunc: azure.ValidateResourceID, }, + + "gateway_manager_etag": { + Type: pluginsdk.TypeString, + Computed: true, + }, }, } } @@ -228,20 +251,38 @@ func resourceExpressRouteCircuitPeeringCreateUpdate(d *pluginsdk.ResourceData, m parameters := network.ExpressRouteCircuitPeering{ ExpressRouteCircuitPeeringPropertiesFormat: &network.ExpressRouteCircuitPeeringPropertiesFormat{ - PeeringType: network.ExpressRoutePeeringType(id.PeeringName), - SharedKey: utils.String(sharedKey), - PrimaryPeerAddressPrefix: utils.String(primaryPeerAddressPrefix), - SecondaryPeerAddressPrefix: utils.String(secondaryPeerAddressPrefix), - AzureASN: utils.Int32(int32(azureASN)), - PeerASN: utils.Int64(int64(peerASN)), - VlanID: utils.Int32(int32(vlanId)), + PeeringType: network.ExpressRoutePeeringType(id.PeeringName), + SharedKey: utils.String(sharedKey), + AzureASN: utils.Int32(int32(azureASN)), + PeerASN: utils.Int64(int64(peerASN)), + VlanID: utils.Int32(int32(vlanId)), + GatewayManagerEtag: utils.String(d.Get("gateway_manager_etag").(string)), }, } + ipv4Enabled := d.Get("ipv4_enabled").(bool) + if ipv4Enabled { + parameters.ExpressRouteCircuitPeeringPropertiesFormat.State = network.ExpressRoutePeeringStateEnabled + } else { + parameters.ExpressRouteCircuitPeeringPropertiesFormat.State = network.ExpressRoutePeeringStateDisabled + } + + if !strings.EqualFold(primaryPeerAddressPrefix, "") { + parameters.PrimaryPeerAddressPrefix = utils.String(primaryPeerAddressPrefix) + } + + if !strings.EqualFold(secondaryPeerAddressPrefix, "") { + parameters.SecondaryPeerAddressPrefix = utils.String(secondaryPeerAddressPrefix) + } + if strings.EqualFold(id.PeeringName, string(network.ExpressRoutePeeringTypeMicrosoftPeering)) { peerings := d.Get("microsoft_peering_config").([]interface{}) - if len(peerings) == 0 { - return fmt.Errorf("`microsoft_peering_config` must be specified when `peering_type` is set to `MicrosoftPeering`") + if len(peerings) == 0 && primaryPeerAddressPrefix != "" { + return fmt.Errorf("`microsoft_peering_config` must be specified when config for Ipv4 and `peering_type` is set to `MicrosoftPeering`") + } + + if len(peerings) != 0 && (primaryPeerAddressPrefix == "" || secondaryPeerAddressPrefix == "") { + return fmt.Errorf("`primary_peer_address_prefix, secondary_peer_address_prefix` must be specified when config for Ipv4") } peeringConfig := expandExpressRouteCircuitPeeringMicrosoftConfig(peerings) @@ -252,23 +293,20 @@ func resourceExpressRouteCircuitPeeringCreateUpdate(d *pluginsdk.ResourceData, m ID: utils.String(route_filter_id), } } + } else if route_filter_id != "" { + return fmt.Errorf("`route_filter_id` may only be specified when `peering_type` is set to `MicrosoftPeering`") + } - ipv6Peering := d.Get("ipv6").([]interface{}) - ipv6PeeringConfig, err := expandExpressRouteCircuitIpv6PeeringConfig(ipv6Peering) - if err != nil { - return err - } - parameters.ExpressRouteCircuitPeeringPropertiesFormat.Ipv6PeeringConfig = ipv6PeeringConfig - } else { - if route_filter_id != "" { - return fmt.Errorf("`route_filter_id` may only be specified when `peering_type` is set to `MicrosoftPeering`") - } + ipv6Peering := d.Get("ipv6").([]interface{}) + if len(ipv6Peering) != 0 && id.PeeringName == string(network.ExpressRoutePeeringTypeAzurePublicPeering) { + return fmt.Errorf("`ipv6` may only be specified when `peering_type` is `MicrosoftPeering` or `AzurePrivatePeering`") + } - ipv6Peering := d.Get("ipv6").([]interface{}) - if len(ipv6Peering) != 0 { - return fmt.Errorf("`ipv6` may only be specified when `peering_type` is set to `MicrosoftPeering`") - } + ipv6PeeringConfig, err := expandExpressRouteCircuitIpv6PeeringConfig(ipv6Peering) + if err != nil { + return err } + parameters.ExpressRouteCircuitPeeringPropertiesFormat.Ipv6PeeringConfig = ipv6PeeringConfig future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ExpressRouteCircuitName, id.PeeringName, parameters) if err != nil { @@ -315,6 +353,8 @@ func resourceExpressRouteCircuitPeeringRead(d *pluginsdk.ResourceData, meta inte d.Set("primary_peer_address_prefix", props.PrimaryPeerAddressPrefix) d.Set("secondary_peer_address_prefix", props.SecondaryPeerAddressPrefix) d.Set("vlan_id", props.VlanID) + d.Set("gateway_manager_etag", props.GatewayManagerEtag) + d.Set("ipv4_enabled", props.State == network.ExpressRoutePeeringStateEnabled) routeFilterId := "" if props.RouteFilter != nil && props.RouteFilter.ID != nil { @@ -388,10 +428,24 @@ func expandExpressRouteCircuitIpv6PeeringConfig(input []interface{}) (*network.I v := input[0].(map[string]interface{}) peeringConfig := network.Ipv6ExpressRouteCircuitPeeringConfig{ - PrimaryPeerAddressPrefix: utils.String(v["primary_peer_address_prefix"].(string)), - SecondaryPeerAddressPrefix: utils.String(v["secondary_peer_address_prefix"].(string)), - MicrosoftPeeringConfig: expandExpressRouteCircuitPeeringMicrosoftConfig(v["microsoft_peering"].([]interface{})), + MicrosoftPeeringConfig: expandExpressRouteCircuitPeeringMicrosoftConfig(v["microsoft_peering"].([]interface{})), + State: network.ExpressRouteCircuitPeeringStateEnabled, } + + primaryPeerAddressPrefix := v["primary_peer_address_prefix"].(string) + secondaryPeerAddressPrefix := v["secondary_peer_address_prefix"].(string) + if !strings.EqualFold(primaryPeerAddressPrefix, "") { + peeringConfig.PrimaryPeerAddressPrefix = utils.String(primaryPeerAddressPrefix) + } + if !strings.EqualFold(secondaryPeerAddressPrefix, "") { + peeringConfig.SecondaryPeerAddressPrefix = utils.String(secondaryPeerAddressPrefix) + } + + ipv6Enabled := v["enabled"].(bool) + if !ipv6Enabled { + peeringConfig.State = network.ExpressRouteCircuitPeeringStateDisabled + } + routeFilterId := v["route_filter_id"].(string) if routeFilterId != "" { if _, err := parse.RouteFilterID(routeFilterId); err != nil { @@ -448,6 +502,7 @@ func flattenExpressRouteCircuitIpv6PeeringConfig(input *network.Ipv6ExpressRoute "primary_peer_address_prefix": primaryPeerAddressPrefix, "secondary_peer_address_prefix": secondaryPeerAddressPrefix, "route_filter_id": routeFilterId, + "enabled": input.State == network.ExpressRouteCircuitPeeringStateEnabled, }, } } diff --git a/website/docs/r/express_route_circuit_peering.html.markdown b/website/docs/r/express_route_circuit_peering.html.markdown index 5b33d5d6ac2b..d97221573525 100644 --- a/website/docs/r/express_route_circuit_peering.html.markdown +++ b/website/docs/r/express_route_circuit_peering.html.markdown @@ -45,6 +45,7 @@ resource "azurerm_express_route_circuit_peering" "example" { peer_asn = 100 primary_peer_address_prefix = "123.0.0.0/30" secondary_peer_address_prefix = "123.0.0.4/30" + ipv4_enabled = true vlan_id = 300 microsoft_peering_config { @@ -54,6 +55,7 @@ resource "azurerm_express_route_circuit_peering" "example" { ipv6 { primary_peer_address_prefix = "2002:db01::/126" secondary_peer_address_prefix = "2003:db01::/126" + enabled = true microsoft_peering { advertised_public_prefixes = ["2002:db01::/126"] @@ -62,6 +64,52 @@ resource "azurerm_express_route_circuit_peering" "example" { } ``` +## Example Usage (Creating Azure Private Peering) + +```hcl +resource "azurerm_resource_group" "example" { + name = "exprtTest" + location = "West Europe" +} + +resource "azurerm_express_route_circuit" "example" { + name = "expressRoute1" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + service_provider_name = "Equinix" + peering_location = "Silicon Valley" + bandwidth_in_mbps = 50 + + sku { + tier = "Standard" + family = "MeteredData" + } + + allow_classic_operations = false + + tags = { + environment = "Production" + } +} + +resource "azurerm_express_route_circuit_peering" "example" { + peering_type = "AzurePrivatePeering" + express_route_circuit_name = azurerm_express_route_circuit.example.name + resource_group_name = azurerm_resource_group.example.name + peer_asn = 100 + primary_peer_address_prefix = "123.0.0.0/30" + secondary_peer_address_prefix = "123.0.0.4/30" + ipv4_enabled = true + vlan_id = 300 + + ipv6 { + primary_peer_address_prefix = "2002:db01::/126" + secondary_peer_address_prefix = "2003:db01::/126" + enabled = true + } +} +``` + ## Argument Reference The following arguments are supported: @@ -74,17 +122,19 @@ The following arguments are supported: * `resource_group_name` - (Required) The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created. -* `primary_peer_address_prefix` - (Required) A `/30` subnet for the primary link. +* `vlan_id` - (Required) A valid VLAN ID to establish this peering on. -* `secondary_peer_address_prefix` - (Required) A `/30` subnet for the secondary link. +* `primary_peer_address_prefix` - (Optional) A `/30` subnet for the primary link. Required when config for IPv4. -* `vlan_id` - (Required) A valid VLAN ID to establish this peering on. +* `secondary_peer_address_prefix` - (Optional) A `/30` subnet for the secondary link. Required when config for IPv4. + +* `ipv4_enabled` - (Optional) A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`. * `shared_key` - (Optional) The shared key. Can be a maximum of 25 characters. * `peer_asn` - (Optional) The Either a 16-bit or a 32-bit ASN. Can either be public or private. -* `microsoft_peering_config` - (Optional) A `microsoft_peering_config` block as defined below. Required when `peering_type` is set to `MicrosoftPeering`. +* `microsoft_peering_config` - (Optional) A `microsoft_peering_config` block as defined below. Required when `peering_type` is set to `MicrosoftPeering` and config for IPv4. * `ipv6` - (Optional) A `ipv6` block as defined below. @@ -104,14 +154,18 @@ A `microsoft_peering_config` block contains: A `ipv6` block contains: -* `microsoft_peering` - (Required) A `microsoft_peering` block as defined below. - * `primary_peer_address_prefix` - (Required) A subnet for the primary link. * `secondary_peer_address_prefix` - (Required) A subnet for the secondary link. + +* `enabled` - (Optional) A boolean value indicating whether the IPv6 peering is enabled. Defaults to `true`. + +* `microsoft_peering` - (Optional) A `microsoft_peering` block as defined below. * `route_filter_id` - (Optional) The ID of the Route Filter. Only available when `peering_type` is set to `MicrosoftPeering`. +~> **NOTE:** `ipv6` can be specified when `peering_type` is `MicrosoftPeering` or `AzurePrivatePeering` + --- A `microsoft_peering` block contains: From 57e33be1641918733d902c0d5d8e1c0cccf05690 Mon Sep 17 00:00:00 2001 From: kt Date: Tue, 9 Aug 2022 09:15:05 -0700 Subject: [PATCH 055/100] CHANGELOG #17338 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33e516856826..d7cffa412727 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ FEATURES: * **New Resource**: `azurerm_monitor_data_collection_endpoint` [GH-17684] ENHANCEMENTS: + +* `azurerm_express_route_circuit_peering` - support for the `ipv4_enabled` and `gateway_manager_etag` properties [GH-17338] * `azurerm_site_recovery_replicated_vm` - support for the `target_disk_encryption` block [GH-15783] * `azurerm_subnet` - deprecate `enforce_private_link_endpoint_network_policies` property in favour of `private_endpoint_network_policies_enabled` [GH-17464] * `azurerm_subnet` - deprecate `enforce_private_link_service_network_policies` property in favour of `private_link_service_network_policies_enabled` [GH-17464] From 099ad51a0540863ef1fcf526f933d2cc757ea126 Mon Sep 17 00:00:00 2001 From: Xiaxin <92154856+xiaxyi@users.noreply.github.com> Date: Wed, 10 Aug 2022 00:25:50 +0800 Subject: [PATCH 056/100] `azurerm_servicebus_subscription`: support client affine property, `azurerm_servicebus_subscription_rule`: add property `sql_filter_compatibility_level` (#17101) --- .../servicebus_subscription_resource.go | 110 +++++++++++++++++- .../servicebus_subscription_resource_test.go | 48 ++++++++ .../servicebus_subscription_rule_resource.go | 9 ++ .../d/servicebus_subscription.html.markdown | 12 ++ .../r/servicebus_subscription.html.markdown | 18 +++ 5 files changed, 195 insertions(+), 2 deletions(-) diff --git a/internal/services/servicebus/servicebus_subscription_resource.go b/internal/services/servicebus/servicebus_subscription_resource.go index 1bdbf1504d6e..70d9a755b86d 100644 --- a/internal/services/servicebus/servicebus_subscription_resource.go +++ b/internal/services/servicebus/servicebus_subscription_resource.go @@ -3,6 +3,7 @@ package servicebus import ( "fmt" "log" + "strings" "time" "github.com/hashicorp/go-azure-helpers/lang/response" @@ -130,6 +131,39 @@ func resourceServicebusSubscriptionSchema() map[string]*pluginsdk.Schema { string(subscriptions.EntityStatusReceiveDisabled), }, false), }, + + "client_scoped_subscription_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: false, + }, + + "client_scoped_subscription": { + Type: pluginsdk.TypeList, + Optional: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "client_id": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + }, + + "is_client_scoped_subscription_shareable": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + ForceNew: true, + }, + + "is_client_scoped_subscription_durable": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + }, + }, + }, } } @@ -140,9 +174,27 @@ func resourceServiceBusSubscriptionCreateUpdate(d *pluginsdk.ResourceData, meta log.Printf("[INFO] preparing arguments for ServiceBus Subscription creation.") var id subscriptions.Subscriptions2Id + name := d.Get("name").(string) + + clientId := "" + var isSubShared bool + isClintScopedEnabled := d.Get("client_scoped_subscription_enabled").(bool) + if isClintScopedEnabled { + clientScopedSubsRawData := d.Get("client_scoped_subscription").([]interface{}) + if len(clientScopedSubsRawData) > 0 { + clientScopedSubsProps := clientScopedSubsRawData[0].(map[string]interface{}) + if clientScopedSubsProps["client_id"] != "" { + clientId = clientScopedSubsProps["client_id"].(string) + } + name = name + "$" + clientId + "$D" + + isSubShared = clientScopedSubsProps["is_client_scoped_subscription_shareable"].(bool) + } + } + if topicIdLit := d.Get("topic_id").(string); topicIdLit != "" { topicId, _ := subscriptions.ParseTopicID(topicIdLit) - id = subscriptions.NewSubscriptions2ID(topicId.SubscriptionId, topicId.ResourceGroupName, topicId.NamespaceName, topicId.TopicName, d.Get("name").(string)) + id = subscriptions.NewSubscriptions2ID(topicId.SubscriptionId, topicId.ResourceGroupName, topicId.NamespaceName, topicId.TopicName, name) } if d.IsNewResource() { @@ -167,9 +219,16 @@ func resourceServiceBusSubscriptionCreateUpdate(d *pluginsdk.ResourceData, meta MaxDeliveryCount: utils.Int64(int64(d.Get("max_delivery_count").(int))), RequiresSession: utils.Bool(d.Get("requires_session").(bool)), Status: &status, + IsClientAffine: utils.Bool(isClintScopedEnabled), + ClientAffineProperties: &subscriptions.SBClientAffineProperties{}, }, } + if isClintScopedEnabled { + parameters.Properties.ClientAffineProperties.IsShared = &isSubShared + parameters.Properties.ClientAffineProperties.ClientId = &clientId + } + if autoDeleteOnIdle := d.Get("auto_delete_on_idle").(string); autoDeleteOnIdle != "" { parameters.Properties.AutoDeleteOnIdle = &autoDeleteOnIdle } @@ -217,9 +276,12 @@ func resourceServiceBusSubscriptionRead(d *pluginsdk.ResourceData, meta interfac return fmt.Errorf("retrieving %s: %+v", id, err) } - d.Set("name", id.SubscriptionName) d.Set("topic_id", subscriptions.NewTopicID(id.SubscriptionId, id.ResourceGroupName, id.NamespaceName, id.TopicName).ID()) + clientScopedEnabled := false + userAssignedName := id.SubscriptionName + clientId := "" + if model := resp.Model; model != nil { if props := model.Properties; props != nil { d.Set("auto_delete_on_idle", props.AutoDeleteOnIdle) @@ -232,13 +294,28 @@ func resourceServiceBusSubscriptionRead(d *pluginsdk.ResourceData, meta interfac d.Set("forward_to", props.ForwardTo) d.Set("forward_dead_lettered_messages_to", props.ForwardDeadLetteredMessagesTo) d.Set("status", utils.String(string(*props.Status))) + d.Set("client_scoped_subscription_enabled", props.IsClientAffine) if count := props.MaxDeliveryCount; count != nil { d.Set("max_delivery_count", int(*count)) } + if props.IsClientAffine != nil && *props.IsClientAffine { + if props.ClientAffineProperties.ClientId != nil { + clientId = *props.ClientAffineProperties.ClientId + } + clientScopedEnabled = true + } + d.Set("client_scoped_subscription", flattenServiceBusNamespaceClientScopedSubscription(props.ClientAffineProperties)) + } } + if clientScopedEnabled { + suffix := "$" + clientId + "$D" + userAssignedName = strings.TrimSuffix(userAssignedName, suffix) + } + d.Set("name", userAssignedName) + return nil } @@ -258,3 +335,32 @@ func resourceServiceBusSubscriptionDelete(d *pluginsdk.ResourceData, meta interf return nil } + +func flattenServiceBusNamespaceClientScopedSubscription(clientScopedSubsProps *subscriptions.SBClientAffineProperties) []interface{} { + if clientScopedSubsProps == nil { + return []interface{}{} + } + + var clientId string + var isShareable, isDurable bool + + if clientScopedSubsProps.ClientId != nil { + clientId = *clientScopedSubsProps.ClientId + } + + if clientScopedSubsProps.IsShared != nil { + isShareable = *clientScopedSubsProps.IsShared + } + + if clientScopedSubsProps.IsDurable != nil { + isDurable = *clientScopedSubsProps.IsDurable + } + + return []interface{}{ + map[string]interface{}{ + "client_id": clientId, + "is_client_scoped_subscription_shareable": isShareable, + "is_client_scoped_subscription_durable": isDurable, + }, + } +} diff --git a/internal/services/servicebus/servicebus_subscription_resource_test.go b/internal/services/servicebus/servicebus_subscription_resource_test.go index 1128d776389a..31599baf02f9 100644 --- a/internal/services/servicebus/servicebus_subscription_resource_test.go +++ b/internal/services/servicebus/servicebus_subscription_resource_test.go @@ -45,6 +45,21 @@ func TestAccServiceBusSubscription_complete(t *testing.T) { }) } +func TestAccServiceBusSubscription_clientScopedEnabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_servicebus_subscription", "test") + r := ServiceBusSubscriptionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.clientScopedSubscriptionEnabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccServiceBusSubscription_requiresImport(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_servicebus_subscription", "test") r := ServiceBusSubscriptionResource{} @@ -369,3 +384,36 @@ func (ServiceBusSubscriptionResource) updateDeadLetteringOnFilterEvaluationExcep return fmt.Sprintf(testAccServiceBusSubscription_tfTemplate, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, "dead_lettering_on_filter_evaluation_error = false\n") } + +func (ServiceBusSubscriptionResource) clientScopedSubscriptionEnabled(data acceptance.TestData) string { + return fmt.Sprintf(` +resource "azurerm_resource_group" "test" { + name = "acctestRG-%[1]d" + location = "%[2]s" +} + +resource "azurerm_servicebus_namespace" "test" { + name = "acctestsbn-%[1]d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + sku = "Premium" + capacity = 1 +} + +resource "azurerm_servicebus_topic" "test" { + name = "acctestservicebustopic-%[1]d" + namespace_id = azurerm_servicebus_namespace.test.id +} + +resource "azurerm_servicebus_subscription" "test" { + name = "_acctestsub-%[1]d_" + topic_id = azurerm_servicebus_topic.test.id + max_delivery_count = 10 + client_scoped_subscription_enabled = true + client_scoped_subscription { + client_id = "123456" + is_client_scoped_subscription_shareable = false + } +} +`, data.RandomInteger, data.Locations.Primary) +} diff --git a/internal/services/servicebus/servicebus_subscription_rule_resource.go b/internal/services/servicebus/servicebus_subscription_rule_resource.go index 129527787491..c0db5dd7b0ce 100644 --- a/internal/services/servicebus/servicebus_subscription_rule_resource.go +++ b/internal/services/servicebus/servicebus_subscription_rule_resource.go @@ -79,6 +79,12 @@ func resourceServicebusSubscriptionRuleSchema() map[string]*pluginsdk.Schema { ValidateFunc: validate.SqlFilter, }, + // Reserved for future use, currently hard-coded to 20 + "sql_filter_compatibility_level": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + "correlation_filter": { Type: pluginsdk.TypeList, Optional: true, @@ -284,6 +290,9 @@ func resourceServiceBusSubscriptionRuleRead(d *pluginsdk.ResourceData, meta inte if props.SqlFilter != nil { d.Set("sql_filter", props.SqlFilter.SqlExpression) + if props.SqlFilter.CompatibilityLevel != nil { + d.Set("sql_filter_compatibility_level", props.SqlFilter.CompatibilityLevel) + } } if err := d.Set("correlation_filter", flattenAzureRmServiceBusCorrelationFilter(props.CorrelationFilter)); err != nil { diff --git a/website/docs/d/servicebus_subscription.html.markdown b/website/docs/d/servicebus_subscription.html.markdown index 872a47d127f4..8b4aadf1bd79 100644 --- a/website/docs/d/servicebus_subscription.html.markdown +++ b/website/docs/d/servicebus_subscription.html.markdown @@ -57,6 +57,18 @@ output "servicebus_subscription" { * `forward_dead_lettered_messages_to` - The name of a Queue or Topic to automatically forward Dead Letter messages to. +* `client_scoped_subscription_enabled` - Does the subscription scoped to a client id or not. + +* `client_scoped_subscription` - (Optional) A `client_scoped_subscription` block as defined below. + +--- + +* `client_id` - The Client ID of the application that created the client-scoped subscription. + +* `is_client_scoped_subscription_shareable` - The client scoped subscription is shareable or not. + +* `is_client_scoped_subscription_durable` - The client scoped subscription is durable or not. + ## Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: diff --git a/website/docs/r/servicebus_subscription.html.markdown b/website/docs/r/servicebus_subscription.html.markdown index b6e0b6c91ec1..b435a630bb42 100644 --- a/website/docs/r/servicebus_subscription.html.markdown +++ b/website/docs/r/servicebus_subscription.html.markdown @@ -73,6 +73,24 @@ The following arguments are supported: * `status` - (Optional) The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`. +* `client_scoped_subscription_enabled` - (Optional) whether the subscription is scoped to a client id. Defaults to `False`. + +~> **NOTE:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service). + +* `client_scoped_subscription` - (Optional) A `client_scoped_subscription` block as defined below. + +--- + +A `client_scoped_subscription` block supports the following: + +* `client_id` - (Optional) Specifies the Client ID of the application that created the client-scoped subscription. + +~> **NOTE:** Client ID can be null or empty, but it must match the client ID set on the JMS client application. From the Azure Service Bus perspective, a null client ID and an empty client id have the same behavior. If the client ID is set to null or empty, it is only accessible to client applications whose client ID is also set to null or empty. + +* `is_client_scoped_subscription_shareable` - (Optional) Whether the client scoped subscription is shareable. Defaults to `true` + +* `is_client_scoped_subscription_durable` - (Optional) Whether the client scoped subscription is durable. This property can only be controlled from the application side. + ## Attributes Reference The following attributes are exported: From 620839508fa6f8a0e46c6129b94b64a42aa00b55 Mon Sep 17 00:00:00 2001 From: kt Date: Tue, 9 Aug 2022 09:27:43 -0700 Subject: [PATCH 057/100] CHANGELOG #17101 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7cffa412727..dfb4992023b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ENHANCEMENTS: * `azurerm_site_recovery_replicated_vm` - support for the `target_disk_encryption` block [GH-15783] * `azurerm_subnet` - deprecate `enforce_private_link_endpoint_network_policies` property in favour of `private_endpoint_network_policies_enabled` [GH-17464] * `azurerm_subnet` - deprecate `enforce_private_link_service_network_policies` property in favour of `private_link_service_network_policies_enabled` [GH-17464] - +* `azurerm_servicebus_subscription` - support for the `client_scoped_subscription_enabled` property and the `client_scoped_subscription` block [GH-17101] BUG FIXES: From eda7d25f66d0af540d482d0632070925c2ab2d93 Mon Sep 17 00:00:00 2001 From: kt Date: Tue, 9 Aug 2022 22:04:47 -0700 Subject: [PATCH 058/100] remove make tools from some actions (#17946) --- .github/workflows/depscheck.yaml | 1 - .github/workflows/gencheck.yaml | 1 - .github/workflows/thirty-two-bit.yaml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/depscheck.yaml b/.github/workflows/depscheck.yaml index 9474d204a130..b0666e930418 100644 --- a/.github/workflows/depscheck.yaml +++ b/.github/workflows/depscheck.yaml @@ -18,5 +18,4 @@ jobs: with: go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - - run: make tools - run: make depscheck diff --git a/.github/workflows/gencheck.yaml b/.github/workflows/gencheck.yaml index 5b67e882edfd..c7119449ef7d 100644 --- a/.github/workflows/gencheck.yaml +++ b/.github/workflows/gencheck.yaml @@ -22,5 +22,4 @@ jobs: with: go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - - run: make tools - run: make gencheck diff --git a/.github/workflows/thirty-two-bit.yaml b/.github/workflows/thirty-two-bit.yaml index 97ad3a9713bf..f9454c6ccb3e 100644 --- a/.github/workflows/thirty-two-bit.yaml +++ b/.github/workflows/thirty-two-bit.yaml @@ -22,5 +22,4 @@ jobs: with: go-version: '1.18.5' - run: bash scripts/gogetcookie.sh - - run: make tools - run: GOARCH=386 GOOS=linux go build -o 32bitbuild . From 060a06146719c5c74f1400e9d2bca0a7e6023731 Mon Sep 17 00:00:00 2001 From: kt Date: Tue, 9 Aug 2022 22:21:01 -0700 Subject: [PATCH 059/100] make terrafmt (#17947) --- .../disks/disk_pool_iscsi_target_lun_resource_test.go | 4 ++-- .../r/kusto_cluster_managed_private_endpoint.html.markdown | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/services/disks/disk_pool_iscsi_target_lun_resource_test.go b/internal/services/disks/disk_pool_iscsi_target_lun_resource_test.go index 3f5527a027ec..90b12d8793ce 100644 --- a/internal/services/disks/disk_pool_iscsi_target_lun_resource_test.go +++ b/internal/services/disks/disk_pool_iscsi_target_lun_resource_test.go @@ -217,9 +217,9 @@ func (r DisksPoolIscsiTargetLunResource) multipleLuns(data acceptance.TestData, %[1]s resource "azurerm_disk_pool_iscsi_target_lun" "test%[2]d" { - iscsi_target_id = azurerm_disk_pool_iscsi_target.test.id + iscsi_target_id = azurerm_disk_pool_iscsi_target.test.id disk_pool_managed_disk_attachment_id = azurerm_disk_pool_managed_disk_attachment.test[%[2]d].id - name = "test-%[2]d" + name = "test-%[2]d" } `, tfCode, i) } diff --git a/website/docs/r/kusto_cluster_managed_private_endpoint.html.markdown b/website/docs/r/kusto_cluster_managed_private_endpoint.html.markdown index 9c3b8237204e..2f3f22a7e009 100644 --- a/website/docs/r/kusto_cluster_managed_private_endpoint.html.markdown +++ b/website/docs/r/kusto_cluster_managed_private_endpoint.html.markdown @@ -83,4 +83,4 @@ Managed Private Endpoint for a Kusto Cluster can be imported using the `resource ```shell terraform import azurerm_kusto_cluster_managed_private_endpoint.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/Clusters/cluster1/managedPrivateEndpoints/managedPrivateEndpoint1 -``` \ No newline at end of file +``` From c7bb7bea30db8ae3647ceaf4cb9ae343d9c4d235 Mon Sep 17 00:00:00 2001 From: Xiaxin <92154856+xiaxyi@users.noreply.github.com> Date: Wed, 10 Aug 2022 21:39:15 +0800 Subject: [PATCH 060/100] DataSource: `azurerm_blueprint_definition` - Fix `version` property output (#16299) --- .../blueprint_definition_data_source.go | 16 ++++++++++++++-- .../blueprint_definition_data_source_test.go | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/internal/services/blueprints/blueprint_definition_data_source.go b/internal/services/blueprints/blueprint_definition_data_source.go index e8285ed16c8b..d76986f3bbbc 100644 --- a/internal/services/blueprints/blueprint_definition_data_source.go +++ b/internal/services/blueprints/blueprint_definition_data_source.go @@ -77,6 +77,7 @@ func dataSourceBlueprintDefinition() *pluginsdk.Resource { func dataSourceBlueprintDefinitionRead(d *pluginsdk.ResourceData, meta interface{}) error { client := meta.(*clients.Client).Blueprints.BlueprintsClient + publishedClient := meta.(*clients.Client).Blueprints.PublishedBlueprintsClient ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -112,9 +113,20 @@ func dataSourceBlueprintDefinitionRead(d *pluginsdk.ResourceData, meta interface d.Set("target_scope", resp.TargetScope) - if resp.Versions != nil { - d.Set("versions", resp.Versions) + versionList := make([]string, 0) + versions, err := publishedClient.List(ctx, scope, name) + if err != nil { + return fmt.Errorf("listing blue print versions for %s error: %+v", *resp.ID, err) } + for _, version := range versions.Values() { + if version.PublishedBlueprintProperties == nil || version.Name == nil { + continue + } + versionList = append(versionList, *version.Name) + } + + d.Set("versions", versionList) + return nil } diff --git a/internal/services/blueprints/blueprint_definition_data_source_test.go b/internal/services/blueprints/blueprint_definition_data_source_test.go index 30e640a4cb78..4f7f836a8a06 100644 --- a/internal/services/blueprints/blueprint_definition_data_source_test.go +++ b/internal/services/blueprints/blueprint_definition_data_source_test.go @@ -21,6 +21,7 @@ func TestAccBlueprintDefinitionDataSource_basic(t *testing.T) { Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).Key("description").HasValue("Acceptance Test stub for Blueprints at Subscription"), check.That(data.ResourceName).Key("name").HasValue("testAcc_basicSubscription"), + check.That(data.ResourceName).Key("versions.#").HasValue("2"), check.That(data.ResourceName).Key("last_modified").Exists(), check.That(data.ResourceName).Key("target_scope").HasValue("subscription"), check.That(data.ResourceName).Key("time_created").Exists(), From f0e323747704f17458be3a57279c52407bd33603 Mon Sep 17 00:00:00 2001 From: jackofallops <11830746+jackofallops@users.noreply.github.com> Date: Wed, 10 Aug 2022 14:40:22 +0100 Subject: [PATCH 061/100] Update for #16299 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfb4992023b2..93de9fd5471c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ ENHANCEMENTS: BUG FIXES: -`azurerm_backup_policy_vm` - now prevents crash when `frequency` is set to Hourly and, `hour_interval` and `hour_duration`are not set [GH-17880] +* `azurerm_backup_policy_vm` - now prevents crash when `frequency` is set to Hourly and, `hour_interval` and `hour_duration`are not set [GH-17880] +* Data Source: `azurerm_blueprint_definition` - Fix `version` property output [GH-16299] ## 3.17.0 (August 04, 2022) From b46896ea7818a08f63e4fb8fb8e5017be84376f5 Mon Sep 17 00:00:00 2001 From: catriona-m <86247157+catriona-m@users.noreply.github.com> Date: Wed, 10 Aug 2022 16:09:14 +0100 Subject: [PATCH 062/100] gha - fix waiting-response label (#17952) --- .github/workflows/issue-comment-created.yaml | 21 ++++++++++---------- .github/workflows/pull-request-reviewed.yaml | 16 +++++++-------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/issue-comment-created.yaml b/.github/workflows/issue-comment-created.yaml index cb490db85eb0..9fc1a1778e70 100644 --- a/.github/workflows/issue-comment-created.yaml +++ b/.github/workflows/issue-comment-created.yaml @@ -4,11 +4,13 @@ on: issue_comment: types: [created] +permissions: + pull-requests: write + issues: write + jobs: issue_comment_triage: runs-on: ubuntu-latest - permissions: - pull-requests: write steps: - uses: actions-ecosystem/action-remove-labels@v1 with: @@ -24,11 +26,10 @@ jobs: with: github_token: "${{ secrets.GITHUB_TOKEN }}" labels: waiting-response - - uses: actions-ecosystem/action-add-labels@v1.1.0 - if: github.event.issue.pull_request && endsWith(github.event.comment.body, '/wr') - with: - labels: waiting-response - github_token: "${{ secrets.GITHUB_TOKEN }}" - number: ${{ github.event.pull_request.number }} - repo: ${{ github.repository }} - + pull_request_comment: + runs-on: ubuntu-latest + if: github.event.issue.pull_request && endsWith(github.event.comment.body, '/wr') + steps: + - shell: bash + run: | + curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos${{ github.owner }}/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels" -d '{"labels":["waiting-response"]}' diff --git a/.github/workflows/pull-request-reviewed.yaml b/.github/workflows/pull-request-reviewed.yaml index 1595a56251b3..0598a737c0b7 100644 --- a/.github/workflows/pull-request-reviewed.yaml +++ b/.github/workflows/pull-request-reviewed.yaml @@ -5,19 +5,17 @@ on: pull_request_review: types: [submitted] +permissions: + pull-requests: write + jobs: add-waiting-response: if: github.event.review.state != 'approved' && github.actor != github.event.pull_request.user.login runs-on: ubuntu-latest - permissions: - pull-requests: write steps: - - uses: actions-ecosystem/action-add-labels@v1.1.0 - with: - labels: waiting-response - github_token: "${{ secrets.GITHUB_TOKEN }}" - number: ${{ github.event.pull_request.number }} - repo: ${{ github.repository }} + - shell: bash + run: | + curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos${{ github.owner }}/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" -d '{"labels":["waiting-response"]}' remove-waiting-response: if: github.actor == github.event.pull_request.user.login runs-on: ubuntu-latest @@ -25,4 +23,4 @@ jobs: - uses: actions-ecosystem/action-remove-labels@v1 with: github_token: "${{ secrets.GITHUB_TOKEN }}" - labels: waiting-response \ No newline at end of file + labels: waiting-response From f39b04a04703160467220f0d5d8930f23d61d4e7 Mon Sep 17 00:00:00 2001 From: Yun Liu Date: Wed, 10 Aug 2022 23:14:37 +0800 Subject: [PATCH 063/100] Update document for property `engine` in `azurerm_kusto_cluster` (#17695) Co-authored-by: kt --- website/docs/r/kusto_cluster.html.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/r/kusto_cluster.html.markdown b/website/docs/r/kusto_cluster.html.markdown index 29e4d6a990c4..d30472dd82ca 100644 --- a/website/docs/r/kusto_cluster.html.markdown +++ b/website/docs/r/kusto_cluster.html.markdown @@ -82,7 +82,9 @@ The following arguments are supported: * `zones` - (Optional) Specifies a list of Availability Zones in which this Kusto Cluster should be located. Changing this forces a new Kusto Cluster to be created. -* `engine` - (Optional). The engine type that should be used. Possible values are `V2` and `V3`. Defaults to `V2`. +* `engine` - (Optional). The engine type that will be used in the backend. Possible values are `V2` and `V3`. Defaults to `V2`. Changing this forces a new Kusto Cluster to be created. + +~> **NOTE:** In `v4.0.0` and later version of the AzureRM Provider, default engine type will be changed to `V3`. --- From 94044ebe6e195dc8474aa4cb32d40b5beb5b2a04 Mon Sep 17 00:00:00 2001 From: Tom Harvey Date: Thu, 11 Aug 2022 06:14:08 +0200 Subject: [PATCH 064/100] updating to include #17523 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93de9fd5471c..96a868245594 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: ENHANCEMENTS: +* storage: updating to use API Version `2021-09-01` [GH-17523] * `azurerm_express_route_circuit_peering` - support for the `ipv4_enabled` and `gateway_manager_etag` properties [GH-17338] * `azurerm_site_recovery_replicated_vm` - support for the `target_disk_encryption` block [GH-15783] * `azurerm_subnet` - deprecate `enforce_private_link_endpoint_network_policies` property in favour of `private_endpoint_network_policies_enabled` [GH-17464] From 1394ae31dbde262a61c92653c3519b13e1949561 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Fri, 5 Aug 2022 12:23:16 +0200 Subject: [PATCH 065/100] dependencies: updating to `v0.20220805.1100614` of `github.com/hashicorp/go-azure-sdk` --- go.mod | 2 +- go.sum | 4 ++-- .../aad/2021-05-01/domainservices/method_get_autorest.go | 1 + .../tenants/method_checknameavailability_autorest.go | 1 + .../aadb2c/2021-04-01-preview/tenants/method_get_autorest.go | 1 + .../2021-04-01-preview/tenants/method_update_autorest.go | 1 + .../servers/method_checknameavailability_autorest.go | 1 + .../2017-08-01/servers/method_dissociategateway_autorest.go | 1 + .../2017-08-01/servers/method_getdetails_autorest.go | 1 + .../2017-08-01/servers/method_list_autorest.go | 1 + .../2017-08-01/servers/method_listbyresourcegroup_autorest.go | 1 + .../2017-08-01/servers/method_listgatewaystatus_autorest.go | 1 + .../2017-08-01/servers/method_listskusforexisting_autorest.go | 1 + .../2022-05-01/configurationstores/method_get_autorest.go | 1 + .../configurationstores/method_regeneratekey_autorest.go | 1 + .../method_workbooktemplatescreateorupdate_autorest.go | 1 + .../method_workbooktemplatesdelete_autorest.go | 1 + .../method_workbooktemplatesget_autorest.go | 1 + .../method_workbooktemplateslistbyresourcegroup_autorest.go | 1 + .../method_workbooktemplatesupdate_autorest.go | 1 + .../method_workbookscreateorupdate_autorest.go | 1 + .../applicationinsights/method_workbooksdelete_autorest.go | 1 + .../applicationinsights/method_workbooksget_autorest.go | 1 + .../method_workbooksrevisionget_autorest.go | 1 + .../applicationinsights/method_workbooksupdate_autorest.go | 1 + .../2020-10-01/attestationproviders/method_create_autorest.go | 1 + .../2020-10-01/attestationproviders/method_delete_autorest.go | 1 + .../2020-10-01/attestationproviders/method_get_autorest.go | 1 + .../method_getdefaultbylocation_autorest.go | 1 + .../2020-10-01/attestationproviders/method_list_autorest.go | 1 + .../method_listbyresourcegroup_autorest.go | 1 + .../attestationproviders/method_listdefault_autorest.go | 1 + .../2020-10-01/attestationproviders/method_update_autorest.go | 1 + .../automationaccount/method_createorupdate_autorest.go | 1 + .../2021-06-22/automationaccount/method_delete_autorest.go | 1 + .../2021-06-22/automationaccount/method_get_autorest.go | 1 + .../2021-06-22/automationaccount/method_update_autorest.go | 1 + .../2020-10-01/clusters/method_create_autorest.go | 1 + .../2020-10-01/clusters/method_delete_autorest.go | 1 + .../azurestackhci/2020-10-01/clusters/method_get_autorest.go | 1 + .../2020-10-01/clusters/method_update_autorest.go | 1 + .../cognitiveservicesaccounts/method_accountsget_autorest.go | 1 + .../method_accountslistkeys_autorest.go | 1 + .../method_accountslistskus_autorest.go | 1 + .../method_accountslistusages_autorest.go | 1 + .../method_accountsregeneratekey_autorest.go | 1 + .../method_checkdomainavailability_autorest.go | 1 + .../method_checkskuavailability_autorest.go | 1 + .../method_deletedaccountsget_autorest.go | 1 + .../method_checknameavailability_autorest.go | 1 + .../2020-08-20/communicationservice/method_get_autorest.go | 1 + .../method_linknotificationhub_autorest.go | 1 + .../communicationservice/method_listkeys_autorest.go | 1 + .../communicationservice/method_regeneratekey_autorest.go | 1 + .../2020-08-20/communicationservice/method_update_autorest.go | 1 + .../availabilitysets/method_createorupdate_autorest.go | 1 + .../2021-11-01/availabilitysets/method_delete_autorest.go | 1 + .../2021-11-01/availabilitysets/method_get_autorest.go | 1 + .../availabilitysets/method_listavailablesizes_autorest.go | 1 + .../2021-11-01/availabilitysets/method_update_autorest.go | 1 + .../method_createorupdate_autorest.go | 1 + .../proximityplacementgroups/method_delete_autorest.go | 1 + .../proximityplacementgroups/method_get_autorest.go | 1 + .../proximityplacementgroups/method_update_autorest.go | 1 + .../2021-11-01/sshpublickeys/method_create_autorest.go | 1 + .../2021-11-01/sshpublickeys/method_delete_autorest.go | 1 + .../sshpublickeys/method_generatekeypair_autorest.go | 1 + .../compute/2021-11-01/sshpublickeys/method_get_autorest.go | 1 + .../2021-11-01/sshpublickeys/method_update_autorest.go | 1 + .../confidentialledger/method_ledgerget_autorest.go | 1 + .../containerinstance/method_containergroupsget_autorest.go | 1 + .../containerinstance/method_containergroupsstop_autorest.go | 1 + .../method_containergroupsupdate_autorest.go | 1 + .../containerinstance/method_containersattach_autorest.go | 1 + .../method_containersexecutecommand_autorest.go | 1 + .../containerinstance/method_containerslistlogs_autorest.go | 1 + .../containerinstance/method_locationlistusage_autorest.go | 1 + .../2021-04-01-preview/workspaces/method_get_autorest.go | 1 + .../2022-04-01/resourceguards/method_delete_autorest.go | 1 + .../2022-04-01/resourceguards/method_get_autorest.go | 1 + ...thod_getdefaultbackupsecuritypinrequestsobject_autorest.go | 1 + ...od_getdefaultdeleteprotecteditemrequestsobject_autorest.go | 1 + ...tdefaultdeleteresourceguardproxyrequestsobject_autorest.go | 1 + ...thod_getdefaultdisablesoftdeleterequestsobject_autorest.go | 1 + ...od_getdefaultupdateprotecteditemrequestsobject_autorest.go | 1 + ...getdefaultupdateprotectionpolicyrequestsobject_autorest.go | 1 + .../2022-04-01/resourceguards/method_patch_autorest.go | 1 + .../2022-04-01/resourceguards/method_put_autorest.go | 1 + .../application/method_createorupdate_autorest.go | 1 + .../2021-09-03-preview/application/method_delete_autorest.go | 1 + .../2021-09-03-preview/application/method_get_autorest.go | 1 + .../2021-09-03-preview/application/method_update_autorest.go | 1 + .../applicationgroup/method_createorupdate_autorest.go | 1 + .../applicationgroup/method_delete_autorest.go | 1 + .../applicationgroup/method_get_autorest.go | 1 + .../applicationgroup/method_update_autorest.go | 1 + .../2021-09-03-preview/desktop/method_get_autorest.go | 1 + .../2021-09-03-preview/desktop/method_update_autorest.go | 1 + .../hostpool/method_createorupdate_autorest.go | 1 + .../2021-09-03-preview/hostpool/method_delete_autorest.go | 1 + .../2021-09-03-preview/hostpool/method_get_autorest.go | 1 + .../hostpool/method_retrieveregistrationtoken_autorest.go | 1 + .../2021-09-03-preview/hostpool/method_update_autorest.go | 1 + .../2021-09-03-preview/scalingplan/method_create_autorest.go | 1 + .../2021-09-03-preview/scalingplan/method_delete_autorest.go | 1 + .../2021-09-03-preview/scalingplan/method_get_autorest.go | 1 + .../2021-09-03-preview/scalingplan/method_update_autorest.go | 1 + .../2021-09-03-preview/sessionhost/method_delete_autorest.go | 1 + .../2021-09-03-preview/sessionhost/method_get_autorest.go | 1 + .../2021-09-03-preview/sessionhost/method_update_autorest.go | 1 + .../workspace/method_createorupdate_autorest.go | 1 + .../2021-09-03-preview/workspace/method_delete_autorest.go | 1 + .../2021-09-03-preview/workspace/method_get_autorest.go | 1 + .../2021-09-03-preview/workspace/method_update_autorest.go | 1 + .../monitorsresource/method_monitorsget_autorest.go | 1 + .../monitorsresource/method_monitorsupdate_autorest.go | 1 + .../rules/method_tagrulescreateorupdate_autorest.go | 1 + .../elastic/2020-07-01/rules/method_tagrulesget_autorest.go | 1 + ...ethod_eventhubscreateorupdateauthorizationrule_autorest.go | 1 + .../method_eventhubslistkeys_autorest.go | 1 + .../method_eventhubsregeneratekeys_autorest.go | 1 + ...thod_namespacescreateorupdateauthorizationrule_autorest.go | 1 + .../method_namespacesdeleteauthorizationrule_autorest.go | 1 + .../method_namespacesgetauthorizationrule_autorest.go | 1 + .../method_namespaceslistkeys_autorest.go | 1 + .../method_namespacesregeneratekeys_autorest.go | 1 + ...d_disasterrecoveryconfigschecknameavailability_autorest.go | 1 + .../consumergroups/method_createorupdate_autorest.go | 1 + .../2021-11-01/consumergroups/method_delete_autorest.go | 1 + .../eventhub/2021-11-01/consumergroups/method_get_autorest.go | 1 + .../disasterrecoveryconfigs/method_breakpairing_autorest.go | 1 + .../disasterrecoveryconfigs/method_createorupdate_autorest.go | 1 + .../disasterrecoveryconfigs/method_delete_autorest.go | 1 + .../disasterrecoveryconfigs/method_failover_autorest.go | 1 + .../2021-11-01/disasterrecoveryconfigs/method_get_autorest.go | 1 + .../2021-11-01/eventhubs/method_createorupdate_autorest.go | 1 + .../eventhub/2021-11-01/eventhubs/method_delete_autorest.go | 1 + .../eventhubs/method_deleteauthorizationrule_autorest.go | 1 + .../eventhub/2021-11-01/eventhubs/method_get_autorest.go | 1 + .../eventhubs/method_getauthorizationrule_autorest.go | 1 + .../eventhubsclusters/method_clustersget_autorest.go | 1 + .../method_namespacescreateorupdatenetworkruleset_autorest.go | 1 + .../method_namespacesgetnetworkruleset_autorest.go | 1 + .../method_namespaceslistnetworkruleset_autorest.go | 1 + .../2022-01-01-preview/namespaces/method_get_autorest.go | 1 + .../2022-01-01-preview/namespaces/method_update_autorest.go | 1 + .../fluidrelayservers/method_createorupdate_autorest.go | 1 + .../2022-05-26/fluidrelayservers/method_delete_autorest.go | 1 + .../2022-05-26/fluidrelayservers/method_get_autorest.go | 1 + .../2022-05-26/fluidrelayservers/method_getkeys_autorest.go | 1 + .../2022-05-26/fluidrelayservers/method_listkeys_autorest.go | 1 + .../fluidrelayservers/method_regeneratekey_autorest.go | 1 + .../2022-05-26/fluidrelayservers/method_update_autorest.go | 1 + .../dedicatedhsms/method_dedicatedhsmget_autorest.go | 1 + .../2021-04-01/datacollectionrules/method_create_autorest.go | 1 + .../2021-04-01/datacollectionrules/method_delete_autorest.go | 1 + .../2021-04-01/datacollectionrules/method_get_autorest.go | 1 + .../2021-04-01/datacollectionrules/method_update_autorest.go | 1 + .../apps/method_checknameavailability_autorest.go | 1 + .../apps/method_checksubdomainavailability_autorest.go | 1 + .../iotcentral/2021-11-01-preview/apps/method_get_autorest.go | 1 + .../loadtests/method_createorupdate_autorest.go | 1 + .../2021-12-01-preview/loadtests/method_get_autorest.go | 1 + .../2021-12-01-preview/loadtests/method_update_autorest.go | 1 + .../method_systemassignedidentitiesgetbyscope_autorest.go | 1 + .../method_userassignedidentitiescreateorupdate_autorest.go | 1 + .../method_userassignedidentitiesdelete_autorest.go | 1 + .../method_userassignedidentitiesget_autorest.go | 1 + .../method_userassignedidentitiesupdate_autorest.go | 1 + .../2019-06-01/registrationassignments/method_get_autorest.go | 1 + .../registrationdefinitions/method_delete_autorest.go | 1 + .../2019-06-01/registrationdefinitions/method_get_autorest.go | 1 + .../2021-02-01/accounts/method_createorupdate_autorest.go | 1 + .../maps/2021-02-01/accounts/method_delete_autorest.go | 1 + .../maps/2021-02-01/accounts/method_get_autorest.go | 1 + .../maps/2021-02-01/accounts/method_listkeys_autorest.go | 1 + .../2021-02-01/accounts/method_regeneratekeys_autorest.go | 1 + .../maps/2021-02-01/accounts/method_update_autorest.go | 1 + .../2021-02-01/creators/method_createorupdate_autorest.go | 1 + .../maps/2021-02-01/creators/method_delete_autorest.go | 1 + .../maps/2021-02-01/creators/method_get_autorest.go | 1 + .../maps/2021-02-01/creators/method_update_autorest.go | 1 + .../resource/method_remoterenderingaccountscreate_autorest.go | 1 + .../resource/method_remoterenderingaccountsdelete_autorest.go | 1 + .../resource/method_remoterenderingaccountsget_autorest.go | 1 + .../resource/method_remoterenderingaccountsupdate_autorest.go | 1 + .../resource/method_spatialanchorsaccountscreate_autorest.go | 1 + .../resource/method_spatialanchorsaccountsdelete_autorest.go | 1 + .../resource/method_spatialanchorsaccountsget_autorest.go | 1 + .../resource/method_spatialanchorsaccountsupdate_autorest.go | 1 + .../2021-10-01/capacitypools/method_poolsget_autorest.go | 1 + .../2021-10-01/netappaccounts/method_accountsget_autorest.go | 1 + .../snapshotpolicy/method_snapshotpoliciescreate_autorest.go | 1 + .../snapshotpolicy/method_snapshotpoliciesget_autorest.go | 1 + .../snapshotpolicy/method_snapshotpolicieslist_autorest.go | 1 + .../netapp/2021-10-01/snapshots/method_get_autorest.go | 1 + .../netapp/2021-10-01/snapshots/method_list_autorest.go | 1 + .../netapp/2021-10-01/volumes/method_get_autorest.go | 1 + .../method_volumesreplicationstatus_autorest.go | 1 + .../namespaces/method_checkavailability_autorest.go | 1 + .../2017-04-01/namespaces/method_createorupdate_autorest.go | 1 + .../method_createorupdateauthorizationrule_autorest.go | 1 + .../namespaces/method_deleteauthorizationrule_autorest.go | 1 + .../2017-04-01/namespaces/method_get_autorest.go | 1 + .../namespaces/method_getauthorizationrule_autorest.go | 1 + .../2017-04-01/namespaces/method_listkeys_autorest.go | 1 + .../2017-04-01/namespaces/method_patch_autorest.go | 1 + .../2017-04-01/namespaces/method_regeneratekeys_autorest.go | 1 + .../method_checknotificationhubavailability_autorest.go | 1 + .../notificationhubs/method_createorupdate_autorest.go | 1 + .../method_createorupdateauthorizationrule_autorest.go | 1 + .../2017-04-01/notificationhubs/method_debugsend_autorest.go | 1 + .../2017-04-01/notificationhubs/method_delete_autorest.go | 1 + .../method_deleteauthorizationrule_autorest.go | 1 + .../2017-04-01/notificationhubs/method_get_autorest.go | 1 + .../notificationhubs/method_getauthorizationrule_autorest.go | 1 + .../notificationhubs/method_getpnscredentials_autorest.go | 1 + .../2017-04-01/notificationhubs/method_listkeys_autorest.go | 1 + .../2017-04-01/notificationhubs/method_patch_autorest.go | 1 + .../notificationhubs/method_regeneratekeys_autorest.go | 1 + .../operationalinsights/method_queriesdelete_autorest.go | 1 + .../operationalinsights/method_queriesget_autorest.go | 1 + .../operationalinsights/method_queriesput_autorest.go | 1 + .../operationalinsights/method_queriesupdate_autorest.go | 1 + .../method_querypackscreateorupdate_autorest.go | 1 + .../operationalinsights/method_querypacksdelete_autorest.go | 1 + .../operationalinsights/method_querypacksget_autorest.go | 1 + .../method_querypacksupdatetags_autorest.go | 1 + .../method_remediationscancelatmanagementgroup_autorest.go | 1 + .../method_remediationscancelatresource_autorest.go | 1 + .../method_remediationscancelatresourcegroup_autorest.go | 1 + .../method_remediationscancelatsubscription_autorest.go | 1 + ...od_remediationscreateorupdateatmanagementgroup_autorest.go | 1 + .../method_remediationscreateorupdateatresource_autorest.go | 1 + ...thod_remediationscreateorupdateatresourcegroup_autorest.go | 1 + ...ethod_remediationscreateorupdateatsubscription_autorest.go | 1 + .../method_remediationsdeleteatmanagementgroup_autorest.go | 1 + .../method_remediationsdeleteatresource_autorest.go | 1 + .../method_remediationsdeleteatresourcegroup_autorest.go | 1 + .../method_remediationsdeleteatsubscription_autorest.go | 1 + .../method_remediationsgetatmanagementgroup_autorest.go | 1 + .../method_remediationsgetatresource_autorest.go | 1 + .../method_remediationsgetatresourcegroup_autorest.go | 1 + .../method_remediationsgetatsubscription_autorest.go | 1 + .../dashboard/method_createorupdate_autorest.go | 1 + .../2019-01-01-preview/dashboard/method_delete_autorest.go | 1 + .../2019-01-01-preview/dashboard/method_get_autorest.go | 1 + .../2019-01-01-preview/dashboard/method_update_autorest.go | 1 + .../method_tenantconfigurationscreate_autorest.go | 1 + .../method_tenantconfigurationsdelete_autorest.go | 1 + .../method_tenantconfigurationsget_autorest.go | 1 + .../method_tenantconfigurationslist_autorest.go | 1 + .../2017-12-01/configurations/method_get_autorest.go | 1 + .../2017-12-01/configurations/method_listbyserver_autorest.go | 1 + .../postgresql/2017-12-01/databases/method_get_autorest.go | 1 + .../2017-12-01/databases/method_listbyserver_autorest.go | 1 + .../2017-12-01/firewallrules/method_get_autorest.go | 1 + .../2017-12-01/firewallrules/method_listbyserver_autorest.go | 1 + .../2017-12-01/replicas/method_listbyserver_autorest.go | 1 + .../2017-12-01/serveradministrators/method_get_autorest.go | 1 + .../2017-12-01/serveradministrators/method_list_autorest.go | 1 + .../postgresql/2017-12-01/servers/method_get_autorest.go | 1 + .../postgresql/2017-12-01/servers/method_list_autorest.go | 1 + .../2017-12-01/servers/method_listbyresourcegroup_autorest.go | 1 + .../serversecurityalertpolicies/method_get_autorest.go | 1 + .../2017-12-01/virtualnetworkrules/method_get_autorest.go | 1 + .../postgresql/2020-01-01/serverkeys/method_get_autorest.go | 1 + .../2021-06-01/configurations/method_get_autorest.go | 1 + .../postgresql/2021-06-01/databases/method_get_autorest.go | 1 + .../2021-06-01/firewallrules/method_get_autorest.go | 1 + .../postgresql/2021-06-01/servers/method_get_autorest.go | 1 + .../capacities/method_checknameavailability_autorest.go | 1 + .../2021-01-01/capacities/method_getdetails_autorest.go | 1 + .../2021-01-01/capacities/method_list_autorest.go | 1 + .../capacities/method_listbyresourcegroup_autorest.go | 1 + .../capacities/method_listskusforcapacity_autorest.go | 1 + .../privatedns/2018-09-01/privatezones/method_get_autorest.go | 1 + .../2018-09-01/recordsets/method_createorupdate_autorest.go | 1 + .../2018-09-01/recordsets/method_delete_autorest.go | 1 + .../privatedns/2018-09-01/recordsets/method_get_autorest.go | 1 + .../2018-09-01/recordsets/method_update_autorest.go | 1 + .../2018-09-01/virtualnetworklinks/method_get_autorest.go | 1 + .../account/method_addrootcollectionadmin_autorest.go | 1 + .../purview/2021-07-01/account/method_get_autorest.go | 1 + .../purview/2021-07-01/account/method_listkeys_autorest.go | 1 + .../2022-01-01/databases/method_get_autorest.go | 1 + .../2022-01-01/databases/method_listkeys_autorest.go | 1 + .../redisenterprise/method_databasesget_autorest.go | 1 + .../redisenterprise/method_databaseslistkeys_autorest.go | 1 + .../2022-01-01/redisenterprise/method_get_autorest.go | 1 + .../hybridconnections/method_createorupdate_autorest.go | 1 + .../method_createorupdateauthorizationrule_autorest.go | 1 + .../2017-04-01/hybridconnections/method_delete_autorest.go | 1 + .../method_deleteauthorizationrule_autorest.go | 1 + .../relay/2017-04-01/hybridconnections/method_get_autorest.go | 1 + .../hybridconnections/method_getauthorizationrule_autorest.go | 1 + .../2017-04-01/hybridconnections/method_listkeys_autorest.go | 1 + .../hybridconnections/method_regeneratekeys_autorest.go | 1 + .../namespaces/method_checknameavailability_autorest.go | 1 + .../method_createorupdateauthorizationrule_autorest.go | 1 + .../namespaces/method_deleteauthorizationrule_autorest.go | 1 + .../relay/2017-04-01/namespaces/method_get_autorest.go | 1 + .../namespaces/method_getauthorizationrule_autorest.go | 1 + .../relay/2017-04-01/namespaces/method_listkeys_autorest.go | 1 + .../2017-04-01/namespaces/method_regeneratekeys_autorest.go | 1 + .../relay/2017-04-01/namespaces/method_update_autorest.go | 1 + .../search/2020-03-13/adminkeys/method_get_autorest.go | 1 + .../search/2020-03-13/adminkeys/method_regenerate_autorest.go | 1 + .../search/2020-03-13/querykeys/method_create_autorest.go | 1 + .../search/2020-03-13/querykeys/method_delete_autorest.go | 1 + .../services/method_checknameavailability_autorest.go | 1 + .../search/2020-03-13/services/method_delete_autorest.go | 1 + .../search/2020-03-13/services/method_get_autorest.go | 1 + .../search/2020-03-13/services/method_update_autorest.go | 1 + .../disasterrecoveryconfigs/method_breakpairing_autorest.go | 1 + .../method_checknameavailability_autorest.go | 1 + .../disasterrecoveryconfigs/method_createorupdate_autorest.go | 1 + .../disasterrecoveryconfigs/method_delete_autorest.go | 1 + .../disasterrecoveryconfigs/method_failover_autorest.go | 1 + .../disasterrecoveryconfigs/method_get_autorest.go | 1 + .../method_getauthorizationrule_autorest.go | 1 + .../disasterrecoveryconfigs/method_listkeys_autorest.go | 1 + .../namespaces/method_checknameavailability_autorest.go | 1 + .../method_createorupdatenetworkruleset_autorest.go | 1 + .../2021-06-01-preview/namespaces/method_get_autorest.go | 1 + .../namespaces/method_getnetworkruleset_autorest.go | 1 + .../2021-06-01-preview/namespaces/method_update_autorest.go | 1 + ...thod_namespacescreateorupdateauthorizationrule_autorest.go | 1 + .../method_namespacesdeleteauthorizationrule_autorest.go | 1 + .../method_namespacesgetauthorizationrule_autorest.go | 1 + .../method_namespaceslistkeys_autorest.go | 1 + .../method_namespacesregeneratekeys_autorest.go | 1 + .../queues/method_createorupdate_autorest.go | 1 + .../2021-06-01-preview/queues/method_delete_autorest.go | 1 + .../2021-06-01-preview/queues/method_get_autorest.go | 1 + .../method_queuescreateorupdateauthorizationrule_autorest.go | 1 + .../method_queuesdeleteauthorizationrule_autorest.go | 1 + .../method_queuesgetauthorizationrule_autorest.go | 1 + .../queuesauthorizationrule/method_queueslistkeys_autorest.go | 1 + .../method_queuesregeneratekeys_autorest.go | 1 + .../rules/method_createorupdate_autorest.go | 1 + .../2021-06-01-preview/rules/method_delete_autorest.go | 1 + .../subscriptions/method_createorupdate_autorest.go | 1 + .../subscriptions/method_delete_autorest.go | 1 + .../2021-06-01-preview/subscriptions/method_get_autorest.go | 1 + .../subscriptions/method_rulesget_autorest.go | 1 + .../topics/method_createorupdate_autorest.go | 1 + .../2021-06-01-preview/topics/method_delete_autorest.go | 1 + .../2021-06-01-preview/topics/method_get_autorest.go | 1 + .../method_topicscreateorupdateauthorizationrule_autorest.go | 1 + .../method_topicsdeleteauthorizationrule_autorest.go | 1 + .../method_topicsgetauthorizationrule_autorest.go | 1 + .../topicsauthorizationrule/method_topicslistkeys_autorest.go | 1 + .../method_topicsregeneratekeys_autorest.go | 1 + .../2021-05-01/managedcluster/method_get_autorest.go | 1 + .../2021-05-01/managedcluster/method_update_autorest.go | 1 + .../2021-05-01/nodetype/method_get_autorest.go | 1 + .../2021-05-01/nodetype/method_update_autorest.go | 1 + .../signalr/method_checknameavailability_autorest.go | 1 + .../signalr/method_customcertificatesdelete_autorest.go | 1 + .../signalr/method_customcertificatesget_autorest.go | 1 + .../2022-02-01/signalr/method_customdomainsget_autorest.go | 1 + .../signalr/2022-02-01/signalr/method_get_autorest.go | 1 + .../signalr/2022-02-01/signalr/method_listkeys_autorest.go | 1 + .../signalr/2022-02-01/signalr/method_listskus_autorest.go | 1 + .../signalr/method_privateendpointconnectionsget_autorest.go | 1 + .../method_privateendpointconnectionsupdate_autorest.go | 1 + .../signalr/method_sharedprivatelinkresourcesget_autorest.go | 1 + .../2022-02-01/sqlvirtualmachines/method_get_autorest.go | 1 + .../method_createorupdate_autorest.go | 1 + .../objectreplicationpolicies/method_delete_autorest.go | 1 + .../objectreplicationpolicies/method_get_autorest.go | 1 + .../objectreplicationpolicies/method_list_autorest.go | 1 + .../2018-08-01/endpoints/method_createorupdate_autorest.go | 1 + .../2018-08-01/endpoints/method_delete_autorest.go | 1 + .../2018-08-01/endpoints/method_get_autorest.go | 1 + .../2018-08-01/endpoints/method_update_autorest.go | 1 + .../geographichierarchies/method_getdefault_autorest.go | 1 + ...checktrafficmanagerrelativednsnameavailability_autorest.go | 1 + .../2018-08-01/profiles/method_createorupdate_autorest.go | 1 + .../2018-08-01/profiles/method_delete_autorest.go | 1 + .../trafficmanager/2018-08-01/profiles/method_get_autorest.go | 1 + .../profiles/method_listbyresourcegroup_autorest.go | 1 + .../2018-08-01/profiles/method_listbysubscription_autorest.go | 1 + .../2018-08-01/profiles/method_update_autorest.go | 1 + .../method_accesspoliciescreateorupdate_autorest.go | 1 + .../videoanalyzer/method_accesspoliciesdelete_autorest.go | 1 + .../videoanalyzer/method_accesspoliciesget_autorest.go | 1 + .../videoanalyzer/method_accesspoliciesupdate_autorest.go | 1 + .../method_edgemodulescreateorupdate_autorest.go | 1 + .../videoanalyzer/method_edgemodulesdelete_autorest.go | 1 + .../videoanalyzer/method_edgemodulesget_autorest.go | 1 + .../method_edgemoduleslistprovisioningtoken_autorest.go | 1 + .../method_locationschecknameavailability_autorest.go | 1 + .../method_videoanalyzerscreateorupdate_autorest.go | 1 + .../videoanalyzer/method_videoanalyzersdelete_autorest.go | 1 + .../videoanalyzer/method_videoanalyzersget_autorest.go | 1 + .../videoanalyzer/method_videoanalyzerslist_autorest.go | 1 + .../method_videoanalyzerslistbysubscription_autorest.go | 1 + .../method_videoanalyzerssyncstoragekeys_autorest.go | 1 + .../videoanalyzer/method_videoanalyzersupdate_autorest.go | 1 + .../videoanalyzer/method_videoscreateorupdate_autorest.go | 1 + .../videoanalyzer/method_videosdelete_autorest.go | 1 + .../videoanalyzer/method_videosget_autorest.go | 1 + .../videoanalyzer/method_videosliststreamingtoken_autorest.go | 1 + .../videoanalyzer/method_videosupdate_autorest.go | 1 + .../vmware/2020-03-20/authorizations/method_get_autorest.go | 1 + .../vmware/2020-03-20/clusters/method_get_autorest.go | 1 + .../vmware/2020-03-20/privateclouds/method_get_autorest.go | 1 + .../privateclouds/method_listadmincredentials_autorest.go | 1 + .../connections/method_confirmconsentcode_autorest.go | 1 + .../2016-06-01/connections/method_createorupdate_autorest.go | 1 + .../web/2016-06-01/connections/method_delete_autorest.go | 1 + .../web/2016-06-01/connections/method_get_autorest.go | 1 + .../web/2016-06-01/connections/method_list_autorest.go | 1 + .../connections/method_listconsentlinks_autorest.go | 1 + .../web/2016-06-01/connections/method_update_autorest.go | 1 + .../2016-06-01/managedapis/method_managedapisget_autorest.go | 1 + .../2016-06-01/managedapis/method_managedapislist_autorest.go | 1 + vendor/modules.txt | 2 +- 420 files changed, 421 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 1e43f3b443a4..d329bd769eb8 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/google/go-cmp v0.5.8 github.com/google/uuid v1.1.2 github.com/hashicorp/go-azure-helpers v0.37.0 - github.com/hashicorp/go-azure-sdk v0.20220725.1163004 + github.com/hashicorp/go-azure-sdk v0.20220805.1100614 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.6.0 diff --git a/go.sum b/go.sum index a5c62bc03583..81bfb6a5e8aa 100644 --- a/go.sum +++ b/go.sum @@ -216,8 +216,8 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg= github.com/hashicorp/go-azure-helpers v0.37.0 h1:6UOoQ9esE4MJ4wHJr21qU81IJQ9zsXQ9FbANYUbeE4U= github.com/hashicorp/go-azure-helpers v0.37.0/go.mod h1:gcutZ/Hf/O7YN9M3UIvyZ9l0Rxv7Yrc9x5sSfM9cuSw= -github.com/hashicorp/go-azure-sdk v0.20220725.1163004 h1:F6fxwMrEBiroVssWLY3/fIEJ4E6qJQfL1jvsnTYkHpU= -github.com/hashicorp/go-azure-sdk v0.20220725.1163004/go.mod h1:yjQPw8DCOtQR8E8+FNaTxF6yz+tyQGkDNiVAGCNoLOo= +github.com/hashicorp/go-azure-sdk v0.20220805.1100614 h1:5pR7Uo0iH3em5iEmbN+t9tlAtSmZspU+0kmBNeTIcw0= +github.com/hashicorp/go-azure-sdk v0.20220805.1100614/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-sdk/resource-manager/aad/2021-05-01/domainservices/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_get_autorest.go index 07f944bda93c..a4fd97543d40 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DomainServicesClient) responderForGet(resp *http.Response) (result GetOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_checknameavailability_autorest.go index e1fc8fc80e48..b890022e9acf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_checknameavailability_autorest.go @@ -66,5 +66,6 @@ func (c TenantsClient) responderForCheckNameAvailability(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_get_autorest.go index 1924d8d59fc8..467e36f742db 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_get_autorest.go @@ -63,5 +63,6 @@ func (c TenantsClient) responderForGet(resp *http.Response) (result GetOperation autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_update_autorest.go index f1f9f46d4616..24a8221326ea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_update_autorest.go @@ -64,5 +64,6 @@ func (c TenantsClient) responderForUpdate(resp *http.Response) (result UpdateOpe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_checknameavailability_autorest.go index b1cd1294032b..cd0707697270 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_checknameavailability_autorest.go @@ -65,5 +65,6 @@ func (c ServersClient) responderForCheckNameAvailability(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_dissociategateway_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_dissociategateway_autorest.go index 1b6803169f58..355568d52b63 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_dissociategateway_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_dissociategateway_autorest.go @@ -62,5 +62,6 @@ func (c ServersClient) responderForDissociateGateway(resp *http.Response) (resul azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_getdetails_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_getdetails_autorest.go index 843b017e664b..9c44269c3688 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_getdetails_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_getdetails_autorest.go @@ -63,5 +63,6 @@ func (c ServersClient) responderForGetDetails(resp *http.Response) (result GetDe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_list_autorest.go index 636146b90e2e..f09be9dd6668 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_list_autorest.go @@ -65,5 +65,6 @@ func (c ServersClient) responderForList(resp *http.Response) (result ListOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listbyresourcegroup_autorest.go index 61c7c3cb75e8..38696c300d58 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listbyresourcegroup_autorest.go @@ -65,5 +65,6 @@ func (c ServersClient) responderForListByResourceGroup(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listgatewaystatus_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listgatewaystatus_autorest.go index b27d722003a9..acfc2e1e13df 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listgatewaystatus_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listgatewaystatus_autorest.go @@ -64,5 +64,6 @@ func (c ServersClient) responderForListGatewayStatus(resp *http.Response) (resul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listskusforexisting_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listskusforexisting_autorest.go index 99b2114176d2..85712cdb98db 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listskusforexisting_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/method_listskusforexisting_autorest.go @@ -64,5 +64,6 @@ func (c ServersClient) responderForListSkusForExisting(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_get_autorest.go index 4428f3531bff..bb49c12ed249 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ConfigurationStoresClient) responderForGet(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_regeneratekey_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_regeneratekey_autorest.go index 2ec1bcb15921..c682c6d4d2f7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_regeneratekey_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_regeneratekey_autorest.go @@ -65,5 +65,6 @@ func (c ConfigurationStoresClient) responderForRegenerateKey(resp *http.Response autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatescreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatescreateorupdate_autorest.go index 43c3d52ed6e4..ee52c9bcea10 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatescreateorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatescreateorupdate_autorest.go @@ -64,5 +64,6 @@ func (c ApplicationInsightsClient) responderForWorkbookTemplatesCreateOrUpdate(r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesdelete_autorest.go index a8d8153c8b18..d0b4d6a589f5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesdelete_autorest.go @@ -61,5 +61,6 @@ func (c ApplicationInsightsClient) responderForWorkbookTemplatesDelete(resp *htt azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesget_autorest.go index f13cb1e9fb2c..e671dbb3dd56 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesget_autorest.go @@ -63,5 +63,6 @@ func (c ApplicationInsightsClient) responderForWorkbookTemplatesGet(resp *http.R autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplateslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplateslistbyresourcegroup_autorest.go index 039b198a6bc4..734e825ab0c3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplateslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplateslistbyresourcegroup_autorest.go @@ -65,5 +65,6 @@ func (c ApplicationInsightsClient) responderForWorkbookTemplatesListByResourceGr autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesupdate_autorest.go index 3194faaf2ebd..7bae34234731 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/applicationinsights/method_workbooktemplatesupdate_autorest.go @@ -64,5 +64,6 @@ func (c ApplicationInsightsClient) responderForWorkbookTemplatesUpdate(resp *htt autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookscreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookscreateorupdate_autorest.go index 0a13c799c7cb..3016bce4f8a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookscreateorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookscreateorupdate_autorest.go @@ -93,5 +93,6 @@ func (c ApplicationInsightsClient) responderForWorkbooksCreateOrUpdate(resp *htt autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksdelete_autorest.go index e9855fde6091..2c21cb92d732 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksdelete_autorest.go @@ -61,5 +61,6 @@ func (c ApplicationInsightsClient) responderForWorkbooksDelete(resp *http.Respon azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksget_autorest.go index b080ef3eac14..379679b68e15 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksget_autorest.go @@ -92,5 +92,6 @@ func (c ApplicationInsightsClient) responderForWorkbooksGet(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksrevisionget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksrevisionget_autorest.go index 494e17ac3f85..05936ef8281f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksrevisionget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksrevisionget_autorest.go @@ -63,5 +63,6 @@ func (c ApplicationInsightsClient) responderForWorkbooksRevisionGet(resp *http.R autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksupdate_autorest.go index 6d55250b7561..74b2557509ac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksupdate_autorest.go @@ -93,5 +93,6 @@ func (c ApplicationInsightsClient) responderForWorkbooksUpdate(resp *http.Respon autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_create_autorest.go index e4556f3c5edd..33e7292f4a48 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_create_autorest.go @@ -64,5 +64,6 @@ func (c AttestationProvidersClient) responderForCreate(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_delete_autorest.go index 88a18324c475..03c6eee1f34d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c AttestationProvidersClient) responderForDelete(resp *http.Response) (res azure.WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_get_autorest.go index 3b29f8428774..59b510b6a71e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_get_autorest.go @@ -63,5 +63,6 @@ func (c AttestationProvidersClient) responderForGet(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_getdefaultbylocation_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_getdefaultbylocation_autorest.go index 81cb8b322846..bdd45d7ed409 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_getdefaultbylocation_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_getdefaultbylocation_autorest.go @@ -64,5 +64,6 @@ func (c AttestationProvidersClient) responderForGetDefaultByLocation(resp *http. autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_list_autorest.go index d00a0cdb2a8c..1b66fd780242 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_list_autorest.go @@ -65,5 +65,6 @@ func (c AttestationProvidersClient) responderForList(resp *http.Response) (resul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_listbyresourcegroup_autorest.go index 21203575a8c9..971ee430028f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_listbyresourcegroup_autorest.go @@ -65,5 +65,6 @@ func (c AttestationProvidersClient) responderForListByResourceGroup(resp *http.R autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_listdefault_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_listdefault_autorest.go index 58e5c7affb12..3443af76b684 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_listdefault_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_listdefault_autorest.go @@ -65,5 +65,6 @@ func (c AttestationProvidersClient) responderForListDefault(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_update_autorest.go index bcb8ca5ba62d..a4610388e866 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/method_update_autorest.go @@ -64,5 +64,6 @@ func (c AttestationProvidersClient) responderForUpdate(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_createorupdate_autorest.go index cf864b945680..9ca9eedcf4e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c AutomationAccountClient) responderForCreateOrUpdate(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_delete_autorest.go index fed7d9f6b1ef..04aa852b82e5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c AutomationAccountClient) responderForDelete(resp *http.Response) (result azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_get_autorest.go index a1b1a5b9a9c9..4c582e8f9f16 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_get_autorest.go @@ -63,5 +63,6 @@ func (c AutomationAccountClient) responderForGet(resp *http.Response) (result Ge autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_update_autorest.go index 5508080ab675..166c133ee26e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_update_autorest.go @@ -64,5 +64,6 @@ func (c AutomationAccountClient) responderForUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_create_autorest.go index eeefcd87e909..ed5732c9a938 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_create_autorest.go @@ -64,5 +64,6 @@ func (c ClustersClient) responderForCreate(resp *http.Response) (result CreateOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_delete_autorest.go index 4532f7cbcef6..3185fed14cae 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c ClustersClient) responderForDelete(resp *http.Response) (result DeleteOp azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_get_autorest.go index 3dd93cd29512..2957d3dd8de8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ClustersClient) responderForGet(resp *http.Response) (result GetOperatio autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_update_autorest.go index 3a762a3bb58c..2180bee75327 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_update_autorest.go @@ -64,5 +64,6 @@ func (c ClustersClient) responderForUpdate(resp *http.Response) (result UpdateOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsget_autorest.go index af3c1c2ec714..9d1e6ed94782 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsget_autorest.go @@ -63,5 +63,6 @@ func (c CognitiveServicesAccountsClient) responderForAccountsGet(resp *http.Resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistkeys_autorest.go index b4eb611d121b..bc1c255e8e83 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistkeys_autorest.go @@ -64,5 +64,6 @@ func (c CognitiveServicesAccountsClient) responderForAccountsListKeys(resp *http autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistskus_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistskus_autorest.go index cac9375d4249..ed6266c6de2c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistskus_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistskus_autorest.go @@ -64,5 +64,6 @@ func (c CognitiveServicesAccountsClient) responderForAccountsListSkus(resp *http autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistusages_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistusages_autorest.go index 33fff55f311b..8fc725c1219a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistusages_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistusages_autorest.go @@ -93,5 +93,6 @@ func (c CognitiveServicesAccountsClient) responderForAccountsListUsages(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsregeneratekey_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsregeneratekey_autorest.go index 30310e09741b..f09b9639a2dd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsregeneratekey_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountsregeneratekey_autorest.go @@ -65,5 +65,6 @@ func (c CognitiveServicesAccountsClient) responderForAccountsRegenerateKey(resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_checkdomainavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_checkdomainavailability_autorest.go index 78bb47fcb532..62bb22c40579 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_checkdomainavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_checkdomainavailability_autorest.go @@ -66,5 +66,6 @@ func (c CognitiveServicesAccountsClient) responderForCheckDomainAvailability(res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_checkskuavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_checkskuavailability_autorest.go index 11d56269c225..4d543ce3b487 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_checkskuavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_checkskuavailability_autorest.go @@ -65,5 +65,6 @@ func (c CognitiveServicesAccountsClient) responderForCheckSkuAvailability(resp * autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountsget_autorest.go index 9e5dc3a089a2..b09beea08e11 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountsget_autorest.go @@ -63,5 +63,6 @@ func (c CognitiveServicesAccountsClient) responderForDeletedAccountsGet(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_checknameavailability_autorest.go index 2bd430b757bc..0e2d20568f9b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_checknameavailability_autorest.go @@ -66,5 +66,6 @@ func (c CommunicationServiceClient) responderForCheckNameAvailability(resp *http autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_get_autorest.go index e33e138d9240..8e33bb1637e1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_get_autorest.go @@ -63,5 +63,6 @@ func (c CommunicationServiceClient) responderForGet(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_linknotificationhub_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_linknotificationhub_autorest.go index 4fe29a7b2850..858ce51c21cf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_linknotificationhub_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_linknotificationhub_autorest.go @@ -65,5 +65,6 @@ func (c CommunicationServiceClient) responderForLinkNotificationHub(resp *http.R autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listkeys_autorest.go index 41861380fd21..a98affc6dcf8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c CommunicationServiceClient) responderForListKeys(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_regeneratekey_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_regeneratekey_autorest.go index 3e7b12ccb08f..549c2c244f70 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_regeneratekey_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_regeneratekey_autorest.go @@ -65,5 +65,6 @@ func (c CommunicationServiceClient) responderForRegenerateKey(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_update_autorest.go index d99fd17c1e4b..a0070fba097a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_update_autorest.go @@ -64,5 +64,6 @@ func (c CommunicationServiceClient) responderForUpdate(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_createorupdate_autorest.go index 270e2c8fa541..8f4b17af5a8a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c AvailabilitySetsClient) responderForCreateOrUpdate(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_delete_autorest.go index df626fae16e0..ef139804bb6c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c AvailabilitySetsClient) responderForDelete(resp *http.Response) (result azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_get_autorest.go index fc6367e469de..b4b11147cf87 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_get_autorest.go @@ -63,5 +63,6 @@ func (c AvailabilitySetsClient) responderForGet(resp *http.Response) (result Get autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_listavailablesizes_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_listavailablesizes_autorest.go index 659fbfd5489d..ee1cc65a8ff3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_listavailablesizes_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_listavailablesizes_autorest.go @@ -64,5 +64,6 @@ func (c AvailabilitySetsClient) responderForListAvailableSizes(resp *http.Respon autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_update_autorest.go index 6015ccee987d..6adfc2a2e6e8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_update_autorest.go @@ -64,5 +64,6 @@ func (c AvailabilitySetsClient) responderForUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_createorupdate_autorest.go index 8e40e50c1174..7e5b7fb65fca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c ProximityPlacementGroupsClient) responderForCreateOrUpdate(resp *http.Re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_delete_autorest.go index 5e5e4997af17..1d0dc9e80055 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c ProximityPlacementGroupsClient) responderForDelete(resp *http.Response) azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_get_autorest.go index 4cad7a279e79..6e2f9a6e707a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_get_autorest.go @@ -92,5 +92,6 @@ func (c ProximityPlacementGroupsClient) responderForGet(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_update_autorest.go index 9dcaa7697adb..d1317543f1d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_update_autorest.go @@ -64,5 +64,6 @@ func (c ProximityPlacementGroupsClient) responderForUpdate(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_create_autorest.go index f345d2d5248b..c5ce74865288 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_create_autorest.go @@ -64,5 +64,6 @@ func (c SshPublicKeysClient) responderForCreate(resp *http.Response) (result Cre autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_delete_autorest.go index 391c3818fb84..a0fb461d5074 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c SshPublicKeysClient) responderForDelete(resp *http.Response) (result Del azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_generatekeypair_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_generatekeypair_autorest.go index 6a3f9a5c2379..0200daedec11 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_generatekeypair_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_generatekeypair_autorest.go @@ -64,5 +64,6 @@ func (c SshPublicKeysClient) responderForGenerateKeyPair(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_get_autorest.go index 13aa31199484..5c4e544265a0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_get_autorest.go @@ -63,5 +63,6 @@ func (c SshPublicKeysClient) responderForGet(resp *http.Response) (result GetOpe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_update_autorest.go index b17c0d315f41..7a0b0ca45f53 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_update_autorest.go @@ -64,5 +64,6 @@ func (c SshPublicKeysClient) responderForUpdate(resp *http.Response) (result Upd autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerget_autorest.go index 6100688ab87f..fc382a8e506f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerget_autorest.go @@ -63,5 +63,6 @@ func (c ConfidentialLedgerClient) responderForLedgerGet(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsget_autorest.go index 1a0d38f45fd2..af6ae2e37cd6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsget_autorest.go @@ -63,5 +63,6 @@ func (c ContainerInstanceClient) responderForContainerGroupsGet(resp *http.Respo autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsstop_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsstop_autorest.go index 0feaf54c046f..4fab0380b9b8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsstop_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsstop_autorest.go @@ -62,5 +62,6 @@ func (c ContainerInstanceClient) responderForContainerGroupsStop(resp *http.Resp azure.WithErrorUnlessStatusCode(http.StatusNoContent), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsupdate_autorest.go index add0927f328c..9981b0f6707f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupsupdate_autorest.go @@ -64,5 +64,6 @@ func (c ContainerInstanceClient) responderForContainerGroupsUpdate(resp *http.Re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containersattach_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containersattach_autorest.go index 53f6a1f5b230..aff05fac3274 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containersattach_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containersattach_autorest.go @@ -64,5 +64,6 @@ func (c ContainerInstanceClient) responderForContainersAttach(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containersexecutecommand_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containersexecutecommand_autorest.go index d0a2325d912b..1001f4c29b11 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containersexecutecommand_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containersexecutecommand_autorest.go @@ -65,5 +65,6 @@ func (c ContainerInstanceClient) responderForContainersExecuteCommand(resp *http autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containerslistlogs_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containerslistlogs_autorest.go index 6b6c261b1e61..ed9b55e5185d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containerslistlogs_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containerslistlogs_autorest.go @@ -98,5 +98,6 @@ func (c ContainerInstanceClient) responderForContainersListLogs(resp *http.Respo autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistusage_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistusage_autorest.go index f3bf85b1c83a..461b96fac0cf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistusage_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistusage_autorest.go @@ -64,5 +64,6 @@ func (c ContainerInstanceClient) responderForLocationListUsage(resp *http.Respon autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_get_autorest.go index 61796323becc..c16924832e34 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_get_autorest.go @@ -63,5 +63,6 @@ func (c WorkspacesClient) responderForGet(resp *http.Response) (result GetOperat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_delete_autorest.go index 4757f6126c31..b83d7994cbc8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c ResourceGuardsClient) responderForDelete(resp *http.Response) (result De azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_get_autorest.go index cd76e32ab6d7..c4e71b39e34c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ResourceGuardsClient) responderForGet(resp *http.Response) (result GetOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject_autorest.go index 330f97e1b0d1..56fc2e5311ca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject_autorest.go @@ -63,5 +63,6 @@ func (c ResourceGuardsClient) responderForGetDefaultBackupSecurityPINRequestsObj autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject_autorest.go index 188141dafa00..5911c0349eb3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject_autorest.go @@ -63,5 +63,6 @@ func (c ResourceGuardsClient) responderForGetDefaultDeleteProtectedItemRequestsO autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject_autorest.go index c34f08096316..635d82515a76 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject_autorest.go @@ -63,5 +63,6 @@ func (c ResourceGuardsClient) responderForGetDefaultDeleteResourceGuardProxyRequ autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject_autorest.go index 9e743361ee13..9296842dd7a8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject_autorest.go @@ -63,5 +63,6 @@ func (c ResourceGuardsClient) responderForGetDefaultDisableSoftDeleteRequestsObj autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject_autorest.go index 5df2aefe86eb..34dfce5b02fa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject_autorest.go @@ -63,5 +63,6 @@ func (c ResourceGuardsClient) responderForGetDefaultUpdateProtectedItemRequestsO autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject_autorest.go index 84a68c35e1c5..b771a36f94b6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject_autorest.go @@ -63,5 +63,6 @@ func (c ResourceGuardsClient) responderForGetDefaultUpdateProtectionPolicyReques autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_patch_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_patch_autorest.go index 9556cefb73d2..e1bdf8d1562a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_patch_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_patch_autorest.go @@ -64,5 +64,6 @@ func (c ResourceGuardsClient) responderForPatch(resp *http.Response) (result Pat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_put_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_put_autorest.go index f56013be352b..c3600ac7c297 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_put_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_put_autorest.go @@ -64,5 +64,6 @@ func (c ResourceGuardsClient) responderForPut(resp *http.Response) (result PutOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_createorupdate_autorest.go index 667a27450ccf..92366428509b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c ApplicationClient) responderForCreateOrUpdate(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_delete_autorest.go index 0bb3f01ae02f..3adfaf68b49b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c ApplicationClient) responderForDelete(resp *http.Response) (result Delet azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_get_autorest.go index 7c04468f2c8e..694243403a5e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ApplicationClient) responderForGet(resp *http.Response) (result GetOpera autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_update_autorest.go index ac806964944e..a367a3c9eeb3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_update_autorest.go @@ -64,5 +64,6 @@ func (c ApplicationClient) responderForUpdate(resp *http.Response) (result Updat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_createorupdate_autorest.go index 268106c8d09f..95e170bd9599 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c ApplicationGroupClient) responderForCreateOrUpdate(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_delete_autorest.go index 981983b00a9c..6b701f2a3027 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c ApplicationGroupClient) responderForDelete(resp *http.Response) (result azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_get_autorest.go index 77376fc5b5cd..a5e06d04f7cb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ApplicationGroupClient) responderForGet(resp *http.Response) (result Get autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_update_autorest.go index b8b18e55d466..266ebaf6c022 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_update_autorest.go @@ -64,5 +64,6 @@ func (c ApplicationGroupClient) responderForUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_get_autorest.go index 23658f0ebe26..cba561e10adc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DesktopClient) responderForGet(resp *http.Response) (result GetOperation autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_update_autorest.go index 60d6fece536f..df42b7c5dc1b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_update_autorest.go @@ -64,5 +64,6 @@ func (c DesktopClient) responderForUpdate(resp *http.Response) (result UpdateOpe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_createorupdate_autorest.go index 6ba8c24c2584..2c5d6e766a80 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c HostPoolClient) responderForCreateOrUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_delete_autorest.go index 4483478b8e49..0a75bcb97284 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_delete_autorest.go @@ -90,5 +90,6 @@ func (c HostPoolClient) responderForDelete(resp *http.Response) (result DeleteOp azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_get_autorest.go index c442f70a2865..f00e17180f87 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_get_autorest.go @@ -63,5 +63,6 @@ func (c HostPoolClient) responderForGet(resp *http.Response) (result GetOperatio autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_retrieveregistrationtoken_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_retrieveregistrationtoken_autorest.go index 9e3317f18079..cc4a3c34416f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_retrieveregistrationtoken_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_retrieveregistrationtoken_autorest.go @@ -64,5 +64,6 @@ func (c HostPoolClient) responderForRetrieveRegistrationToken(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_update_autorest.go index 9de04a30cfcb..1bc743f8b680 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_update_autorest.go @@ -64,5 +64,6 @@ func (c HostPoolClient) responderForUpdate(resp *http.Response) (result UpdateOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_create_autorest.go index 8841c6898fd2..e952f1e05373 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_create_autorest.go @@ -64,5 +64,6 @@ func (c ScalingPlanClient) responderForCreate(resp *http.Response) (result Creat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_delete_autorest.go index 75755b5784c9..a9485dc482d1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c ScalingPlanClient) responderForDelete(resp *http.Response) (result Delet azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_get_autorest.go index 5550e0d3eb9d..133b9e4d7cb2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ScalingPlanClient) responderForGet(resp *http.Response) (result GetOpera autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_update_autorest.go index 1a91bb116941..601936a257c3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_update_autorest.go @@ -64,5 +64,6 @@ func (c ScalingPlanClient) responderForUpdate(resp *http.Response) (result Updat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_delete_autorest.go index 3eb9fdf7cf7b..3110efc67eec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_delete_autorest.go @@ -90,5 +90,6 @@ func (c SessionHostClient) responderForDelete(resp *http.Response) (result Delet azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_get_autorest.go index e28f5b328c62..309db6d73860 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_get_autorest.go @@ -63,5 +63,6 @@ func (c SessionHostClient) responderForGet(resp *http.Response) (result GetOpera autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_update_autorest.go index 8036bc4eb720..0d96c63c78ec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_update_autorest.go @@ -93,5 +93,6 @@ func (c SessionHostClient) responderForUpdate(resp *http.Response) (result Updat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_createorupdate_autorest.go index 2dfa75cfe315..9abe495b567d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c WorkspaceClient) responderForCreateOrUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_delete_autorest.go index dceeb977a12e..1e4d66d5ba28 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c WorkspaceClient) responderForDelete(resp *http.Response) (result DeleteO azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_get_autorest.go index 93915990f1ce..dd725ad1053d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_get_autorest.go @@ -63,5 +63,6 @@ func (c WorkspaceClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_update_autorest.go index d822ab589a65..7734cbf336c7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_update_autorest.go @@ -64,5 +64,6 @@ func (c WorkspaceClient) responderForUpdate(resp *http.Response) (result UpdateO autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsget_autorest.go index 54ea6ceba8c4..e24124d2d38b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsget_autorest.go @@ -63,5 +63,6 @@ func (c MonitorsResourceClient) responderForMonitorsGet(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsupdate_autorest.go index 8d2eefcd8d1f..3c8ed0ecc666 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorsupdate_autorest.go @@ -64,5 +64,6 @@ func (c MonitorsResourceClient) responderForMonitorsUpdate(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulescreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulescreateorupdate_autorest.go index c77219fe5b7a..04fa47ada9d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulescreateorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulescreateorupdate_autorest.go @@ -64,5 +64,6 @@ func (c RulesClient) responderForTagRulesCreateOrUpdate(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulesget_autorest.go index e5a0ea2c2e53..379e59b6c8e0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagrulesget_autorest.go @@ -63,5 +63,6 @@ func (c RulesClient) responderForTagRulesGet(resp *http.Response) (result TagRul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule_autorest.go index a8bc751acbc4..246ae80cbbf5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule_autorest.go @@ -64,5 +64,6 @@ func (c AuthorizationRulesEventHubsClient) responderForEventHubsCreateOrUpdateAu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistkeys_autorest.go index 9ac1a8ccea12..be331950d87e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistkeys_autorest.go @@ -64,5 +64,6 @@ func (c AuthorizationRulesEventHubsClient) responderForEventHubsListKeys(resp *h autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubsregeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubsregeneratekeys_autorest.go index fc21519e08cf..1e7b6a258ff9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubsregeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubsregeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c AuthorizationRulesEventHubsClient) responderForEventHubsRegenerateKeys(r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule_autorest.go index 7ddb6be8b0ef..26d47b98379e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule_autorest.go @@ -64,5 +64,6 @@ func (c AuthorizationRulesNamespacesClient) responderForNamespacesCreateOrUpdate autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesdeleteauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesdeleteauthorizationrule_autorest.go index ae0db0df190e..cedc6d8a514a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesdeleteauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesdeleteauthorizationrule_autorest.go @@ -61,5 +61,6 @@ func (c AuthorizationRulesNamespacesClient) responderForNamespacesDeleteAuthoriz azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule_autorest.go index 185094cea903..7992eecc2d4a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c AuthorizationRulesNamespacesClient) responderForNamespacesGetAuthorizati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistkeys_autorest.go index 569c86d6a926..4fb0cdaad524 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistkeys_autorest.go @@ -64,5 +64,6 @@ func (c AuthorizationRulesNamespacesClient) responderForNamespacesListKeys(resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesregeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesregeneratekeys_autorest.go index b4a557f8847e..00818363d717 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesregeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesregeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c AuthorizationRulesNamespacesClient) responderForNamespacesRegenerateKeys autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability_autorest.go index ea4861192a29..7a81d6ab4fef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability_autorest.go @@ -65,5 +65,6 @@ func (c CheckNameAvailabilityDisasterRecoveryConfigsClient) responderForDisaster autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_createorupdate_autorest.go index 56a93b8d8ef9..43f39ac5dfc7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c ConsumerGroupsClient) responderForCreateOrUpdate(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_delete_autorest.go index 8bb302109088..9e2dc0768058 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c ConsumerGroupsClient) responderForDelete(resp *http.Response) (result De azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_get_autorest.go index 9188417af9f5..60079102863b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ConsumerGroupsClient) responderForGet(resp *http.Response) (result GetOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_breakpairing_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_breakpairing_autorest.go index 144131ab3e57..4a8d52a71e99 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_breakpairing_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_breakpairing_autorest.go @@ -62,5 +62,6 @@ func (c DisasterRecoveryConfigsClient) responderForBreakPairing(resp *http.Respo azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_createorupdate_autorest.go index f6ed48aef31d..3f67b7cfe66d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c DisasterRecoveryConfigsClient) responderForCreateOrUpdate(resp *http.Res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_delete_autorest.go index 47f0a32b14e6..7ad43948df66 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c DisasterRecoveryConfigsClient) responderForDelete(resp *http.Response) ( azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_failover_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_failover_autorest.go index 1189d6935549..16f4b4811966 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_failover_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_failover_autorest.go @@ -62,5 +62,6 @@ func (c DisasterRecoveryConfigsClient) responderForFailOver(resp *http.Response) azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_get_autorest.go index da5493fb0272..9bfdb91343b7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DisasterRecoveryConfigsClient) responderForGet(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_createorupdate_autorest.go index c0871695fa6d..716b36a61b98 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c EventHubsClient) responderForCreateOrUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_delete_autorest.go index d78ba256cbfd..8ec4dd26b2d7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c EventHubsClient) responderForDelete(resp *http.Response) (result DeleteO azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_deleteauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_deleteauthorizationrule_autorest.go index 0de9f9863ea5..624271e15edb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_deleteauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_deleteauthorizationrule_autorest.go @@ -61,5 +61,6 @@ func (c EventHubsClient) responderForDeleteAuthorizationRule(resp *http.Response azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_get_autorest.go index 9d3b066d946e..18d591d7daba 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_get_autorest.go @@ -63,5 +63,6 @@ func (c EventHubsClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_getauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_getauthorizationrule_autorest.go index ce69338e5fab..f2ef0a2b33b9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_getauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_getauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c EventHubsClient) responderForGetAuthorizationRule(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clustersget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clustersget_autorest.go index 6580dc962d4e..8d539077feb5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clustersget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clustersget_autorest.go @@ -63,5 +63,6 @@ func (c EventHubsClustersClient) responderForClustersGet(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacescreateorupdatenetworkruleset_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacescreateorupdatenetworkruleset_autorest.go index 91f087c1dd23..2a6189625b99 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacescreateorupdatenetworkruleset_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacescreateorupdatenetworkruleset_autorest.go @@ -65,5 +65,6 @@ func (c NetworkRuleSetsClient) responderForNamespacesCreateOrUpdateNetworkRuleSe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacesgetnetworkruleset_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacesgetnetworkruleset_autorest.go index 10614c1302f0..50378de27510 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacesgetnetworkruleset_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacesgetnetworkruleset_autorest.go @@ -64,5 +64,6 @@ func (c NetworkRuleSetsClient) responderForNamespacesGetNetworkRuleSet(resp *htt autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespaceslistnetworkruleset_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespaceslistnetworkruleset_autorest.go index 295f9ad18d5a..3e9b712797fc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespaceslistnetworkruleset_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespaceslistnetworkruleset_autorest.go @@ -64,5 +64,6 @@ func (c NetworkRuleSetsClient) responderForNamespacesListNetworkRuleSet(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get_autorest.go index b1c33b953b22..353d88983893 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get_autorest.go @@ -63,5 +63,6 @@ func (c NamespacesClient) responderForGet(resp *http.Response) (result GetOperat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update_autorest.go index c54d6ff8d8d0..2dce2d196385 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForUpdate(resp *http.Response) (result Update autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_createorupdate_autorest.go index 3e71fc66c650..5929e57d680d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c FluidRelayServersClient) responderForCreateOrUpdate(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_delete_autorest.go index bb7ba2ba3c82..ce5053850fff 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c FluidRelayServersClient) responderForDelete(resp *http.Response) (result azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_get_autorest.go index c58a5785cd9a..86ec21ed2036 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_get_autorest.go @@ -63,5 +63,6 @@ func (c FluidRelayServersClient) responderForGet(resp *http.Response) (result Ge autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_getkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_getkeys_autorest.go index 5f3be4b813ed..96567716e58d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_getkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_getkeys_autorest.go @@ -64,5 +64,6 @@ func (c FluidRelayServersClient) responderForGetKeys(resp *http.Response) (resul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listkeys_autorest.go index e50e87e63cb0..ebb54f6d9d1b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c FluidRelayServersClient) responderForListKeys(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_regeneratekey_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_regeneratekey_autorest.go index aca471923ef9..622895201596 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_regeneratekey_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_regeneratekey_autorest.go @@ -65,5 +65,6 @@ func (c FluidRelayServersClient) responderForRegenerateKey(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_update_autorest.go index 150d7a9ed77b..93c943d680ce 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_update_autorest.go @@ -64,5 +64,6 @@ func (c FluidRelayServersClient) responderForUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmget_autorest.go index 893f50dff68d..b0de63aecbc5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmget_autorest.go @@ -63,5 +63,6 @@ func (c DedicatedHsmsClient) responderForDedicatedHsmGet(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_create_autorest.go index 843c89177826..63968af2e0dd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_create_autorest.go @@ -64,5 +64,6 @@ func (c DataCollectionRulesClient) responderForCreate(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_delete_autorest.go index e49f17954f1e..27a0fb8d93be 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c DataCollectionRulesClient) responderForDelete(resp *http.Response) (resu azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_get_autorest.go index a9f76fa6cdea..503a4b08e513 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DataCollectionRulesClient) responderForGet(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_update_autorest.go index 15ad7ba9ae7c..1de36a708c56 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_update_autorest.go @@ -64,5 +64,6 @@ func (c DataCollectionRulesClient) responderForUpdate(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_checknameavailability_autorest.go index 0993650ddfb4..942b1b9c1c7e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_checknameavailability_autorest.go @@ -66,5 +66,6 @@ func (c AppsClient) responderForCheckNameAvailability(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_checksubdomainavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_checksubdomainavailability_autorest.go index 8ccf746a3df2..1cc289e0a179 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_checksubdomainavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_checksubdomainavailability_autorest.go @@ -66,5 +66,6 @@ func (c AppsClient) responderForCheckSubdomainAvailability(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_get_autorest.go index eefb470f8f50..06af1dedf386 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_get_autorest.go @@ -63,5 +63,6 @@ func (c AppsClient) responderForGet(resp *http.Response) (result GetOperationRes autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_createorupdate_autorest.go index 7af401a1fa67..2b90ec8d5409 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c LoadTestsClient) responderForCreateOrUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_get_autorest.go index a923da2d176c..ef7b59cff5b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_get_autorest.go @@ -63,5 +63,6 @@ func (c LoadTestsClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_update_autorest.go index f83bfe420a1c..ae7e5353e0c9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_update_autorest.go @@ -64,5 +64,6 @@ func (c LoadTestsClient) responderForUpdate(resp *http.Response) (result UpdateO autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_systemassignedidentitiesgetbyscope_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_systemassignedidentitiesgetbyscope_autorest.go index 24d9237ca74a..09adeb02db59 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_systemassignedidentitiesgetbyscope_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_systemassignedidentitiesgetbyscope_autorest.go @@ -65,5 +65,6 @@ func (c ManagedIdentityClient) responderForSystemAssignedIdentitiesGetByScope(re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiescreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiescreateorupdate_autorest.go index f17deae65f27..e1264d0e348e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiescreateorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiescreateorupdate_autorest.go @@ -65,5 +65,6 @@ func (c ManagedIdentityClient) responderForUserAssignedIdentitiesCreateOrUpdate( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesdelete_autorest.go index d1330f370efb..84388d89515e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesdelete_autorest.go @@ -62,5 +62,6 @@ func (c ManagedIdentityClient) responderForUserAssignedIdentitiesDelete(resp *ht azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesget_autorest.go index c814ce206a85..fcf3fc76805c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesget_autorest.go @@ -64,5 +64,6 @@ func (c ManagedIdentityClient) responderForUserAssignedIdentitiesGet(resp *http. autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesupdate_autorest.go index 050a7c52ebf2..7f95040fed5a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitiesupdate_autorest.go @@ -65,5 +65,6 @@ func (c ManagedIdentityClient) responderForUserAssignedIdentitiesUpdate(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/method_get_autorest.go index 6ddac3df29b3..9126a6d7b79f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/method_get_autorest.go @@ -92,5 +92,6 @@ func (c RegistrationAssignmentsClient) responderForGet(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_delete_autorest.go index ac829a6fd205..735b2d1f5e0f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c RegistrationDefinitionsClient) responderForDelete(resp *http.Response) ( azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_get_autorest.go index 16bd29a437f3..6e019481822d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_get_autorest.go @@ -63,5 +63,6 @@ func (c RegistrationDefinitionsClient) responderForGet(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_createorupdate_autorest.go index dc5b7f9fdddd..29b5f627c6d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c AccountsClient) responderForCreateOrUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_delete_autorest.go index e6570ddcd010..d80750a0a044 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c AccountsClient) responderForDelete(resp *http.Response) (result DeleteOp azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_get_autorest.go index 7ce4384d6624..decf0819a073 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_get_autorest.go @@ -63,5 +63,6 @@ func (c AccountsClient) responderForGet(resp *http.Response) (result GetOperatio autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listkeys_autorest.go index 8283cc918522..36f27b86058d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c AccountsClient) responderForListKeys(resp *http.Response) (result ListKe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_regeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_regeneratekeys_autorest.go index 276196bada89..1859d5b55302 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_regeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_regeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c AccountsClient) responderForRegenerateKeys(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_update_autorest.go index 252b8abce3b0..a8510b4f1f64 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_update_autorest.go @@ -64,5 +64,6 @@ func (c AccountsClient) responderForUpdate(resp *http.Response) (result UpdateOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_createorupdate_autorest.go index 4351dbfa6bb9..c4e29ce5106b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c CreatorsClient) responderForCreateOrUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_delete_autorest.go index 7ebf141c0529..a44b5b2571f7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c CreatorsClient) responderForDelete(resp *http.Response) (result DeleteOp azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_get_autorest.go index 76b9ff3583c1..29e90b6a6dea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_get_autorest.go @@ -63,5 +63,6 @@ func (c CreatorsClient) responderForGet(resp *http.Response) (result GetOperatio autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_update_autorest.go index 6d3d1656c472..0868df12dbd9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_update_autorest.go @@ -64,5 +64,6 @@ func (c CreatorsClient) responderForUpdate(resp *http.Response) (result UpdateOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountscreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountscreate_autorest.go index 0a2e0d34c480..b49f47a5a980 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountscreate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountscreate_autorest.go @@ -64,5 +64,6 @@ func (c ResourceClient) responderForRemoteRenderingAccountsCreate(resp *http.Res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsdelete_autorest.go index 998b429d3c6d..c9022372d9ed 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsdelete_autorest.go @@ -61,5 +61,6 @@ func (c ResourceClient) responderForRemoteRenderingAccountsDelete(resp *http.Res azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsget_autorest.go index 2bd598b81fc5..5ea338b0854e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsget_autorest.go @@ -63,5 +63,6 @@ func (c ResourceClient) responderForRemoteRenderingAccountsGet(resp *http.Respon autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsupdate_autorest.go index 13c6522cc629..447bdcc9595b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsupdate_autorest.go @@ -64,5 +64,6 @@ func (c ResourceClient) responderForRemoteRenderingAccountsUpdate(resp *http.Res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountscreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountscreate_autorest.go index aa3360d31bf5..4646838b2f6d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountscreate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountscreate_autorest.go @@ -64,5 +64,6 @@ func (c ResourceClient) responderForSpatialAnchorsAccountsCreate(resp *http.Resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsdelete_autorest.go index 32b1d936f898..8d4dedc290ea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsdelete_autorest.go @@ -61,5 +61,6 @@ func (c ResourceClient) responderForSpatialAnchorsAccountsDelete(resp *http.Resp azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsget_autorest.go index 8f64a8c70313..0ce928792c13 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsget_autorest.go @@ -63,5 +63,6 @@ func (c ResourceClient) responderForSpatialAnchorsAccountsGet(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsupdate_autorest.go index 4f6fdd6b6078..09834e8d7720 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsupdate_autorest.go @@ -64,5 +64,6 @@ func (c ResourceClient) responderForSpatialAnchorsAccountsUpdate(resp *http.Resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/capacitypools/method_poolsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/capacitypools/method_poolsget_autorest.go index d2725693da9d..e315bc1ebb1a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/capacitypools/method_poolsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/capacitypools/method_poolsget_autorest.go @@ -63,5 +63,6 @@ func (c CapacityPoolsClient) responderForPoolsGet(resp *http.Response) (result P autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountsget_autorest.go index 1c1edc04ccfb..e1bfd36dd261 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountsget_autorest.go @@ -63,5 +63,6 @@ func (c NetAppAccountsClient) responderForAccountsGet(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpoliciescreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpoliciescreate_autorest.go index 43d25be8b167..c6e331f03b2e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpoliciescreate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpoliciescreate_autorest.go @@ -64,5 +64,6 @@ func (c SnapshotPolicyClient) responderForSnapshotPoliciesCreate(resp *http.Resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpoliciesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpoliciesget_autorest.go index 26d3741d8b6c..909d4ee01f70 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpoliciesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpoliciesget_autorest.go @@ -63,5 +63,6 @@ func (c SnapshotPolicyClient) responderForSnapshotPoliciesGet(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpolicieslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpolicieslist_autorest.go index b9f36c35c96f..ea72ff942c5a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpolicieslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshotpolicy/method_snapshotpolicieslist_autorest.go @@ -64,5 +64,6 @@ func (c SnapshotPolicyClient) responderForSnapshotPoliciesList(resp *http.Respon autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshots/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshots/method_get_autorest.go index 4764bf6f0606..b328ad1cf52e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshots/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshots/method_get_autorest.go @@ -63,5 +63,6 @@ func (c SnapshotsClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshots/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshots/method_list_autorest.go index 5d2f714bdc1f..d56a945666be 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshots/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/snapshots/method_list_autorest.go @@ -64,5 +64,6 @@ func (c SnapshotsClient) responderForList(resp *http.Response) (result ListOpera autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumes/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumes/method_get_autorest.go index f35ab8d36ba5..af7454ba5c52 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumes/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumes/method_get_autorest.go @@ -63,5 +63,6 @@ func (c VolumesClient) responderForGet(resp *http.Response) (result GetOperation autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumesreplication/method_volumesreplicationstatus_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumesreplication/method_volumesreplicationstatus_autorest.go index 12b0382b0cd4..dfd5d975c240 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumesreplication/method_volumesreplicationstatus_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumesreplication/method_volumesreplicationstatus_autorest.go @@ -64,5 +64,6 @@ func (c VolumesReplicationClient) responderForVolumesReplicationStatus(resp *htt autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_checkavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_checkavailability_autorest.go index f318780ec349..d14b13e49928 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_checkavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_checkavailability_autorest.go @@ -66,5 +66,6 @@ func (c NamespacesClient) responderForCheckAvailability(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdate_autorest.go index 4ae9ffa90fba..77ac50b083ba 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForCreateOrUpdate(resp *http.Response) (resul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdateauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdateauthorizationrule_autorest.go index 1f4a1e2cf119..1cd5f256ef53 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdateauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdateauthorizationrule_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForCreateOrUpdateAuthorizationRule(resp *http autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_deleteauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_deleteauthorizationrule_autorest.go index 206d13b9e4fc..92336c4b4a07 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_deleteauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_deleteauthorizationrule_autorest.go @@ -61,5 +61,6 @@ func (c NamespacesClient) responderForDeleteAuthorizationRule(resp *http.Respons azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_get_autorest.go index 8de0e07dd4d8..298a50564f26 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_get_autorest.go @@ -63,5 +63,6 @@ func (c NamespacesClient) responderForGet(resp *http.Response) (result GetOperat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_getauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_getauthorizationrule_autorest.go index 2b3206bebf1f..5568712e397a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_getauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_getauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c NamespacesClient) responderForGetAuthorizationRule(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listkeys_autorest.go index 7a2440f31411..64703f279669 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForListKeys(resp *http.Response) (result List autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_patch_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_patch_autorest.go index db22025983eb..b7b3967b5f7c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_patch_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_patch_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForPatch(resp *http.Response) (result PatchOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_regeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_regeneratekeys_autorest.go index 14a9ce81ec7d..3670a9fba0d9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_regeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_regeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c NamespacesClient) responderForRegenerateKeys(resp *http.Response) (resul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_checknotificationhubavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_checknotificationhubavailability_autorest.go index dd80c2db1368..f90f4b218d2e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_checknotificationhubavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_checknotificationhubavailability_autorest.go @@ -65,5 +65,6 @@ func (c NotificationHubsClient) responderForCheckNotificationHubAvailability(res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdate_autorest.go index 0af622f11a09..03912aab3d9a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c NotificationHubsClient) responderForCreateOrUpdate(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdateauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdateauthorizationrule_autorest.go index 24d64283e5e8..52b6a19d6a91 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdateauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdateauthorizationrule_autorest.go @@ -64,5 +64,6 @@ func (c NotificationHubsClient) responderForCreateOrUpdateAuthorizationRule(resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_debugsend_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_debugsend_autorest.go index 13fd6f39821e..36b3fafb1265 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_debugsend_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_debugsend_autorest.go @@ -65,5 +65,6 @@ func (c NotificationHubsClient) responderForDebugSend(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_delete_autorest.go index 804219ce680d..47852222b898 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c NotificationHubsClient) responderForDelete(resp *http.Response) (result azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_deleteauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_deleteauthorizationrule_autorest.go index 7056666a3875..57aa8a5f0228 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_deleteauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_deleteauthorizationrule_autorest.go @@ -61,5 +61,6 @@ func (c NotificationHubsClient) responderForDeleteAuthorizationRule(resp *http.R azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_get_autorest.go index 39e6a2dc8de8..c2c95d04975b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_get_autorest.go @@ -63,5 +63,6 @@ func (c NotificationHubsClient) responderForGet(resp *http.Response) (result Get autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getauthorizationrule_autorest.go index 8f47dfdf194b..213dbbb23347 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c NotificationHubsClient) responderForGetAuthorizationRule(resp *http.Resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getpnscredentials_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getpnscredentials_autorest.go index 872a9372f9f3..e8382681bee7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getpnscredentials_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getpnscredentials_autorest.go @@ -64,5 +64,6 @@ func (c NotificationHubsClient) responderForGetPnsCredentials(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listkeys_autorest.go index 5d9eea3ce679..c0079bc2340f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c NotificationHubsClient) responderForListKeys(resp *http.Response) (resul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_patch_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_patch_autorest.go index 44f013f7ad7c..2083f3d0dee4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_patch_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_patch_autorest.go @@ -64,5 +64,6 @@ func (c NotificationHubsClient) responderForPatch(resp *http.Response) (result P autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_regeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_regeneratekeys_autorest.go index f793eb4e0b34..323fbfe9d4cb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_regeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_regeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c NotificationHubsClient) responderForRegenerateKeys(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesdelete_autorest.go index eb8278f90180..ff77bba640d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesdelete_autorest.go @@ -61,5 +61,6 @@ func (c OperationalInsightsClient) responderForQueriesDelete(resp *http.Response azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesget_autorest.go index 7b014b8e89db..6074fb6323c0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesget_autorest.go @@ -63,5 +63,6 @@ func (c OperationalInsightsClient) responderForQueriesGet(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesput_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesput_autorest.go index 5e93a3d3e9d7..6a355132a65a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesput_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesput_autorest.go @@ -64,5 +64,6 @@ func (c OperationalInsightsClient) responderForQueriesPut(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesupdate_autorest.go index 8d2380d9c891..54d4961be6e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriesupdate_autorest.go @@ -64,5 +64,6 @@ func (c OperationalInsightsClient) responderForQueriesUpdate(resp *http.Response autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackscreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackscreateorupdate_autorest.go index 5c63cfc96fab..2329710d7017 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackscreateorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackscreateorupdate_autorest.go @@ -64,5 +64,6 @@ func (c OperationalInsightsClient) responderForQueryPacksCreateOrUpdate(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksdelete_autorest.go index fd595d13bc48..8f5f7a984832 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksdelete_autorest.go @@ -61,5 +61,6 @@ func (c OperationalInsightsClient) responderForQueryPacksDelete(resp *http.Respo azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksget_autorest.go index 072d930b2c2d..9beed201713f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksget_autorest.go @@ -63,5 +63,6 @@ func (c OperationalInsightsClient) responderForQueryPacksGet(resp *http.Response autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksupdatetags_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksupdatetags_autorest.go index c79573724951..edfebc83191d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksupdatetags_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypacksupdatetags_autorest.go @@ -64,5 +64,6 @@ func (c OperationalInsightsClient) responderForQueryPacksUpdateTags(resp *http.R autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatmanagementgroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatmanagementgroup_autorest.go index 7051725ee698..a5d4e06b02eb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatmanagementgroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatmanagementgroup_autorest.go @@ -64,5 +64,6 @@ func (c PolicyInsightsClient) responderForRemediationsCancelAtManagementGroup(re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatresource_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatresource_autorest.go index a845ea029996..6ab5cccad66a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatresource_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatresource_autorest.go @@ -64,5 +64,6 @@ func (c PolicyInsightsClient) responderForRemediationsCancelAtResource(resp *htt autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatresourcegroup_autorest.go index 4e9b5424ca33..9f4d04af2974 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatresourcegroup_autorest.go @@ -64,5 +64,6 @@ func (c PolicyInsightsClient) responderForRemediationsCancelAtResourceGroup(resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatsubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatsubscription_autorest.go index 0b3721d0c137..f99881e45ca8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatsubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscancelatsubscription_autorest.go @@ -64,5 +64,6 @@ func (c PolicyInsightsClient) responderForRemediationsCancelAtSubscription(resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatmanagementgroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatmanagementgroup_autorest.go index 40a3e85fe1fd..0ac65993d4dd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatmanagementgroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatmanagementgroup_autorest.go @@ -64,5 +64,6 @@ func (c PolicyInsightsClient) responderForRemediationsCreateOrUpdateAtManagement autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatresource_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatresource_autorest.go index bb52593c23bb..bcffae080e13 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatresource_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatresource_autorest.go @@ -64,5 +64,6 @@ func (c PolicyInsightsClient) responderForRemediationsCreateOrUpdateAtResource(r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatresourcegroup_autorest.go index 6313f673d65c..92dd81e12ce4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatresourcegroup_autorest.go @@ -64,5 +64,6 @@ func (c PolicyInsightsClient) responderForRemediationsCreateOrUpdateAtResourceGr autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatsubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatsubscription_autorest.go index a63491aa0f77..09ea6e7d7fe8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatsubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationscreateorupdateatsubscription_autorest.go @@ -64,5 +64,6 @@ func (c PolicyInsightsClient) responderForRemediationsCreateOrUpdateAtSubscripti autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatmanagementgroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatmanagementgroup_autorest.go index 53831444161c..2506accd30ac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatmanagementgroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatmanagementgroup_autorest.go @@ -63,5 +63,6 @@ func (c PolicyInsightsClient) responderForRemediationsDeleteAtManagementGroup(re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatresource_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatresource_autorest.go index e02d70d3da60..f71fea023ea4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatresource_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatresource_autorest.go @@ -63,5 +63,6 @@ func (c PolicyInsightsClient) responderForRemediationsDeleteAtResource(resp *htt autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatresourcegroup_autorest.go index beed336d856d..b0a3eeb7cfb5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatresourcegroup_autorest.go @@ -63,5 +63,6 @@ func (c PolicyInsightsClient) responderForRemediationsDeleteAtResourceGroup(resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatsubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatsubscription_autorest.go index 2ba9b6b402a2..c521299f1601 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatsubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsdeleteatsubscription_autorest.go @@ -63,5 +63,6 @@ func (c PolicyInsightsClient) responderForRemediationsDeleteAtSubscription(resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatmanagementgroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatmanagementgroup_autorest.go index 4e3817967bee..c03210a5216e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatmanagementgroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatmanagementgroup_autorest.go @@ -63,5 +63,6 @@ func (c PolicyInsightsClient) responderForRemediationsGetAtManagementGroup(resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatresource_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatresource_autorest.go index f196bdb4af6c..9fdadcce8197 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatresource_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatresource_autorest.go @@ -63,5 +63,6 @@ func (c PolicyInsightsClient) responderForRemediationsGetAtResource(resp *http.R autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatresourcegroup_autorest.go index 6d6b13860e14..340a889727e6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatresourcegroup_autorest.go @@ -63,5 +63,6 @@ func (c PolicyInsightsClient) responderForRemediationsGetAtResourceGroup(resp *h autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatsubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatsubscription_autorest.go index 86089f4d913c..8d5cfb814735 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatsubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationsgetatsubscription_autorest.go @@ -63,5 +63,6 @@ func (c PolicyInsightsClient) responderForRemediationsGetAtSubscription(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_createorupdate_autorest.go index 10fa0dacda88..d5b6b14ea126 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c DashboardClient) responderForCreateOrUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_delete_autorest.go index ac0bb53695cf..6928656f1216 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c DashboardClient) responderForDelete(resp *http.Response) (result DeleteO azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_get_autorest.go index 56c7c3571cbd..84cd9bfdb23c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DashboardClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_update_autorest.go index a81556feea93..3111fe87bc99 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_update_autorest.go @@ -64,5 +64,6 @@ func (c DashboardClient) responderForUpdate(resp *http.Response) (result UpdateO autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationscreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationscreate_autorest.go index 8d9a936f255b..96efc828bd25 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationscreate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationscreate_autorest.go @@ -64,5 +64,6 @@ func (c TenantConfigurationClient) responderForTenantConfigurationsCreate(resp * autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationsdelete_autorest.go index e4f1837a0f34..de32952bd7fe 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationsdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationsdelete_autorest.go @@ -61,5 +61,6 @@ func (c TenantConfigurationClient) responderForTenantConfigurationsDelete(resp * azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationsget_autorest.go index 2b6a381dcf61..77f33766c48e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationsget_autorest.go @@ -63,5 +63,6 @@ func (c TenantConfigurationClient) responderForTenantConfigurationsGet(resp *htt autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationslist_autorest.go index 8276a9886b9c..f95451ec1b30 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_tenantconfigurationslist_autorest.go @@ -63,5 +63,6 @@ func (c TenantConfigurationClient) responderForTenantConfigurationsList(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/method_get_autorest.go index 094a1dfcd453..2aeb488f91c0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ConfigurationsClient) responderForGet(resp *http.Response) (result GetOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/method_listbyserver_autorest.go index b2fcf670c6ed..950a5ec48c1b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/method_listbyserver_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/method_listbyserver_autorest.go @@ -64,5 +64,6 @@ func (c ConfigurationsClient) responderForListByServer(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/method_get_autorest.go index a925a6fe4a7c..f35d313d2268 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DatabasesClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/method_listbyserver_autorest.go index d9328a1c80f0..c02aac94bf65 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/method_listbyserver_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/method_listbyserver_autorest.go @@ -64,5 +64,6 @@ func (c DatabasesClient) responderForListByServer(resp *http.Response) (result L autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/method_get_autorest.go index 2a52ef1e72e2..1391c01ba1a2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/method_get_autorest.go @@ -63,5 +63,6 @@ func (c FirewallRulesClient) responderForGet(resp *http.Response) (result GetOpe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/method_listbyserver_autorest.go index 8679163a1309..70624d92ee85 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/method_listbyserver_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/method_listbyserver_autorest.go @@ -64,5 +64,6 @@ func (c FirewallRulesClient) responderForListByServer(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/replicas/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/replicas/method_listbyserver_autorest.go index b9c158bbcf2c..c2cdbb89a830 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/replicas/method_listbyserver_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/replicas/method_listbyserver_autorest.go @@ -64,5 +64,6 @@ func (c ReplicasClient) responderForListByServer(resp *http.Response) (result Li autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/method_get_autorest.go index 3d91f8303db1..1c372d9df45d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/method_get_autorest.go @@ -64,5 +64,6 @@ func (c ServerAdministratorsClient) responderForGet(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/method_list_autorest.go index eba0cecb05b3..c26ecca29ae4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/method_list_autorest.go @@ -64,5 +64,6 @@ func (c ServerAdministratorsClient) responderForList(resp *http.Response) (resul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_get_autorest.go index b14e08633392..5c54dc25354a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ServersClient) responderForGet(resp *http.Response) (result GetOperation autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_list_autorest.go index d2d3378c0ded..64f327e19d32 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_list_autorest.go @@ -65,5 +65,6 @@ func (c ServersClient) responderForList(resp *http.Response) (result ListOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_listbyresourcegroup_autorest.go index eae6368be60f..29011cf2d324 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/method_listbyresourcegroup_autorest.go @@ -65,5 +65,6 @@ func (c ServersClient) responderForListByResourceGroup(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_get_autorest.go index ed2bce27b234..fe0dffe862a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_get_autorest.go @@ -64,5 +64,6 @@ func (c ServerSecurityAlertPoliciesClient) responderForGet(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_get_autorest.go index e3b39ea559ee..f105c5887a74 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_get_autorest.go @@ -63,5 +63,6 @@ func (c VirtualNetworkRulesClient) responderForGet(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/method_get_autorest.go index 8b782b79a557..8f78f612b951 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ServerKeysClient) responderForGet(resp *http.Response) (result GetOperat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/method_get_autorest.go index 094a1dfcd453..2aeb488f91c0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ConfigurationsClient) responderForGet(resp *http.Response) (result GetOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/databases/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/databases/method_get_autorest.go index a925a6fe4a7c..f35d313d2268 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/databases/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/databases/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DatabasesClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/firewallrules/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/firewallrules/method_get_autorest.go index 2a52ef1e72e2..1391c01ba1a2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/firewallrules/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/firewallrules/method_get_autorest.go @@ -63,5 +63,6 @@ func (c FirewallRulesClient) responderForGet(resp *http.Response) (result GetOpe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_get_autorest.go index 5b6c0f66dccb..bb0074a30855 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ServersClient) responderForGet(resp *http.Response) (result GetOperation autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_checknameavailability_autorest.go index 462f29215132..3b4bae555c00 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_checknameavailability_autorest.go @@ -65,5 +65,6 @@ func (c CapacitiesClient) responderForCheckNameAvailability(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_getdetails_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_getdetails_autorest.go index f2ff38affd4d..1e96f902cad0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_getdetails_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_getdetails_autorest.go @@ -63,5 +63,6 @@ func (c CapacitiesClient) responderForGetDetails(resp *http.Response) (result Ge autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_list_autorest.go index d4b629e35b44..e65db7b1873a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_list_autorest.go @@ -65,5 +65,6 @@ func (c CapacitiesClient) responderForList(resp *http.Response) (result ListOper autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_listbyresourcegroup_autorest.go index 4764eb196325..e1b2345465c1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_listbyresourcegroup_autorest.go @@ -65,5 +65,6 @@ func (c CapacitiesClient) responderForListByResourceGroup(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_listskusforcapacity_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_listskusforcapacity_autorest.go index 35a150828531..bd8b6cb29bbc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_listskusforcapacity_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/method_listskusforcapacity_autorest.go @@ -64,5 +64,6 @@ func (c CapacitiesClient) responderForListSkusForCapacity(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_get_autorest.go index 13f3ba4def8a..93b3395f9674 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_get_autorest.go @@ -63,5 +63,6 @@ func (c PrivateZonesClient) responderForGet(resp *http.Response) (result GetOper autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_createorupdate_autorest.go index 7023bb5b0b5f..115189971b80 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_createorupdate_autorest.go @@ -98,5 +98,6 @@ func (c RecordSetsClient) responderForCreateOrUpdate(resp *http.Response) (resul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_delete_autorest.go index 86dfcf7b7982..705826e0a5ec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_delete_autorest.go @@ -90,5 +90,6 @@ func (c RecordSetsClient) responderForDelete(resp *http.Response) (result Delete azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_get_autorest.go index 06616380be3e..0a8532477291 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_get_autorest.go @@ -63,5 +63,6 @@ func (c RecordSetsClient) responderForGet(resp *http.Response) (result GetOperat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_update_autorest.go index 1ff11635adf6..2fac5ae40428 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_update_autorest.go @@ -93,5 +93,6 @@ func (c RecordSetsClient) responderForUpdate(resp *http.Response) (result Update autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_get_autorest.go index 5e367c856750..f8c635914e69 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_get_autorest.go @@ -63,5 +63,6 @@ func (c VirtualNetworkLinksClient) responderForGet(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_addrootcollectionadmin_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_addrootcollectionadmin_autorest.go index 72b3fece3810..fc52fbbc2015 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_addrootcollectionadmin_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_addrootcollectionadmin_autorest.go @@ -63,5 +63,6 @@ func (c AccountClient) responderForAddRootCollectionAdmin(resp *http.Response) ( azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_get_autorest.go index 040f1d2601d3..19da9f998f3e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_get_autorest.go @@ -63,5 +63,6 @@ func (c AccountClient) responderForGet(resp *http.Response) (result GetOperation autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listkeys_autorest.go index 47b88dcd5114..b0896df6cd7d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c AccountClient) responderForListKeys(resp *http.Response) (result ListKey autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_get_autorest.go index a925a6fe4a7c..f35d313d2268 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DatabasesClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_listkeys_autorest.go index e1065e32ef2d..11d416711f9d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c DatabasesClient) responderForListKeys(resp *http.Response) (result ListK autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesget_autorest.go index 7dde646f24d9..967620144312 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databasesget_autorest.go @@ -63,5 +63,6 @@ func (c RedisEnterpriseClient) responderForDatabasesGet(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databaseslistkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databaseslistkeys_autorest.go index eb67cf8fd8be..7fcf48684b2c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databaseslistkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databaseslistkeys_autorest.go @@ -64,5 +64,6 @@ func (c RedisEnterpriseClient) responderForDatabasesListKeys(resp *http.Response autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_get_autorest.go index 3f77d31735b4..f3bd33b95c8c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_get_autorest.go @@ -63,5 +63,6 @@ func (c RedisEnterpriseClient) responderForGet(resp *http.Response) (result GetO autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_createorupdate_autorest.go index d1086940ff77..dfe8081b9f06 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c HybridConnectionsClient) responderForCreateOrUpdate(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_createorupdateauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_createorupdateauthorizationrule_autorest.go index ee77dd0a36ec..2eacea331e4b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_createorupdateauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_createorupdateauthorizationrule_autorest.go @@ -64,5 +64,6 @@ func (c HybridConnectionsClient) responderForCreateOrUpdateAuthorizationRule(res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_delete_autorest.go index f9171df90384..fed5efbc8c27 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c HybridConnectionsClient) responderForDelete(resp *http.Response) (result azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_deleteauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_deleteauthorizationrule_autorest.go index c06137565246..d68bada1bd95 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_deleteauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_deleteauthorizationrule_autorest.go @@ -61,5 +61,6 @@ func (c HybridConnectionsClient) responderForDeleteAuthorizationRule(resp *http. azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_get_autorest.go index 62a3b4f6b5bb..e74e23ef7e3a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_get_autorest.go @@ -63,5 +63,6 @@ func (c HybridConnectionsClient) responderForGet(resp *http.Response) (result Ge autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_getauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_getauthorizationrule_autorest.go index 1eaebb7f0801..66dfe02f7794 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_getauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_getauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c HybridConnectionsClient) responderForGetAuthorizationRule(resp *http.Res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listkeys_autorest.go index 5b5e14c5f58c..2156a9c68380 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c HybridConnectionsClient) responderForListKeys(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_regeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_regeneratekeys_autorest.go index 6bbd1be84fb2..f036fe194c41 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_regeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_regeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c HybridConnectionsClient) responderForRegenerateKeys(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_checknameavailability_autorest.go index 53a79e8b9e79..67ba0ea69f04 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_checknameavailability_autorest.go @@ -66,5 +66,6 @@ func (c NamespacesClient) responderForCheckNameAvailability(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_createorupdateauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_createorupdateauthorizationrule_autorest.go index 4e8e5ae7de89..427b471540dd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_createorupdateauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_createorupdateauthorizationrule_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForCreateOrUpdateAuthorizationRule(resp *http autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_deleteauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_deleteauthorizationrule_autorest.go index 206d13b9e4fc..92336c4b4a07 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_deleteauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_deleteauthorizationrule_autorest.go @@ -61,5 +61,6 @@ func (c NamespacesClient) responderForDeleteAuthorizationRule(resp *http.Respons azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_get_autorest.go index eb16c27cf8e8..1ab016389fce 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_get_autorest.go @@ -63,5 +63,6 @@ func (c NamespacesClient) responderForGet(resp *http.Response) (result GetOperat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_getauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_getauthorizationrule_autorest.go index e634885f922c..24a7f00cb692 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_getauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_getauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c NamespacesClient) responderForGetAuthorizationRule(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listkeys_autorest.go index 970a5b781554..5dfd71ec1984 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForListKeys(resp *http.Response) (result List autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_regeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_regeneratekeys_autorest.go index c101b53accea..4f9dd06f42ac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_regeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_regeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c NamespacesClient) responderForRegenerateKeys(resp *http.Response) (resul autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_update_autorest.go index bd70c33f2a6a..3e61f227e840 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_update_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForUpdate(resp *http.Response) (result Update autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/method_get_autorest.go index 9be3f4a8a69e..e1c436a672c0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/method_get_autorest.go @@ -93,5 +93,6 @@ func (c AdminKeysClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/method_regenerate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/method_regenerate_autorest.go index 58205498cf8d..dd68ca8dce0a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/method_regenerate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/adminkeys/method_regenerate_autorest.go @@ -92,5 +92,6 @@ func (c AdminKeysClient) responderForRegenerate(resp *http.Response) (result Reg autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_create_autorest.go index e05dc216096d..c01659951c36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_create_autorest.go @@ -92,5 +92,6 @@ func (c QueryKeysClient) responderForCreate(resp *http.Response) (result CreateO autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_delete_autorest.go index e3db92650a71..b89ee1e68fc8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_delete_autorest.go @@ -90,5 +90,6 @@ func (c QueryKeysClient) responderForDelete(resp *http.Response) (result DeleteO azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_checknameavailability_autorest.go index 6b6258f7cc9e..c828d0d24d14 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_checknameavailability_autorest.go @@ -95,5 +95,6 @@ func (c ServicesClient) responderForCheckNameAvailability(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_delete_autorest.go index 9d4b0af86b1d..222b9e5cca09 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_delete_autorest.go @@ -90,5 +90,6 @@ func (c ServicesClient) responderForDelete(resp *http.Response) (result DeleteOp azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_get_autorest.go index 215b4610dd70..2efe8337c1ba 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_get_autorest.go @@ -92,5 +92,6 @@ func (c ServicesClient) responderForGet(resp *http.Response) (result GetOperatio autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_update_autorest.go index b15469b16197..db83003397c9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_update_autorest.go @@ -93,5 +93,6 @@ func (c ServicesClient) responderForUpdate(resp *http.Response) (result UpdateOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_breakpairing_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_breakpairing_autorest.go index 144131ab3e57..4a8d52a71e99 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_breakpairing_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_breakpairing_autorest.go @@ -62,5 +62,6 @@ func (c DisasterRecoveryConfigsClient) responderForBreakPairing(resp *http.Respo azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_checknameavailability_autorest.go index 29d5af69ca5f..fcaeecddafc8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_checknameavailability_autorest.go @@ -65,5 +65,6 @@ func (c DisasterRecoveryConfigsClient) responderForCheckNameAvailability(resp *h autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_createorupdate_autorest.go index f6ed48aef31d..3f67b7cfe66d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c DisasterRecoveryConfigsClient) responderForCreateOrUpdate(resp *http.Res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_delete_autorest.go index b98d8635ee1e..da4788c183a1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c DisasterRecoveryConfigsClient) responderForDelete(resp *http.Response) ( azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_failover_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_failover_autorest.go index a7a8f71ea7e0..3ab413cb9f24 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_failover_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_failover_autorest.go @@ -63,5 +63,6 @@ func (c DisasterRecoveryConfigsClient) responderForFailOver(resp *http.Response) azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_get_autorest.go index da5493fb0272..9bfdb91343b7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DisasterRecoveryConfigsClient) responderForGet(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_getauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_getauthorizationrule_autorest.go index a4eea395979f..8d87a8c3e4ea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_getauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_getauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c DisasterRecoveryConfigsClient) responderForGetAuthorizationRule(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listkeys_autorest.go index 1a26d3f29538..dceb8e569f56 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c DisasterRecoveryConfigsClient) responderForListKeys(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_checknameavailability_autorest.go index 15a555f0713e..ba52d2792469 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_checknameavailability_autorest.go @@ -66,5 +66,6 @@ func (c NamespacesClient) responderForCheckNameAvailability(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_createorupdatenetworkruleset_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_createorupdatenetworkruleset_autorest.go index 47ba03628477..5c25e67a3470 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_createorupdatenetworkruleset_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_createorupdatenetworkruleset_autorest.go @@ -65,5 +65,6 @@ func (c NamespacesClient) responderForCreateOrUpdateNetworkRuleSet(resp *http.Re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_get_autorest.go index 403daa159d33..54e7e06d3079 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_get_autorest.go @@ -63,5 +63,6 @@ func (c NamespacesClient) responderForGet(resp *http.Response) (result GetOperat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_getnetworkruleset_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_getnetworkruleset_autorest.go index 929737999ebf..ce51bb141b10 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_getnetworkruleset_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_getnetworkruleset_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForGetNetworkRuleSet(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_update_autorest.go index 09f620ced474..14cdf13d14d4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_update_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesClient) responderForUpdate(resp *http.Response) (result Update autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule_autorest.go index da678cb00879..3907ae8e0b32 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesAuthorizationRuleClient) responderForNamespacesCreateOrUpdateA autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesdeleteauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesdeleteauthorizationrule_autorest.go index 12b549e99e4a..045435876a74 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesdeleteauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesdeleteauthorizationrule_autorest.go @@ -61,5 +61,6 @@ func (c NamespacesAuthorizationRuleClient) responderForNamespacesDeleteAuthoriza azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule_autorest.go index 91f182aa4553..ca4ec7bf7b9a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c NamespacesAuthorizationRuleClient) responderForNamespacesGetAuthorizatio autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistkeys_autorest.go index 29d9575e85fa..27810e965859 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistkeys_autorest.go @@ -64,5 +64,6 @@ func (c NamespacesAuthorizationRuleClient) responderForNamespacesListKeys(resp * autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys_autorest.go index 93d0753f72bb..083feae5b8ea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c NamespacesAuthorizationRuleClient) responderForNamespacesRegenerateKeys( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_createorupdate_autorest.go index 7503be89cbd9..fdf0cc2a387d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c QueuesClient) responderForCreateOrUpdate(resp *http.Response) (result Cr autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_delete_autorest.go index ba7742cf4101..301d080c94d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c QueuesClient) responderForDelete(resp *http.Response) (result DeleteOper azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_get_autorest.go index 5f4b20ea427e..b64080bde716 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_get_autorest.go @@ -63,5 +63,6 @@ func (c QueuesClient) responderForGet(resp *http.Response) (result GetOperationR autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule_autorest.go index a76a6e5ba0bf..d953056a6b98 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule_autorest.go @@ -64,5 +64,6 @@ func (c QueuesAuthorizationRuleClient) responderForQueuesCreateOrUpdateAuthoriza autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesdeleteauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesdeleteauthorizationrule_autorest.go index 46cbf6b6d0ce..db2808ae307d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesdeleteauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesdeleteauthorizationrule_autorest.go @@ -61,5 +61,6 @@ func (c QueuesAuthorizationRuleClient) responderForQueuesDeleteAuthorizationRule azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule_autorest.go index a5af12fc8df3..be575d4703e5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c QueuesAuthorizationRuleClient) responderForQueuesGetAuthorizationRule(re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistkeys_autorest.go index 511eafdbdbe4..8f134398b56c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistkeys_autorest.go @@ -64,5 +64,6 @@ func (c QueuesAuthorizationRuleClient) responderForQueuesListKeys(resp *http.Res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesregeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesregeneratekeys_autorest.go index 4bea7e0efe4b..9f87730b62a3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesregeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesregeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c QueuesAuthorizationRuleClient) responderForQueuesRegenerateKeys(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_createorupdate_autorest.go index 7e69a145d81e..2415da0ad25f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c RulesClient) responderForCreateOrUpdate(resp *http.Response) (result Cre autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_delete_autorest.go index cd3d2426af6f..fe7ff00dc782 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c RulesClient) responderForDelete(resp *http.Response) (result DeleteOpera azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_createorupdate_autorest.go index 2cc752f083cd..d630ffff1d70 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c SubscriptionsClient) responderForCreateOrUpdate(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_delete_autorest.go index 8a96fdd572fe..4a02e2662574 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c SubscriptionsClient) responderForDelete(resp *http.Response) (result Del azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_get_autorest.go index c8aabc90096a..dbeaa5cc644f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_get_autorest.go @@ -63,5 +63,6 @@ func (c SubscriptionsClient) responderForGet(resp *http.Response) (result GetOpe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_rulesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_rulesget_autorest.go index 07c4d322e1e7..0d6aa0da43d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_rulesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_rulesget_autorest.go @@ -63,5 +63,6 @@ func (c SubscriptionsClient) responderForRulesGet(resp *http.Response) (result R autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_createorupdate_autorest.go index 53df3d9cebc9..bab465039bbc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c TopicsClient) responderForCreateOrUpdate(resp *http.Response) (result Cr autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_delete_autorest.go index 1fc80a781ea8..9abdfc2088ca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c TopicsClient) responderForDelete(resp *http.Response) (result DeleteOper azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_get_autorest.go index e5084f1628fe..d66109ae4764 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_get_autorest.go @@ -63,5 +63,6 @@ func (c TopicsClient) responderForGet(resp *http.Response) (result GetOperationR autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule_autorest.go index e3feda073643..9f7bfa84e71d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule_autorest.go @@ -64,5 +64,6 @@ func (c TopicsAuthorizationRuleClient) responderForTopicsCreateOrUpdateAuthoriza autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsdeleteauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsdeleteauthorizationrule_autorest.go index 7368dc04b0b9..66ecbcd74c6b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsdeleteauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsdeleteauthorizationrule_autorest.go @@ -61,5 +61,6 @@ func (c TopicsAuthorizationRuleClient) responderForTopicsDeleteAuthorizationRule azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule_autorest.go index f55209f3388a..02f07673be22 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule_autorest.go @@ -63,5 +63,6 @@ func (c TopicsAuthorizationRuleClient) responderForTopicsGetAuthorizationRule(re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistkeys_autorest.go index 3b9921636828..03e8db4e594f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistkeys_autorest.go @@ -64,5 +64,6 @@ func (c TopicsAuthorizationRuleClient) responderForTopicsListKeys(resp *http.Res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsregeneratekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsregeneratekeys_autorest.go index 16508044d8bf..623a6f24dd84 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsregeneratekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsregeneratekeys_autorest.go @@ -65,5 +65,6 @@ func (c TopicsAuthorizationRuleClient) responderForTopicsRegenerateKeys(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_get_autorest.go index d0d2dde3c717..e81b8d3b20bf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ManagedClusterClient) responderForGet(resp *http.Response) (result GetOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_update_autorest.go index 46b74d2c16a8..c11f0beae5be 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_update_autorest.go @@ -64,5 +64,6 @@ func (c ManagedClusterClient) responderForUpdate(resp *http.Response) (result Up autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_get_autorest.go index 4de83d057e45..f862c9383f82 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_get_autorest.go @@ -63,5 +63,6 @@ func (c NodeTypeClient) responderForGet(resp *http.Response) (result GetOperatio autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_update_autorest.go index 14cfd7dde067..a0f77c739089 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_update_autorest.go @@ -64,5 +64,6 @@ func (c NodeTypeClient) responderForUpdate(resp *http.Response) (result UpdateOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_checknameavailability_autorest.go index b9753605c70b..292929ad85df 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_checknameavailability_autorest.go @@ -65,5 +65,6 @@ func (c SignalRClient) responderForCheckNameAvailability(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificatesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificatesdelete_autorest.go index d362f305bdde..c171ed1da9a1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificatesdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificatesdelete_autorest.go @@ -61,5 +61,6 @@ func (c SignalRClient) responderForCustomCertificatesDelete(resp *http.Response) azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificatesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificatesget_autorest.go index b61c0db86d0b..fcf68547a1ba 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificatesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificatesget_autorest.go @@ -63,5 +63,6 @@ func (c SignalRClient) responderForCustomCertificatesGet(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customdomainsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customdomainsget_autorest.go index 11c780aed48b..c4125f787769 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customdomainsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customdomainsget_autorest.go @@ -63,5 +63,6 @@ func (c SignalRClient) responderForCustomDomainsGet(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_get_autorest.go index d54b8ea530f9..55f483b3e1e6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_get_autorest.go @@ -63,5 +63,6 @@ func (c SignalRClient) responderForGet(resp *http.Response) (result GetOperation autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listkeys_autorest.go index addf72c34999..6c89992f013b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listkeys_autorest.go @@ -64,5 +64,6 @@ func (c SignalRClient) responderForListKeys(resp *http.Response) (result ListKey autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listskus_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listskus_autorest.go index e3cb6e56b81c..f05bb5740d6b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listskus_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listskus_autorest.go @@ -64,5 +64,6 @@ func (c SignalRClient) responderForListSkus(resp *http.Response) (result ListSku autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionsget_autorest.go index bebe6f03b070..17fce1fa4392 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionsget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionsget_autorest.go @@ -63,5 +63,6 @@ func (c SignalRClient) responderForPrivateEndpointConnectionsGet(resp *http.Resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionsupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionsupdate_autorest.go index 858b9c3ee737..fd59b1fbe0b1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionsupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionsupdate_autorest.go @@ -64,5 +64,6 @@ func (c SignalRClient) responderForPrivateEndpointConnectionsUpdate(resp *http.R autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_sharedprivatelinkresourcesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_sharedprivatelinkresourcesget_autorest.go index ba463f54a3de..29a8c06b4894 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_sharedprivatelinkresourcesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_sharedprivatelinkresourcesget_autorest.go @@ -63,5 +63,6 @@ func (c SignalRClient) responderForSharedPrivateLinkResourcesGet(resp *http.Resp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_get_autorest.go index 52a1705b7f6c..e0beb4ed54ac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_get_autorest.go @@ -92,5 +92,6 @@ func (c SqlVirtualMachinesClient) responderForGet(resp *http.Response) (result G autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/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 index 9a8e42cf4c0e..c10d3bf11597 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/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 @@ -64,5 +64,6 @@ func (c ObjectReplicationPoliciesClient) responderForCreateOrUpdate(resp *http.R autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/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 index a18ae53ca84a..922a0586bc46 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/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 @@ -61,5 +61,6 @@ func (c ObjectReplicationPoliciesClient) responderForDelete(resp *http.Response) azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/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 index 96f8e2deb381..9dc4b16a2c83 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/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 @@ -63,5 +63,6 @@ func (c ObjectReplicationPoliciesClient) responderForGet(resp *http.Response) (r autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/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 index 2da7f3f44e1f..75691a3a274f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/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 @@ -64,5 +64,6 @@ func (c ObjectReplicationPoliciesClient) responderForList(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate_autorest.go index e8a5ae1fbdf1..562902bf61fc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c EndpointsClient) responderForCreateOrUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete_autorest.go index 9cd53850ef84..96c745749934 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete_autorest.go @@ -63,5 +63,6 @@ func (c EndpointsClient) responderForDelete(resp *http.Response) (result DeleteO autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_get_autorest.go index da291921eee7..c77dce43a2bc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_get_autorest.go @@ -63,5 +63,6 @@ func (c EndpointsClient) responderForGet(resp *http.Response) (result GetOperati autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_update_autorest.go index 9a72660fb66b..3eedd41d2012 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_update_autorest.go @@ -64,5 +64,6 @@ func (c EndpointsClient) responderForUpdate(resp *http.Response) (result UpdateO autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault_autorest.go index e9aa023d3005..e5f5620df8b9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault_autorest.go @@ -63,5 +63,6 @@ func (c GeographicHierarchiesClient) responderForGetDefault(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability_autorest.go index 52940a207454..1cc71e88da74 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability_autorest.go @@ -64,5 +64,6 @@ func (c ProfilesClient) responderForCheckTrafficManagerRelativeDnsNameAvailabili autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate_autorest.go index d489332952e8..0afeb87048f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c ProfilesClient) responderForCreateOrUpdate(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_delete_autorest.go index 3afaf3a7bc5e..9a8483411487 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_delete_autorest.go @@ -63,5 +63,6 @@ func (c ProfilesClient) responderForDelete(resp *http.Response) (result DeleteOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_get_autorest.go index c76caf81d42d..87e2d5e35704 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ProfilesClient) responderForGet(resp *http.Response) (result GetOperatio autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup_autorest.go index 518d20075669..4366a3089190 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup_autorest.go @@ -65,5 +65,6 @@ func (c ProfilesClient) responderForListByResourceGroup(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription_autorest.go index 7e819c9c30b6..fbe9ff0da0da 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription_autorest.go @@ -65,5 +65,6 @@ func (c ProfilesClient) responderForListBySubscription(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_update_autorest.go index 16b5578e321d..5a86bf294c0e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_update_autorest.go @@ -64,5 +64,6 @@ func (c ProfilesClient) responderForUpdate(resp *http.Response) (result UpdateOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciescreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciescreateorupdate_autorest.go index b38e6b8870e9..c0456bc59ebd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciescreateorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciescreateorupdate_autorest.go @@ -64,5 +64,6 @@ func (c VideoAnalyzerClient) responderForAccessPoliciesCreateOrUpdate(resp *http autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesdelete_autorest.go index bc7d97825d94..945eee121534 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesdelete_autorest.go @@ -61,5 +61,6 @@ func (c VideoAnalyzerClient) responderForAccessPoliciesDelete(resp *http.Respons azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesget_autorest.go index 740b6f87202d..7239c195542c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesget_autorest.go @@ -63,5 +63,6 @@ func (c VideoAnalyzerClient) responderForAccessPoliciesGet(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesupdate_autorest.go index 8d600b2a3164..74d5eeb96b7b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspoliciesupdate_autorest.go @@ -64,5 +64,6 @@ func (c VideoAnalyzerClient) responderForAccessPoliciesUpdate(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulescreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulescreateorupdate_autorest.go index bc8b20296d52..ae5370e1fc86 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulescreateorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulescreateorupdate_autorest.go @@ -64,5 +64,6 @@ func (c VideoAnalyzerClient) responderForEdgeModulesCreateOrUpdate(resp *http.Re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulesdelete_autorest.go index b94826c6e685..6ea68cc81735 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulesdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulesdelete_autorest.go @@ -61,5 +61,6 @@ func (c VideoAnalyzerClient) responderForEdgeModulesDelete(resp *http.Response) azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulesget_autorest.go index b718a1e49e33..0671cb79c1b4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulesget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemodulesget_autorest.go @@ -63,5 +63,6 @@ func (c VideoAnalyzerClient) responderForEdgeModulesGet(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemoduleslistprovisioningtoken_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemoduleslistprovisioningtoken_autorest.go index 78b45a251aa8..c1d136886f1b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemoduleslistprovisioningtoken_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemoduleslistprovisioningtoken_autorest.go @@ -65,5 +65,6 @@ func (c VideoAnalyzerClient) responderForEdgeModulesListProvisioningToken(resp * autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_locationschecknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_locationschecknameavailability_autorest.go index dcc1f1831826..fd02bcc551d2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_locationschecknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_locationschecknameavailability_autorest.go @@ -65,5 +65,6 @@ func (c VideoAnalyzerClient) responderForLocationsCheckNameAvailability(resp *ht autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerscreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerscreateorupdate_autorest.go index 44a2bebe0434..09cdb8cc82b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerscreateorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerscreateorupdate_autorest.go @@ -64,5 +64,6 @@ func (c VideoAnalyzerClient) responderForVideoAnalyzersCreateOrUpdate(resp *http autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersdelete_autorest.go index 33061f84c202..63b67dd00347 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersdelete_autorest.go @@ -61,5 +61,6 @@ func (c VideoAnalyzerClient) responderForVideoAnalyzersDelete(resp *http.Respons azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersget_autorest.go index 36821cf2da21..727e0ffb3f35 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersget_autorest.go @@ -63,5 +63,6 @@ func (c VideoAnalyzerClient) responderForVideoAnalyzersGet(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerslist_autorest.go index 5410ed0abd17..f67c7fcea31f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerslist_autorest.go @@ -65,5 +65,6 @@ func (c VideoAnalyzerClient) responderForVideoAnalyzersList(resp *http.Response) autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerslistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerslistbysubscription_autorest.go index 1c80895fc3e8..0a2c1e768620 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerslistbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerslistbysubscription_autorest.go @@ -65,5 +65,6 @@ func (c VideoAnalyzerClient) responderForVideoAnalyzersListBySubscription(resp * autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerssyncstoragekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerssyncstoragekeys_autorest.go index 67fe0856d358..bec50f0b590e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerssyncstoragekeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzerssyncstoragekeys_autorest.go @@ -63,5 +63,6 @@ func (c VideoAnalyzerClient) responderForVideoAnalyzersSyncStorageKeys(resp *htt azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersupdate_autorest.go index a034be738d9f..96ae572247bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoanalyzersupdate_autorest.go @@ -64,5 +64,6 @@ func (c VideoAnalyzerClient) responderForVideoAnalyzersUpdate(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoscreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoscreateorupdate_autorest.go index 7445173c1144..e66098106785 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoscreateorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoscreateorupdate_autorest.go @@ -64,5 +64,6 @@ func (c VideoAnalyzerClient) responderForVideosCreateOrUpdate(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosdelete_autorest.go index b7402c545ddd..0ff16b8a5e43 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosdelete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosdelete_autorest.go @@ -61,5 +61,6 @@ func (c VideoAnalyzerClient) responderForVideosDelete(resp *http.Response) (resu azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosget_autorest.go index 8ff9447b3377..9b5e02b91690 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosget_autorest.go @@ -63,5 +63,6 @@ func (c VideoAnalyzerClient) responderForVideosGet(resp *http.Response) (result autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosliststreamingtoken_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosliststreamingtoken_autorest.go index 9111f80f60fd..3d8c269d30e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosliststreamingtoken_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosliststreamingtoken_autorest.go @@ -64,5 +64,6 @@ func (c VideoAnalyzerClient) responderForVideosListStreamingToken(resp *http.Res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosupdate_autorest.go index 7cf223ee22f3..1c5d0498159b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videosupdate_autorest.go @@ -64,5 +64,6 @@ func (c VideoAnalyzerClient) responderForVideosUpdate(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_get_autorest.go index 21ee200de2c5..611e5dbc73a7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_get_autorest.go @@ -63,5 +63,6 @@ func (c AuthorizationsClient) responderForGet(resp *http.Response) (result GetOp autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_get_autorest.go index 3dd93cd29512..2957d3dd8de8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ClustersClient) responderForGet(resp *http.Response) (result GetOperatio autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_get_autorest.go index ee8d0c2130d3..d05983cf3d6d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_get_autorest.go @@ -63,5 +63,6 @@ func (c PrivateCloudsClient) responderForGet(resp *http.Response) (result GetOpe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_listadmincredentials_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_listadmincredentials_autorest.go index 03f49ff1a5eb..74d8f2cf7adc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_listadmincredentials_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_listadmincredentials_autorest.go @@ -64,5 +64,6 @@ func (c PrivateCloudsClient) responderForListAdminCredentials(resp *http.Respons autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_confirmconsentcode_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_confirmconsentcode_autorest.go index d467e54fe347..b646e40521a2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_confirmconsentcode_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_confirmconsentcode_autorest.go @@ -65,5 +65,6 @@ func (c ConnectionsClient) responderForConfirmConsentCode(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_createorupdate_autorest.go index abb0d779e4b1..09efa338eab0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_createorupdate_autorest.go @@ -64,5 +64,6 @@ func (c ConnectionsClient) responderForCreateOrUpdate(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_delete_autorest.go index 56e936e9910a..d28a83ac6a8c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c ConnectionsClient) responderForDelete(resp *http.Response) (result Delet azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_get_autorest.go index 520d0fce4db1..c2dc83d1692f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_get_autorest.go @@ -63,5 +63,6 @@ func (c ConnectionsClient) responderForGet(resp *http.Response) (result GetOpera autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_list_autorest.go index 712d86a82495..f6e3e97a165b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_list_autorest.go @@ -99,5 +99,6 @@ func (c ConnectionsClient) responderForList(resp *http.Response) (result ListOpe autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_listconsentlinks_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_listconsentlinks_autorest.go index 4f0b1b741536..04c12602d59a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_listconsentlinks_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_listconsentlinks_autorest.go @@ -65,5 +65,6 @@ func (c ConnectionsClient) responderForListConsentLinks(resp *http.Response) (re autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_update_autorest.go index 2d00bea26292..e652f3c3cece 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/method_update_autorest.go @@ -64,5 +64,6 @@ func (c ConnectionsClient) responderForUpdate(resp *http.Response) (result Updat autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/method_managedapisget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/method_managedapisget_autorest.go index 1154d0aa4fa7..45728b10f995 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/method_managedapisget_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/method_managedapisget_autorest.go @@ -63,5 +63,6 @@ func (c ManagedAPIsClient) responderForManagedApisGet(resp *http.Response) (resu autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/method_managedapislist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/method_managedapislist_autorest.go index 14770cc6032e..e1d2eea4aa14 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/method_managedapislist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/method_managedapislist_autorest.go @@ -64,5 +64,6 @@ func (c ManagedAPIsClient) responderForManagedApisList(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/modules.txt b/vendor/modules.txt index e1fdb9096499..351fe5bfe7b9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -191,7 +191,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.20220725.1163004 +# github.com/hashicorp/go-azure-sdk v0.20220805.1100614 ## explicit; go 1.18 github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants From 5dbde1463d6bc4d79204beec53702b124a94f749 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 11 Aug 2022 11:54:01 +0200 Subject: [PATCH 066/100] depednencies: updating to `v0.20220809.1122626` of `github.com/hashicorp/go-azure-sdk` --- go.mod | 2 +- go.sum | 4 +- .../domainservices/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listkeys_autorest.go | 88 +++++++++---------- ...d_workbookslistbyresourcegroup_autorest.go | 88 +++++++++---------- ...od_workbookslistbysubscription_autorest.go | 88 +++++++++---------- .../method_workbooksrevisionslist_autorest.go | 88 +++++++++---------- .../automationaccount/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_accountslist_autorest.go | 88 +++++++++---------- ...od_accountslistbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_deletedaccountslist_autorest.go | 88 +++++++++---------- .../method_resourceskuslist_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../availabilitysets/method_list_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- ...thod_ledgerlistbyresourcegroup_autorest.go | 88 +++++++++---------- ...ethod_ledgerlistbysubscription_autorest.go | 88 +++++++++---------- .../method_containergroupslist_autorest.go | 88 +++++++++---------- ...ainergroupslistbyresourcegroup_autorest.go | 88 +++++++++---------- ...ethod_locationlistcachedimages_autorest.go | 88 +++++++++---------- ...ethod_locationlistcapabilities_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- ...ckupsecuritypinrequestsobjects_autorest.go | 88 +++++++++---------- ...teprotecteditemrequestsobjects_autorest.go | 88 +++++++++---------- ...ourceguardproxyrequestsobjects_autorest.go | 88 +++++++++---------- ...sablesoftdeleterequestsobjects_autorest.go | 88 +++++++++---------- ...od_getresourcesinresourcegroup_autorest.go | 88 +++++++++---------- ...hod_getresourcesinsubscription_autorest.go | 88 +++++++++---------- ...teprotecteditemrequestsobjects_autorest.go | 88 +++++++++---------- ...rotectionpolicyrequestsobjects_autorest.go | 88 +++++++++---------- .../application/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../desktop/method_list_autorest.go | 88 +++++++++---------- .../hostpool/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbyhostpool_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../sessionhost/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_monitorslist_autorest.go | 88 +++++++++---------- ...od_monitorslistbyresourcegroup_autorest.go | 88 +++++++++---------- .../rules/method_tagruleslist_autorest.go | 88 +++++++++---------- ...venthubslistauthorizationrules_autorest.go | 88 +++++++++---------- ...mespaceslistauthorizationrules_autorest.go | 88 +++++++++---------- .../method_listbyeventhub_autorest.go | 88 +++++++++---------- .../method_list_autorest.go | 88 +++++++++---------- .../method_listbynamespace_autorest.go | 88 +++++++++---------- ...od_clusterslistbyresourcegroup_autorest.go | 88 +++++++++---------- ...hod_clusterslistbysubscription_autorest.go | 88 +++++++++---------- .../namespaces/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- ...edicatedhsmlistbyresourcegroup_autorest.go | 88 +++++++++---------- ...dedicatedhsmlistbysubscription_autorest.go | 88 +++++++++---------- ...ndnetworkdependenciesendpoints_autorest.go | 88 +++++++++---------- .../method_create_autorest.go | 1 + .../method_delete_autorest.go | 1 + .../method_get_autorest.go | 1 + .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_update_autorest.go | 1 + .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../apps/method_listtemplates_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- ...didentitieslistbyresourcegroup_autorest.go | 88 +++++++++---------- ...edidentitieslistbysubscription_autorest.go | 88 +++++++++---------- .../method_list_autorest.go | 88 +++++++++---------- .../method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../creators/method_listbyaccount_autorest.go | 88 +++++++++---------- ...ingaccountslistbyresourcegroup_autorest.go | 88 +++++++++---------- ...ringaccountslistbysubscription_autorest.go | 88 +++++++++---------- ...orsaccountslistbyresourcegroup_autorest.go | 88 +++++++++---------- ...horsaccountslistbysubscription_autorest.go | 88 +++++++++---------- .../method_poolslist_autorest.go | 88 +++++++++---------- .../method_accountslist_autorest.go | 88 +++++++++---------- ...hod_accountslistbysubscription_autorest.go | 88 +++++++++---------- .../volumes/method_list_autorest.go | 88 +++++++++---------- .../namespaces/method_list_autorest.go | 88 +++++++++---------- .../namespaces/method_listall_autorest.go | 88 +++++++++---------- .../method_listauthorizationrules_autorest.go | 88 +++++++++---------- .../notificationhubs/method_list_autorest.go | 88 +++++++++---------- .../method_listauthorizationrules_autorest.go | 88 +++++++++---------- .../method_querieslist_autorest.go | 88 +++++++++---------- .../method_queriessearch_autorest.go | 88 +++++++++---------- .../method_querypackslist_autorest.go | 88 +++++++++---------- ..._querypackslistbyresourcegroup_autorest.go | 88 +++++++++---------- ...stdeploymentsatmanagementgroup_autorest.go | 88 +++++++++---------- ...tionslistdeploymentsatresource_autorest.go | 88 +++++++++---------- ...listdeploymentsatresourcegroup_autorest.go | 88 +++++++++---------- ...slistdeploymentsatsubscription_autorest.go | 88 +++++++++---------- ...diationslistformanagementgroup_autorest.go | 88 +++++++++---------- ...od_remediationslistforresource_autorest.go | 88 +++++++++---------- ...mediationslistforresourcegroup_autorest.go | 88 +++++++++---------- ...emediationslistforsubscription_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_listbyserver_autorest.go | 88 +++++++++---------- .../method_listbyserver_autorest.go | 88 +++++++++---------- .../serverkeys/method_list_autorest.go | 88 +++++++++---------- .../method_listbyserver_autorest.go | 88 +++++++++---------- .../databases/method_listbyserver_autorest.go | 88 +++++++++---------- .../method_listbyserver_autorest.go | 88 +++++++++---------- .../servers/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../privatezones/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../recordsets/method_list_autorest.go | 88 +++++++++---------- .../recordsets/method_listbytype_autorest.go | 88 +++++++++---------- .../method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_listbycluster_autorest.go | 88 +++++++++---------- .../method_databaseslistbycluster_autorest.go | 88 +++++++++---------- .../redisenterprise/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listauthorizationrules_autorest.go | 88 +++++++++---------- .../method_listbynamespace_autorest.go | 88 +++++++++---------- .../namespaces/method_list_autorest.go | 88 +++++++++---------- .../method_listauthorizationrules_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysearchservice_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_list_autorest.go | 88 +++++++++---------- .../method_listauthorizationrules_autorest.go | 88 +++++++++---------- .../namespaces/method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listnetworkrulesets_autorest.go | 88 +++++++++---------- ...mespaceslistauthorizationrules_autorest.go | 88 +++++++++---------- .../queues/method_listbynamespace_autorest.go | 88 +++++++++---------- ...d_queueslistauthorizationrules_autorest.go | 88 +++++++++---------- .../method_listbysubscriptions_autorest.go | 88 +++++++++---------- .../method_listbytopic_autorest.go | 88 +++++++++---------- .../topics/method_listbynamespace_autorest.go | 88 +++++++++---------- ...d_topicslistauthorizationrules_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- .../method_listbymanagedclusters_autorest.go | 88 +++++++++---------- .../method_customcertificateslist_autorest.go | 88 +++++++++---------- .../method_customdomainslist_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysubscription_autorest.go | 88 +++++++++---------- ...privateendpointconnectionslist_autorest.go | 88 +++++++++---------- ...ethod_privatelinkresourceslist_autorest.go | 88 +++++++++---------- ...sharedprivatelinkresourceslist_autorest.go | 88 +++++++++---------- .../signalr/method_usageslist_autorest.go | 88 +++++++++---------- .../method_list_autorest.go | 88 +++++++++---------- .../method_listbyresourcegroup_autorest.go | 88 +++++++++---------- .../method_listbysqlvmgroup_autorest.go | 88 +++++++++---------- .../method_accesspolicieslist_autorest.go | 88 +++++++++---------- .../method_edgemoduleslist_autorest.go | 88 +++++++++---------- .../method_videoslist_autorest.go | 88 +++++++++---------- .../authorizations/method_list_autorest.go | 88 +++++++++---------- .../clusters/method_list_autorest.go | 88 +++++++++---------- .../privateclouds/method_list_autorest.go | 88 +++++++++---------- .../method_listinsubscription_autorest.go | 88 +++++++++---------- vendor/modules.txt | 2 +- 181 files changed, 7664 insertions(+), 7660 deletions(-) diff --git a/go.mod b/go.mod index d329bd769eb8..ab5a369f88e2 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/google/go-cmp v0.5.8 github.com/google/uuid v1.1.2 github.com/hashicorp/go-azure-helpers v0.37.0 - github.com/hashicorp/go-azure-sdk v0.20220805.1100614 + github.com/hashicorp/go-azure-sdk v0.20220809.1122626 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.6.0 diff --git a/go.sum b/go.sum index 81bfb6a5e8aa..4a273c2b844c 100644 --- a/go.sum +++ b/go.sum @@ -216,8 +216,8 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg= github.com/hashicorp/go-azure-helpers v0.37.0 h1:6UOoQ9esE4MJ4wHJr21qU81IJQ9zsXQ9FbANYUbeE4U= github.com/hashicorp/go-azure-helpers v0.37.0/go.mod h1:gcutZ/Hf/O7YN9M3UIvyZ9l0Rxv7Yrc9x5sSfM9cuSw= -github.com/hashicorp/go-azure-sdk v0.20220805.1100614 h1:5pR7Uo0iH3em5iEmbN+t9tlAtSmZspU+0kmBNeTIcw0= -github.com/hashicorp/go-azure-sdk v0.20220805.1100614/go.mod h1:yjQPw8DCOtQR8E8+FNaTxF6yz+tyQGkDNiVAGCNoLOo= +github.com/hashicorp/go-azure-sdk v0.20220809.1122626 h1:HEl1iGprDRxZyqsIrfCYKZhDHF2rt4djYy2pyi/glmM= +github.com/hashicorp/go-azure-sdk v0.20220809.1122626/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-sdk/resource-manager/aad/2021-05-01/domainservices/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_list_autorest.go index 9331419d43c5..a099e99b306d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_list_autorest.go @@ -60,50 +60,6 @@ func (c DomainServicesClient) List(ctx context.Context, id commonids.Subscriptio return } -// ListComplete retrieves all of the results into a single object -func (c DomainServicesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, DomainServiceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DomainServicesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DomainServiceOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]DomainService, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c DomainServicesClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c DomainServicesClient) responderForList(resp *http.Response) (result List } return } + +// ListComplete retrieves all of the results into a single object +func (c DomainServicesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, DomainServiceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DomainServicesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DomainServiceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]DomainService, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_listbyresourcegroup_autorest.go index e454a0fc1702..60c33a8fabbd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c DomainServicesClient) ListByResourceGroup(ctx context.Context, id common return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c DomainServicesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DomainServiceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DomainServicesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DomainServiceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]DomainService, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c DomainServicesClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c DomainServicesClient) responderForListByResourceGroup(resp *http.Respons } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c DomainServicesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DomainServiceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DomainServicesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DomainServiceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]DomainService, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_listbyresourcegroup_autorest.go index c16c29001c9f..0a907d86aa53 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c TenantsClient) ListByResourceGroup(ctx context.Context, id commonids.Res return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c TenantsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, TenantOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c TenantsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate TenantOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]Tenant, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c TenantsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c TenantsClient) responderForListByResourceGroup(resp *http.Response) (res } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c TenantsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, TenantOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c TenantsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate TenantOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]Tenant, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_listbysubscription_autorest.go index e41653925e2d..5716d14ea91a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c TenantsClient) ListBySubscription(ctx context.Context, id commonids.Subs return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c TenantsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, TenantOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c TenantsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate TenantOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]Tenant, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c TenantsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c TenantsClient) responderForListBySubscription(resp *http.Response) (resu } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c TenantsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, TenantOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c TenantsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate TenantOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]Tenant, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_list_autorest.go index 1cf6264b5b35..ce758ae47bdd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_list_autorest.go @@ -60,50 +60,6 @@ func (c ConfigurationStoresClient) List(ctx context.Context, id commonids.Subscr return } -// ListComplete retrieves all of the results into a single object -func (c ConfigurationStoresClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ConfigurationStoreOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ConfigurationStoresClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ConfigurationStoreOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]ConfigurationStore, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c ConfigurationStoresClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ConfigurationStoresClient) responderForList(resp *http.Response) (result } return } + +// ListComplete retrieves all of the results into a single object +func (c ConfigurationStoresClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ConfigurationStoreOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ConfigurationStoresClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ConfigurationStoreOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]ConfigurationStore, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_listbyresourcegroup_autorest.go index 06c80ed42a17..b81a99487700 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ConfigurationStoresClient) ListByResourceGroup(ctx context.Context, id c return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c ConfigurationStoresClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ConfigurationStoreOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ConfigurationStoresClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ConfigurationStoreOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]ConfigurationStore, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c ConfigurationStoresClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ConfigurationStoresClient) responderForListByResourceGroup(resp *http.Re } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c ConfigurationStoresClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ConfigurationStoreOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ConfigurationStoresClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ConfigurationStoreOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]ConfigurationStore, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_listkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_listkeys_autorest.go index 0220a22f719b..561594e58940 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_listkeys_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2022-05-01/configurationstores/method_listkeys_autorest.go @@ -59,50 +59,6 @@ func (c ConfigurationStoresClient) ListKeys(ctx context.Context, id Configuratio return } -// ListKeysComplete retrieves all of the results into a single object -func (c ConfigurationStoresClient) ListKeysComplete(ctx context.Context, id ConfigurationStoreId) (ListKeysCompleteResult, error) { - return c.ListKeysCompleteMatchingPredicate(ctx, id, ApiKeyOperationPredicate{}) -} - -// ListKeysCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ConfigurationStoresClient) ListKeysCompleteMatchingPredicate(ctx context.Context, id ConfigurationStoreId, predicate ApiKeyOperationPredicate) (resp ListKeysCompleteResult, err error) { - items := make([]ApiKey, 0) - - page, err := c.ListKeys(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListKeysCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListKeys prepares the ListKeys request. func (c ConfigurationStoresClient) preparerForListKeys(ctx context.Context, id ConfigurationStoreId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ConfigurationStoresClient) responderForListKeys(resp *http.Response) (re } return } + +// ListKeysComplete retrieves all of the results into a single object +func (c ConfigurationStoresClient) ListKeysComplete(ctx context.Context, id ConfigurationStoreId) (ListKeysCompleteResult, error) { + return c.ListKeysCompleteMatchingPredicate(ctx, id, ApiKeyOperationPredicate{}) +} + +// ListKeysCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ConfigurationStoresClient) ListKeysCompleteMatchingPredicate(ctx context.Context, id ConfigurationStoreId, predicate ApiKeyOperationPredicate) (resp ListKeysCompleteResult, err error) { + items := make([]ApiKey, 0) + + page, err := c.ListKeys(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListKeysCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookslistbyresourcegroup_autorest.go index 4eb9e9d14f0d..5475c3b04e0f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookslistbyresourcegroup_autorest.go @@ -99,50 +99,6 @@ func (c ApplicationInsightsClient) WorkbooksListByResourceGroup(ctx context.Cont return } -// WorkbooksListByResourceGroupComplete retrieves all of the results into a single object -func (c ApplicationInsightsClient) WorkbooksListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options WorkbooksListByResourceGroupOperationOptions) (WorkbooksListByResourceGroupCompleteResult, error) { - return c.WorkbooksListByResourceGroupCompleteMatchingPredicate(ctx, id, options, WorkbookOperationPredicate{}) -} - -// WorkbooksListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ApplicationInsightsClient) WorkbooksListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options WorkbooksListByResourceGroupOperationOptions, predicate WorkbookOperationPredicate) (resp WorkbooksListByResourceGroupCompleteResult, err error) { - items := make([]Workbook, 0) - - page, err := c.WorkbooksListByResourceGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := WorkbooksListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForWorkbooksListByResourceGroup prepares the WorkbooksListByResourceGroup request. func (c ApplicationInsightsClient) preparerForWorkbooksListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options WorkbooksListByResourceGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -229,3 +185,47 @@ func (c ApplicationInsightsClient) responderForWorkbooksListByResourceGroup(resp } return } + +// WorkbooksListByResourceGroupComplete retrieves all of the results into a single object +func (c ApplicationInsightsClient) WorkbooksListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options WorkbooksListByResourceGroupOperationOptions) (WorkbooksListByResourceGroupCompleteResult, error) { + return c.WorkbooksListByResourceGroupCompleteMatchingPredicate(ctx, id, options, WorkbookOperationPredicate{}) +} + +// WorkbooksListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ApplicationInsightsClient) WorkbooksListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options WorkbooksListByResourceGroupOperationOptions, predicate WorkbookOperationPredicate) (resp WorkbooksListByResourceGroupCompleteResult, err error) { + items := make([]Workbook, 0) + + page, err := c.WorkbooksListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := WorkbooksListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookslistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookslistbysubscription_autorest.go index 91cdc7bac196..5e81e8096977 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookslistbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbookslistbysubscription_autorest.go @@ -94,50 +94,6 @@ func (c ApplicationInsightsClient) WorkbooksListBySubscription(ctx context.Conte return } -// WorkbooksListBySubscriptionComplete retrieves all of the results into a single object -func (c ApplicationInsightsClient) WorkbooksListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options WorkbooksListBySubscriptionOperationOptions) (WorkbooksListBySubscriptionCompleteResult, error) { - return c.WorkbooksListBySubscriptionCompleteMatchingPredicate(ctx, id, options, WorkbookOperationPredicate{}) -} - -// WorkbooksListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ApplicationInsightsClient) WorkbooksListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options WorkbooksListBySubscriptionOperationOptions, predicate WorkbookOperationPredicate) (resp WorkbooksListBySubscriptionCompleteResult, err error) { - items := make([]Workbook, 0) - - page, err := c.WorkbooksListBySubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := WorkbooksListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForWorkbooksListBySubscription prepares the WorkbooksListBySubscription request. func (c ApplicationInsightsClient) preparerForWorkbooksListBySubscription(ctx context.Context, id commonids.SubscriptionId, options WorkbooksListBySubscriptionOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -224,3 +180,47 @@ func (c ApplicationInsightsClient) responderForWorkbooksListBySubscription(resp } return } + +// WorkbooksListBySubscriptionComplete retrieves all of the results into a single object +func (c ApplicationInsightsClient) WorkbooksListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options WorkbooksListBySubscriptionOperationOptions) (WorkbooksListBySubscriptionCompleteResult, error) { + return c.WorkbooksListBySubscriptionCompleteMatchingPredicate(ctx, id, options, WorkbookOperationPredicate{}) +} + +// WorkbooksListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ApplicationInsightsClient) WorkbooksListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options WorkbooksListBySubscriptionOperationOptions, predicate WorkbookOperationPredicate) (resp WorkbooksListBySubscriptionCompleteResult, err error) { + items := make([]Workbook, 0) + + page, err := c.WorkbooksListBySubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := WorkbooksListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksrevisionslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksrevisionslist_autorest.go index 479abe53eb7b..0fb28e92358b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksrevisionslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/applicationinsights/method_workbooksrevisionslist_autorest.go @@ -59,50 +59,6 @@ func (c ApplicationInsightsClient) WorkbooksRevisionsList(ctx context.Context, i return } -// WorkbooksRevisionsListComplete retrieves all of the results into a single object -func (c ApplicationInsightsClient) WorkbooksRevisionsListComplete(ctx context.Context, id WorkbookId) (WorkbooksRevisionsListCompleteResult, error) { - return c.WorkbooksRevisionsListCompleteMatchingPredicate(ctx, id, WorkbookOperationPredicate{}) -} - -// WorkbooksRevisionsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ApplicationInsightsClient) WorkbooksRevisionsListCompleteMatchingPredicate(ctx context.Context, id WorkbookId, predicate WorkbookOperationPredicate) (resp WorkbooksRevisionsListCompleteResult, err error) { - items := make([]Workbook, 0) - - page, err := c.WorkbooksRevisionsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := WorkbooksRevisionsListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForWorkbooksRevisionsList prepares the WorkbooksRevisionsList request. func (c ApplicationInsightsClient) preparerForWorkbooksRevisionsList(ctx context.Context, id WorkbookId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ApplicationInsightsClient) responderForWorkbooksRevisionsList(resp *http } return } + +// WorkbooksRevisionsListComplete retrieves all of the results into a single object +func (c ApplicationInsightsClient) WorkbooksRevisionsListComplete(ctx context.Context, id WorkbookId) (WorkbooksRevisionsListCompleteResult, error) { + return c.WorkbooksRevisionsListCompleteMatchingPredicate(ctx, id, WorkbookOperationPredicate{}) +} + +// WorkbooksRevisionsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ApplicationInsightsClient) WorkbooksRevisionsListCompleteMatchingPredicate(ctx context.Context, id WorkbookId, predicate WorkbookOperationPredicate) (resp WorkbooksRevisionsListCompleteResult, err error) { + items := make([]Workbook, 0) + + page, err := c.WorkbooksRevisionsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := WorkbooksRevisionsListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_list_autorest.go index 3181d211e622..eeee92f3aeaf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_list_autorest.go @@ -60,50 +60,6 @@ func (c AutomationAccountClient) List(ctx context.Context, id commonids.Subscrip return } -// ListComplete retrieves all of the results into a single object -func (c AutomationAccountClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, AutomationAccountOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AutomationAccountClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AutomationAccountOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]AutomationAccount, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c AutomationAccountClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AutomationAccountClient) responderForList(resp *http.Response) (result L } return } + +// ListComplete retrieves all of the results into a single object +func (c AutomationAccountClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, AutomationAccountOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AutomationAccountClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AutomationAccountOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]AutomationAccount, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_listbyresourcegroup_autorest.go index dd5097b76496..9b7d0e540053 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c AutomationAccountClient) ListByResourceGroup(ctx context.Context, id com return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c AutomationAccountClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, AutomationAccountOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AutomationAccountClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AutomationAccountOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]AutomationAccount, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c AutomationAccountClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AutomationAccountClient) responderForListByResourceGroup(resp *http.Resp } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c AutomationAccountClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, AutomationAccountOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AutomationAccountClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AutomationAccountOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]AutomationAccount, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_listbyresourcegroup_autorest.go index d38feca2caa8..2e68a700b667 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ClustersClient) ListByResourceGroup(ctx context.Context, id commonids.Re return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c ClustersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]Cluster, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c ClustersClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ClustersClient) responderForListByResourceGroup(resp *http.Response) (re } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c ClustersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]Cluster, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_listbysubscription_autorest.go index d3fb93a6cce0..a3c34eaa0f8f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c ClustersClient) ListBySubscription(ctx context.Context, id commonids.Sub return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c ClustersClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ClustersClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]Cluster, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c ClustersClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ClustersClient) responderForListBySubscription(resp *http.Response) (res } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c ClustersClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ClustersClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]Cluster, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslist_autorest.go index 089d076e1e27..ce1b94c20acd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslist_autorest.go @@ -60,50 +60,6 @@ func (c CognitiveServicesAccountsClient) AccountsList(ctx context.Context, id co return } -// AccountsListComplete retrieves all of the results into a single object -func (c CognitiveServicesAccountsClient) AccountsListComplete(ctx context.Context, id commonids.SubscriptionId) (AccountsListCompleteResult, error) { - return c.AccountsListCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) -} - -// AccountsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c CognitiveServicesAccountsClient) AccountsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AccountOperationPredicate) (resp AccountsListCompleteResult, err error) { - items := make([]Account, 0) - - page, err := c.AccountsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := AccountsListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForAccountsList prepares the AccountsList request. func (c CognitiveServicesAccountsClient) preparerForAccountsList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c CognitiveServicesAccountsClient) responderForAccountsList(resp *http.Res } return } + +// AccountsListComplete retrieves all of the results into a single object +func (c CognitiveServicesAccountsClient) AccountsListComplete(ctx context.Context, id commonids.SubscriptionId) (AccountsListCompleteResult, error) { + return c.AccountsListCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) +} + +// AccountsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c CognitiveServicesAccountsClient) AccountsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AccountOperationPredicate) (resp AccountsListCompleteResult, err error) { + items := make([]Account, 0) + + page, err := c.AccountsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := AccountsListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistbyresourcegroup_autorest.go index ab777e215567..56d365da4193 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_accountslistbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c CognitiveServicesAccountsClient) AccountsListByResourceGroup(ctx context return } -// AccountsListByResourceGroupComplete retrieves all of the results into a single object -func (c CognitiveServicesAccountsClient) AccountsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (AccountsListByResourceGroupCompleteResult, error) { - return c.AccountsListByResourceGroupCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) -} - -// AccountsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c CognitiveServicesAccountsClient) AccountsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AccountOperationPredicate) (resp AccountsListByResourceGroupCompleteResult, err error) { - items := make([]Account, 0) - - page, err := c.AccountsListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := AccountsListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForAccountsListByResourceGroup prepares the AccountsListByResourceGroup request. func (c CognitiveServicesAccountsClient) preparerForAccountsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c CognitiveServicesAccountsClient) responderForAccountsListByResourceGroup } return } + +// AccountsListByResourceGroupComplete retrieves all of the results into a single object +func (c CognitiveServicesAccountsClient) AccountsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (AccountsListByResourceGroupCompleteResult, error) { + return c.AccountsListByResourceGroupCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) +} + +// AccountsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c CognitiveServicesAccountsClient) AccountsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AccountOperationPredicate) (resp AccountsListByResourceGroupCompleteResult, err error) { + items := make([]Account, 0) + + page, err := c.AccountsListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := AccountsListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountslist_autorest.go index c94c2fe56659..8b6d8f246fc8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_deletedaccountslist_autorest.go @@ -60,50 +60,6 @@ func (c CognitiveServicesAccountsClient) DeletedAccountsList(ctx context.Context return } -// DeletedAccountsListComplete retrieves all of the results into a single object -func (c CognitiveServicesAccountsClient) DeletedAccountsListComplete(ctx context.Context, id commonids.SubscriptionId) (DeletedAccountsListCompleteResult, error) { - return c.DeletedAccountsListCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) -} - -// DeletedAccountsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c CognitiveServicesAccountsClient) DeletedAccountsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AccountOperationPredicate) (resp DeletedAccountsListCompleteResult, err error) { - items := make([]Account, 0) - - page, err := c.DeletedAccountsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := DeletedAccountsListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForDeletedAccountsList prepares the DeletedAccountsList request. func (c CognitiveServicesAccountsClient) preparerForDeletedAccountsList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c CognitiveServicesAccountsClient) responderForDeletedAccountsList(resp *h } return } + +// DeletedAccountsListComplete retrieves all of the results into a single object +func (c CognitiveServicesAccountsClient) DeletedAccountsListComplete(ctx context.Context, id commonids.SubscriptionId) (DeletedAccountsListCompleteResult, error) { + return c.DeletedAccountsListCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) +} + +// DeletedAccountsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c CognitiveServicesAccountsClient) DeletedAccountsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AccountOperationPredicate) (resp DeletedAccountsListCompleteResult, err error) { + items := make([]Account, 0) + + page, err := c.DeletedAccountsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := DeletedAccountsListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_resourceskuslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_resourceskuslist_autorest.go index 5d84bbfcf0bb..e63e9e0526db 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_resourceskuslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts/method_resourceskuslist_autorest.go @@ -60,50 +60,6 @@ func (c CognitiveServicesAccountsClient) ResourceSkusList(ctx context.Context, i return } -// ResourceSkusListComplete retrieves all of the results into a single object -func (c CognitiveServicesAccountsClient) ResourceSkusListComplete(ctx context.Context, id commonids.SubscriptionId) (ResourceSkusListCompleteResult, error) { - return c.ResourceSkusListCompleteMatchingPredicate(ctx, id, ResourceSkuOperationPredicate{}) -} - -// ResourceSkusListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c CognitiveServicesAccountsClient) ResourceSkusListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ResourceSkuOperationPredicate) (resp ResourceSkusListCompleteResult, err error) { - items := make([]ResourceSku, 0) - - page, err := c.ResourceSkusList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ResourceSkusListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForResourceSkusList prepares the ResourceSkusList request. func (c CognitiveServicesAccountsClient) preparerForResourceSkusList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c CognitiveServicesAccountsClient) responderForResourceSkusList(resp *http } return } + +// ResourceSkusListComplete retrieves all of the results into a single object +func (c CognitiveServicesAccountsClient) ResourceSkusListComplete(ctx context.Context, id commonids.SubscriptionId) (ResourceSkusListCompleteResult, error) { + return c.ResourceSkusListCompleteMatchingPredicate(ctx, id, ResourceSkuOperationPredicate{}) +} + +// ResourceSkusListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c CognitiveServicesAccountsClient) ResourceSkusListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ResourceSkuOperationPredicate) (resp ResourceSkusListCompleteResult, err error) { + items := make([]ResourceSku, 0) + + page, err := c.ResourceSkusList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ResourceSkusListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listbyresourcegroup_autorest.go index b6d1fdc48d5c..873c1ec89725 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c CommunicationServiceClient) ListByResourceGroup(ctx context.Context, id return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c CommunicationServiceClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, CommunicationServiceResourceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c CommunicationServiceClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CommunicationServiceResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]CommunicationServiceResource, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c CommunicationServiceClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c CommunicationServiceClient) responderForListByResourceGroup(resp *http.R } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c CommunicationServiceClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, CommunicationServiceResourceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c CommunicationServiceClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CommunicationServiceResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]CommunicationServiceResource, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listbysubscription_autorest.go index 19db52b43ddf..34dab3a026e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c CommunicationServiceClient) ListBySubscription(ctx context.Context, id c return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c CommunicationServiceClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, CommunicationServiceResourceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c CommunicationServiceClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate CommunicationServiceResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]CommunicationServiceResource, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c CommunicationServiceClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c CommunicationServiceClient) responderForListBySubscription(resp *http.Re } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c CommunicationServiceClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, CommunicationServiceResourceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c CommunicationServiceClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate CommunicationServiceResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]CommunicationServiceResource, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_list_autorest.go index 1deee2bda46c..514d9d77d44e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_list_autorest.go @@ -60,50 +60,6 @@ func (c AvailabilitySetsClient) List(ctx context.Context, id commonids.ResourceG return } -// ListComplete retrieves all of the results into a single object -func (c AvailabilitySetsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, AvailabilitySetOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AvailabilitySetsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AvailabilitySetOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]AvailabilitySet, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c AvailabilitySetsClient) preparerForList(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AvailabilitySetsClient) responderForList(resp *http.Response) (result Li } return } + +// ListComplete retrieves all of the results into a single object +func (c AvailabilitySetsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, AvailabilitySetOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AvailabilitySetsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AvailabilitySetOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]AvailabilitySet, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_listbysubscription_autorest.go index 2b7e026a0b9b..893de5ef1222 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/method_listbysubscription_autorest.go @@ -84,50 +84,6 @@ func (c AvailabilitySetsClient) ListBySubscription(ctx context.Context, id commo return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, AvailabilitySetOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AvailabilitySetsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate AvailabilitySetOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]AvailabilitySet, 0) - - page, err := c.ListBySubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c AvailabilitySetsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c AvailabilitySetsClient) responderForListBySubscription(resp *http.Respon } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, AvailabilitySetOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AvailabilitySetsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate AvailabilitySetOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]AvailabilitySet, 0) + + page, err := c.ListBySubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_listbyresourcegroup_autorest.go index a72c38571d5f..8a859ee11ab2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ProximityPlacementGroupsClient) ListByResourceGroup(ctx context.Context, return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c ProximityPlacementGroupsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ProximityPlacementGroupOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ProximityPlacementGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ProximityPlacementGroupOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]ProximityPlacementGroup, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c ProximityPlacementGroupsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ProximityPlacementGroupsClient) responderForListByResourceGroup(resp *ht } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c ProximityPlacementGroupsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ProximityPlacementGroupOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ProximityPlacementGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ProximityPlacementGroupOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]ProximityPlacementGroup, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_listbysubscription_autorest.go index f98e16a16328..83d00c465677 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c ProximityPlacementGroupsClient) ListBySubscription(ctx context.Context, return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c ProximityPlacementGroupsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, ProximityPlacementGroupOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ProximityPlacementGroupsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ProximityPlacementGroupOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]ProximityPlacementGroup, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c ProximityPlacementGroupsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ProximityPlacementGroupsClient) responderForListBySubscription(resp *htt } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c ProximityPlacementGroupsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, ProximityPlacementGroupOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ProximityPlacementGroupsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ProximityPlacementGroupOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]ProximityPlacementGroup, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_listbyresourcegroup_autorest.go index 96103a131fd3..1216c2eef892 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c SshPublicKeysClient) ListByResourceGroup(ctx context.Context, id commoni return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c SshPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SshPublicKeyResourceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SshPublicKeysClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SshPublicKeyResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]SshPublicKeyResource, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c SshPublicKeysClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c SshPublicKeysClient) responderForListByResourceGroup(resp *http.Response } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c SshPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SshPublicKeyResourceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SshPublicKeysClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SshPublicKeyResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]SshPublicKeyResource, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_listbysubscription_autorest.go index f43255ca14cd..7990abae0efe 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c SshPublicKeysClient) ListBySubscription(ctx context.Context, id commonid return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c SshPublicKeysClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, SshPublicKeyResourceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SshPublicKeysClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SshPublicKeyResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]SshPublicKeyResource, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c SshPublicKeysClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c SshPublicKeysClient) responderForListBySubscription(resp *http.Response) } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c SshPublicKeysClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, SshPublicKeyResourceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SshPublicKeysClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SshPublicKeyResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]SshPublicKeyResource, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbyresourcegroup_autorest.go index 61028fdd63b2..43ccdb80c091 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbyresourcegroup_autorest.go @@ -84,50 +84,6 @@ func (c ConfidentialLedgerClient) LedgerListByResourceGroup(ctx context.Context, return } -// LedgerListByResourceGroupComplete retrieves all of the results into a single object -func (c ConfidentialLedgerClient) LedgerListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options LedgerListByResourceGroupOperationOptions) (LedgerListByResourceGroupCompleteResult, error) { - return c.LedgerListByResourceGroupCompleteMatchingPredicate(ctx, id, options, ConfidentialLedgerOperationPredicate{}) -} - -// LedgerListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ConfidentialLedgerClient) LedgerListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options LedgerListByResourceGroupOperationOptions, predicate ConfidentialLedgerOperationPredicate) (resp LedgerListByResourceGroupCompleteResult, err error) { - items := make([]ConfidentialLedger, 0) - - page, err := c.LedgerListByResourceGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := LedgerListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForLedgerListByResourceGroup prepares the LedgerListByResourceGroup request. func (c ConfidentialLedgerClient) preparerForLedgerListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options LedgerListByResourceGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c ConfidentialLedgerClient) responderForLedgerListByResourceGroup(resp *ht } return } + +// LedgerListByResourceGroupComplete retrieves all of the results into a single object +func (c ConfidentialLedgerClient) LedgerListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options LedgerListByResourceGroupOperationOptions) (LedgerListByResourceGroupCompleteResult, error) { + return c.LedgerListByResourceGroupCompleteMatchingPredicate(ctx, id, options, ConfidentialLedgerOperationPredicate{}) +} + +// LedgerListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ConfidentialLedgerClient) LedgerListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options LedgerListByResourceGroupOperationOptions, predicate ConfidentialLedgerOperationPredicate) (resp LedgerListByResourceGroupCompleteResult, err error) { + items := make([]ConfidentialLedger, 0) + + page, err := c.LedgerListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := LedgerListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbysubscription_autorest.go index 4d43489ac975..af4bf35b1fe3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbysubscription_autorest.go @@ -84,50 +84,6 @@ func (c ConfidentialLedgerClient) LedgerListBySubscription(ctx context.Context, return } -// LedgerListBySubscriptionComplete retrieves all of the results into a single object -func (c ConfidentialLedgerClient) LedgerListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options LedgerListBySubscriptionOperationOptions) (LedgerListBySubscriptionCompleteResult, error) { - return c.LedgerListBySubscriptionCompleteMatchingPredicate(ctx, id, options, ConfidentialLedgerOperationPredicate{}) -} - -// LedgerListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ConfidentialLedgerClient) LedgerListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options LedgerListBySubscriptionOperationOptions, predicate ConfidentialLedgerOperationPredicate) (resp LedgerListBySubscriptionCompleteResult, err error) { - items := make([]ConfidentialLedger, 0) - - page, err := c.LedgerListBySubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := LedgerListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForLedgerListBySubscription prepares the LedgerListBySubscription request. func (c ConfidentialLedgerClient) preparerForLedgerListBySubscription(ctx context.Context, id commonids.SubscriptionId, options LedgerListBySubscriptionOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c ConfidentialLedgerClient) responderForLedgerListBySubscription(resp *htt } return } + +// LedgerListBySubscriptionComplete retrieves all of the results into a single object +func (c ConfidentialLedgerClient) LedgerListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options LedgerListBySubscriptionOperationOptions) (LedgerListBySubscriptionCompleteResult, error) { + return c.LedgerListBySubscriptionCompleteMatchingPredicate(ctx, id, options, ConfidentialLedgerOperationPredicate{}) +} + +// LedgerListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ConfidentialLedgerClient) LedgerListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options LedgerListBySubscriptionOperationOptions, predicate ConfidentialLedgerOperationPredicate) (resp LedgerListBySubscriptionCompleteResult, err error) { + items := make([]ConfidentialLedger, 0) + + page, err := c.LedgerListBySubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := LedgerListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupslist_autorest.go index b20598aa4ca4..4d0113e72a0e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupslist_autorest.go @@ -60,50 +60,6 @@ func (c ContainerInstanceClient) ContainerGroupsList(ctx context.Context, id com return } -// ContainerGroupsListComplete retrieves all of the results into a single object -func (c ContainerInstanceClient) ContainerGroupsListComplete(ctx context.Context, id commonids.SubscriptionId) (ContainerGroupsListCompleteResult, error) { - return c.ContainerGroupsListCompleteMatchingPredicate(ctx, id, ContainerGroupOperationPredicate{}) -} - -// ContainerGroupsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ContainerInstanceClient) ContainerGroupsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ContainerGroupOperationPredicate) (resp ContainerGroupsListCompleteResult, err error) { - items := make([]ContainerGroup, 0) - - page, err := c.ContainerGroupsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ContainerGroupsListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForContainerGroupsList prepares the ContainerGroupsList request. func (c ContainerInstanceClient) preparerForContainerGroupsList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ContainerInstanceClient) responderForContainerGroupsList(resp *http.Resp } return } + +// ContainerGroupsListComplete retrieves all of the results into a single object +func (c ContainerInstanceClient) ContainerGroupsListComplete(ctx context.Context, id commonids.SubscriptionId) (ContainerGroupsListCompleteResult, error) { + return c.ContainerGroupsListCompleteMatchingPredicate(ctx, id, ContainerGroupOperationPredicate{}) +} + +// ContainerGroupsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ContainerInstanceClient) ContainerGroupsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ContainerGroupOperationPredicate) (resp ContainerGroupsListCompleteResult, err error) { + items := make([]ContainerGroup, 0) + + page, err := c.ContainerGroupsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ContainerGroupsListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupslistbyresourcegroup_autorest.go index 105d7ee4bb44..67e4b1d8b492 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_containergroupslistbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ContainerInstanceClient) ContainerGroupsListByResourceGroup(ctx context. return } -// ContainerGroupsListByResourceGroupComplete retrieves all of the results into a single object -func (c ContainerInstanceClient) ContainerGroupsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ContainerGroupsListByResourceGroupCompleteResult, error) { - return c.ContainerGroupsListByResourceGroupCompleteMatchingPredicate(ctx, id, ContainerGroupOperationPredicate{}) -} - -// ContainerGroupsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ContainerInstanceClient) ContainerGroupsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ContainerGroupOperationPredicate) (resp ContainerGroupsListByResourceGroupCompleteResult, err error) { - items := make([]ContainerGroup, 0) - - page, err := c.ContainerGroupsListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ContainerGroupsListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForContainerGroupsListByResourceGroup prepares the ContainerGroupsListByResourceGroup request. func (c ContainerInstanceClient) preparerForContainerGroupsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ContainerInstanceClient) responderForContainerGroupsListByResourceGroup( } return } + +// ContainerGroupsListByResourceGroupComplete retrieves all of the results into a single object +func (c ContainerInstanceClient) ContainerGroupsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ContainerGroupsListByResourceGroupCompleteResult, error) { + return c.ContainerGroupsListByResourceGroupCompleteMatchingPredicate(ctx, id, ContainerGroupOperationPredicate{}) +} + +// ContainerGroupsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ContainerInstanceClient) ContainerGroupsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ContainerGroupOperationPredicate) (resp ContainerGroupsListByResourceGroupCompleteResult, err error) { + items := make([]ContainerGroup, 0) + + page, err := c.ContainerGroupsListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ContainerGroupsListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistcachedimages_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistcachedimages_autorest.go index 4f63c44fa76d..612c11dc940a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistcachedimages_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistcachedimages_autorest.go @@ -59,50 +59,6 @@ func (c ContainerInstanceClient) LocationListCachedImages(ctx context.Context, i return } -// LocationListCachedImagesComplete retrieves all of the results into a single object -func (c ContainerInstanceClient) LocationListCachedImagesComplete(ctx context.Context, id LocationId) (LocationListCachedImagesCompleteResult, error) { - return c.LocationListCachedImagesCompleteMatchingPredicate(ctx, id, CachedImagesOperationPredicate{}) -} - -// LocationListCachedImagesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ContainerInstanceClient) LocationListCachedImagesCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate CachedImagesOperationPredicate) (resp LocationListCachedImagesCompleteResult, err error) { - items := make([]CachedImages, 0) - - page, err := c.LocationListCachedImages(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := LocationListCachedImagesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForLocationListCachedImages prepares the LocationListCachedImages request. func (c ContainerInstanceClient) preparerForLocationListCachedImages(ctx context.Context, id LocationId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ContainerInstanceClient) responderForLocationListCachedImages(resp *http } return } + +// LocationListCachedImagesComplete retrieves all of the results into a single object +func (c ContainerInstanceClient) LocationListCachedImagesComplete(ctx context.Context, id LocationId) (LocationListCachedImagesCompleteResult, error) { + return c.LocationListCachedImagesCompleteMatchingPredicate(ctx, id, CachedImagesOperationPredicate{}) +} + +// LocationListCachedImagesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ContainerInstanceClient) LocationListCachedImagesCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate CachedImagesOperationPredicate) (resp LocationListCachedImagesCompleteResult, err error) { + items := make([]CachedImages, 0) + + page, err := c.LocationListCachedImages(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := LocationListCachedImagesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistcapabilities_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistcapabilities_autorest.go index 89047d6d87d8..473480935fef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistcapabilities_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance/method_locationlistcapabilities_autorest.go @@ -59,50 +59,6 @@ func (c ContainerInstanceClient) LocationListCapabilities(ctx context.Context, i return } -// LocationListCapabilitiesComplete retrieves all of the results into a single object -func (c ContainerInstanceClient) LocationListCapabilitiesComplete(ctx context.Context, id LocationId) (LocationListCapabilitiesCompleteResult, error) { - return c.LocationListCapabilitiesCompleteMatchingPredicate(ctx, id, CapabilitiesOperationPredicate{}) -} - -// LocationListCapabilitiesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ContainerInstanceClient) LocationListCapabilitiesCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate CapabilitiesOperationPredicate) (resp LocationListCapabilitiesCompleteResult, err error) { - items := make([]Capabilities, 0) - - page, err := c.LocationListCapabilities(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := LocationListCapabilitiesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForLocationListCapabilities prepares the LocationListCapabilities request. func (c ContainerInstanceClient) preparerForLocationListCapabilities(ctx context.Context, id LocationId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ContainerInstanceClient) responderForLocationListCapabilities(resp *http } return } + +// LocationListCapabilitiesComplete retrieves all of the results into a single object +func (c ContainerInstanceClient) LocationListCapabilitiesComplete(ctx context.Context, id LocationId) (LocationListCapabilitiesCompleteResult, error) { + return c.LocationListCapabilitiesCompleteMatchingPredicate(ctx, id, CapabilitiesOperationPredicate{}) +} + +// LocationListCapabilitiesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ContainerInstanceClient) LocationListCapabilitiesCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate CapabilitiesOperationPredicate) (resp LocationListCapabilitiesCompleteResult, err error) { + items := make([]Capabilities, 0) + + page, err := c.LocationListCapabilities(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := LocationListCapabilitiesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_listbyresourcegroup_autorest.go index 733e929d2475..d0a813176128 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c WorkspacesClient) ListByResourceGroup(ctx context.Context, id commonids. return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c WorkspacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, WorkspaceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c WorkspacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate WorkspaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]Workspace, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c WorkspacesClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c WorkspacesClient) responderForListByResourceGroup(resp *http.Response) ( } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c WorkspacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, WorkspaceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkspacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate WorkspaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]Workspace, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_listbysubscription_autorest.go index 335454f1e1fb..418bad379f48 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c WorkspacesClient) ListBySubscription(ctx context.Context, id commonids.S return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c WorkspacesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, WorkspaceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c WorkspacesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate WorkspaceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]Workspace, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c WorkspacesClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c WorkspacesClient) responderForListBySubscription(resp *http.Response) (r } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c WorkspacesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, WorkspaceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkspacesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate WorkspaceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]Workspace, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getbackupsecuritypinrequestsobjects_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getbackupsecuritypinrequestsobjects_autorest.go index 7b106b1ea4a6..71af337d7d48 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getbackupsecuritypinrequestsobjects_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getbackupsecuritypinrequestsobjects_autorest.go @@ -59,50 +59,6 @@ func (c ResourceGuardsClient) GetBackupSecurityPINRequestsObjects(ctx context.Co return } -// GetBackupSecurityPINRequestsObjectsComplete retrieves all of the results into a single object -func (c ResourceGuardsClient) GetBackupSecurityPINRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetBackupSecurityPINRequestsObjectsCompleteResult, error) { - return c.GetBackupSecurityPINRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) -} - -// GetBackupSecurityPINRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceGuardsClient) GetBackupSecurityPINRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetBackupSecurityPINRequestsObjectsCompleteResult, err error) { - items := make([]DppBaseResource, 0) - - page, err := c.GetBackupSecurityPINRequestsObjects(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := GetBackupSecurityPINRequestsObjectsCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForGetBackupSecurityPINRequestsObjects prepares the GetBackupSecurityPINRequestsObjects request. func (c ResourceGuardsClient) preparerForGetBackupSecurityPINRequestsObjects(ctx context.Context, id ResourceGuardId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ResourceGuardsClient) responderForGetBackupSecurityPINRequestsObjects(re } return } + +// GetBackupSecurityPINRequestsObjectsComplete retrieves all of the results into a single object +func (c ResourceGuardsClient) GetBackupSecurityPINRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetBackupSecurityPINRequestsObjectsCompleteResult, error) { + return c.GetBackupSecurityPINRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) +} + +// GetBackupSecurityPINRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceGuardsClient) GetBackupSecurityPINRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetBackupSecurityPINRequestsObjectsCompleteResult, err error) { + items := make([]DppBaseResource, 0) + + page, err := c.GetBackupSecurityPINRequestsObjects(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := GetBackupSecurityPINRequestsObjectsCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdeleteprotecteditemrequestsobjects_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdeleteprotecteditemrequestsobjects_autorest.go index 7c7db5fd1581..eb482c39b78c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdeleteprotecteditemrequestsobjects_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdeleteprotecteditemrequestsobjects_autorest.go @@ -59,50 +59,6 @@ func (c ResourceGuardsClient) GetDeleteProtectedItemRequestsObjects(ctx context. return } -// GetDeleteProtectedItemRequestsObjectsComplete retrieves all of the results into a single object -func (c ResourceGuardsClient) GetDeleteProtectedItemRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetDeleteProtectedItemRequestsObjectsCompleteResult, error) { - return c.GetDeleteProtectedItemRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) -} - -// GetDeleteProtectedItemRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceGuardsClient) GetDeleteProtectedItemRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetDeleteProtectedItemRequestsObjectsCompleteResult, err error) { - items := make([]DppBaseResource, 0) - - page, err := c.GetDeleteProtectedItemRequestsObjects(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := GetDeleteProtectedItemRequestsObjectsCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForGetDeleteProtectedItemRequestsObjects prepares the GetDeleteProtectedItemRequestsObjects request. func (c ResourceGuardsClient) preparerForGetDeleteProtectedItemRequestsObjects(ctx context.Context, id ResourceGuardId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ResourceGuardsClient) responderForGetDeleteProtectedItemRequestsObjects( } return } + +// GetDeleteProtectedItemRequestsObjectsComplete retrieves all of the results into a single object +func (c ResourceGuardsClient) GetDeleteProtectedItemRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetDeleteProtectedItemRequestsObjectsCompleteResult, error) { + return c.GetDeleteProtectedItemRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) +} + +// GetDeleteProtectedItemRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceGuardsClient) GetDeleteProtectedItemRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetDeleteProtectedItemRequestsObjectsCompleteResult, err error) { + items := make([]DppBaseResource, 0) + + page, err := c.GetDeleteProtectedItemRequestsObjects(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := GetDeleteProtectedItemRequestsObjectsCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdeleteresourceguardproxyrequestsobjects_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdeleteresourceguardproxyrequestsobjects_autorest.go index 3264161a6865..4f54beba9d44 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdeleteresourceguardproxyrequestsobjects_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdeleteresourceguardproxyrequestsobjects_autorest.go @@ -59,50 +59,6 @@ func (c ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjects(ctx con return } -// GetDeleteResourceGuardProxyRequestsObjectsComplete retrieves all of the results into a single object -func (c ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetDeleteResourceGuardProxyRequestsObjectsCompleteResult, error) { - return c.GetDeleteResourceGuardProxyRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) -} - -// GetDeleteResourceGuardProxyRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetDeleteResourceGuardProxyRequestsObjectsCompleteResult, err error) { - items := make([]DppBaseResource, 0) - - page, err := c.GetDeleteResourceGuardProxyRequestsObjects(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := GetDeleteResourceGuardProxyRequestsObjectsCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForGetDeleteResourceGuardProxyRequestsObjects prepares the GetDeleteResourceGuardProxyRequestsObjects request. func (c ResourceGuardsClient) preparerForGetDeleteResourceGuardProxyRequestsObjects(ctx context.Context, id ResourceGuardId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ResourceGuardsClient) responderForGetDeleteResourceGuardProxyRequestsObj } return } + +// GetDeleteResourceGuardProxyRequestsObjectsComplete retrieves all of the results into a single object +func (c ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetDeleteResourceGuardProxyRequestsObjectsCompleteResult, error) { + return c.GetDeleteResourceGuardProxyRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) +} + +// GetDeleteResourceGuardProxyRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceGuardsClient) GetDeleteResourceGuardProxyRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetDeleteResourceGuardProxyRequestsObjectsCompleteResult, err error) { + items := make([]DppBaseResource, 0) + + page, err := c.GetDeleteResourceGuardProxyRequestsObjects(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := GetDeleteResourceGuardProxyRequestsObjectsCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdisablesoftdeleterequestsobjects_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdisablesoftdeleterequestsobjects_autorest.go index 346f6fedc314..59ba0a661fc4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdisablesoftdeleterequestsobjects_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getdisablesoftdeleterequestsobjects_autorest.go @@ -59,50 +59,6 @@ func (c ResourceGuardsClient) GetDisableSoftDeleteRequestsObjects(ctx context.Co return } -// GetDisableSoftDeleteRequestsObjectsComplete retrieves all of the results into a single object -func (c ResourceGuardsClient) GetDisableSoftDeleteRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetDisableSoftDeleteRequestsObjectsCompleteResult, error) { - return c.GetDisableSoftDeleteRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) -} - -// GetDisableSoftDeleteRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceGuardsClient) GetDisableSoftDeleteRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetDisableSoftDeleteRequestsObjectsCompleteResult, err error) { - items := make([]DppBaseResource, 0) - - page, err := c.GetDisableSoftDeleteRequestsObjects(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := GetDisableSoftDeleteRequestsObjectsCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForGetDisableSoftDeleteRequestsObjects prepares the GetDisableSoftDeleteRequestsObjects request. func (c ResourceGuardsClient) preparerForGetDisableSoftDeleteRequestsObjects(ctx context.Context, id ResourceGuardId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ResourceGuardsClient) responderForGetDisableSoftDeleteRequestsObjects(re } return } + +// GetDisableSoftDeleteRequestsObjectsComplete retrieves all of the results into a single object +func (c ResourceGuardsClient) GetDisableSoftDeleteRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetDisableSoftDeleteRequestsObjectsCompleteResult, error) { + return c.GetDisableSoftDeleteRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) +} + +// GetDisableSoftDeleteRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceGuardsClient) GetDisableSoftDeleteRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetDisableSoftDeleteRequestsObjectsCompleteResult, err error) { + items := make([]DppBaseResource, 0) + + page, err := c.GetDisableSoftDeleteRequestsObjects(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := GetDisableSoftDeleteRequestsObjectsCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getresourcesinresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getresourcesinresourcegroup_autorest.go index a2130704fbe0..ed14f77871b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getresourcesinresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getresourcesinresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ResourceGuardsClient) GetResourcesInResourceGroup(ctx context.Context, i return } -// GetResourcesInResourceGroupComplete retrieves all of the results into a single object -func (c ResourceGuardsClient) GetResourcesInResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (GetResourcesInResourceGroupCompleteResult, error) { - return c.GetResourcesInResourceGroupCompleteMatchingPredicate(ctx, id, ResourceGuardResourceOperationPredicate{}) -} - -// GetResourcesInResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceGuardsClient) GetResourcesInResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ResourceGuardResourceOperationPredicate) (resp GetResourcesInResourceGroupCompleteResult, err error) { - items := make([]ResourceGuardResource, 0) - - page, err := c.GetResourcesInResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := GetResourcesInResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForGetResourcesInResourceGroup prepares the GetResourcesInResourceGroup request. func (c ResourceGuardsClient) preparerForGetResourcesInResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ResourceGuardsClient) responderForGetResourcesInResourceGroup(resp *http } return } + +// GetResourcesInResourceGroupComplete retrieves all of the results into a single object +func (c ResourceGuardsClient) GetResourcesInResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (GetResourcesInResourceGroupCompleteResult, error) { + return c.GetResourcesInResourceGroupCompleteMatchingPredicate(ctx, id, ResourceGuardResourceOperationPredicate{}) +} + +// GetResourcesInResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceGuardsClient) GetResourcesInResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ResourceGuardResourceOperationPredicate) (resp GetResourcesInResourceGroupCompleteResult, err error) { + items := make([]ResourceGuardResource, 0) + + page, err := c.GetResourcesInResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := GetResourcesInResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getresourcesinsubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getresourcesinsubscription_autorest.go index a18fcdbe280f..c0bd7de8e429 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getresourcesinsubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getresourcesinsubscription_autorest.go @@ -60,50 +60,6 @@ func (c ResourceGuardsClient) GetResourcesInSubscription(ctx context.Context, id return } -// GetResourcesInSubscriptionComplete retrieves all of the results into a single object -func (c ResourceGuardsClient) GetResourcesInSubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (GetResourcesInSubscriptionCompleteResult, error) { - return c.GetResourcesInSubscriptionCompleteMatchingPredicate(ctx, id, ResourceGuardResourceOperationPredicate{}) -} - -// GetResourcesInSubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceGuardsClient) GetResourcesInSubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ResourceGuardResourceOperationPredicate) (resp GetResourcesInSubscriptionCompleteResult, err error) { - items := make([]ResourceGuardResource, 0) - - page, err := c.GetResourcesInSubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := GetResourcesInSubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForGetResourcesInSubscription prepares the GetResourcesInSubscription request. func (c ResourceGuardsClient) preparerForGetResourcesInSubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ResourceGuardsClient) responderForGetResourcesInSubscription(resp *http. } return } + +// GetResourcesInSubscriptionComplete retrieves all of the results into a single object +func (c ResourceGuardsClient) GetResourcesInSubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (GetResourcesInSubscriptionCompleteResult, error) { + return c.GetResourcesInSubscriptionCompleteMatchingPredicate(ctx, id, ResourceGuardResourceOperationPredicate{}) +} + +// GetResourcesInSubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceGuardsClient) GetResourcesInSubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ResourceGuardResourceOperationPredicate) (resp GetResourcesInSubscriptionCompleteResult, err error) { + items := make([]ResourceGuardResource, 0) + + page, err := c.GetResourcesInSubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := GetResourcesInSubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getupdateprotecteditemrequestsobjects_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getupdateprotecteditemrequestsobjects_autorest.go index a6928f8f023f..0d1355e36b8b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getupdateprotecteditemrequestsobjects_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getupdateprotecteditemrequestsobjects_autorest.go @@ -59,50 +59,6 @@ func (c ResourceGuardsClient) GetUpdateProtectedItemRequestsObjects(ctx context. return } -// GetUpdateProtectedItemRequestsObjectsComplete retrieves all of the results into a single object -func (c ResourceGuardsClient) GetUpdateProtectedItemRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetUpdateProtectedItemRequestsObjectsCompleteResult, error) { - return c.GetUpdateProtectedItemRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) -} - -// GetUpdateProtectedItemRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceGuardsClient) GetUpdateProtectedItemRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetUpdateProtectedItemRequestsObjectsCompleteResult, err error) { - items := make([]DppBaseResource, 0) - - page, err := c.GetUpdateProtectedItemRequestsObjects(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := GetUpdateProtectedItemRequestsObjectsCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForGetUpdateProtectedItemRequestsObjects prepares the GetUpdateProtectedItemRequestsObjects request. func (c ResourceGuardsClient) preparerForGetUpdateProtectedItemRequestsObjects(ctx context.Context, id ResourceGuardId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ResourceGuardsClient) responderForGetUpdateProtectedItemRequestsObjects( } return } + +// GetUpdateProtectedItemRequestsObjectsComplete retrieves all of the results into a single object +func (c ResourceGuardsClient) GetUpdateProtectedItemRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetUpdateProtectedItemRequestsObjectsCompleteResult, error) { + return c.GetUpdateProtectedItemRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) +} + +// GetUpdateProtectedItemRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceGuardsClient) GetUpdateProtectedItemRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetUpdateProtectedItemRequestsObjectsCompleteResult, err error) { + items := make([]DppBaseResource, 0) + + page, err := c.GetUpdateProtectedItemRequestsObjects(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := GetUpdateProtectedItemRequestsObjectsCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getupdateprotectionpolicyrequestsobjects_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getupdateprotectionpolicyrequestsobjects_autorest.go index aa74751d4055..af27fd482983 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getupdateprotectionpolicyrequestsobjects_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/method_getupdateprotectionpolicyrequestsobjects_autorest.go @@ -59,50 +59,6 @@ func (c ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjects(ctx conte return } -// GetUpdateProtectionPolicyRequestsObjectsComplete retrieves all of the results into a single object -func (c ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetUpdateProtectionPolicyRequestsObjectsCompleteResult, error) { - return c.GetUpdateProtectionPolicyRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) -} - -// GetUpdateProtectionPolicyRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetUpdateProtectionPolicyRequestsObjectsCompleteResult, err error) { - items := make([]DppBaseResource, 0) - - page, err := c.GetUpdateProtectionPolicyRequestsObjects(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := GetUpdateProtectionPolicyRequestsObjectsCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForGetUpdateProtectionPolicyRequestsObjects prepares the GetUpdateProtectionPolicyRequestsObjects request. func (c ResourceGuardsClient) preparerForGetUpdateProtectionPolicyRequestsObjects(ctx context.Context, id ResourceGuardId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ResourceGuardsClient) responderForGetUpdateProtectionPolicyRequestsObjec } return } + +// GetUpdateProtectionPolicyRequestsObjectsComplete retrieves all of the results into a single object +func (c ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjectsComplete(ctx context.Context, id ResourceGuardId) (GetUpdateProtectionPolicyRequestsObjectsCompleteResult, error) { + return c.GetUpdateProtectionPolicyRequestsObjectsCompleteMatchingPredicate(ctx, id, DppBaseResourceOperationPredicate{}) +} + +// GetUpdateProtectionPolicyRequestsObjectsCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceGuardsClient) GetUpdateProtectionPolicyRequestsObjectsCompleteMatchingPredicate(ctx context.Context, id ResourceGuardId, predicate DppBaseResourceOperationPredicate) (resp GetUpdateProtectionPolicyRequestsObjectsCompleteResult, err error) { + items := make([]DppBaseResource, 0) + + page, err := c.GetUpdateProtectionPolicyRequestsObjects(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := GetUpdateProtectionPolicyRequestsObjectsCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_list_autorest.go index 6810fcb17197..b4c6a96b660d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_list_autorest.go @@ -59,50 +59,6 @@ func (c ApplicationClient) List(ctx context.Context, id ApplicationGroupId) (res return } -// ListComplete retrieves all of the results into a single object -func (c ApplicationClient) ListComplete(ctx context.Context, id ApplicationGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ApplicationClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationGroupId, predicate ApplicationOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]Application, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c ApplicationClient) preparerForList(ctx context.Context, id ApplicationGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ApplicationClient) responderForList(resp *http.Response) (result ListOpe } return } + +// ListComplete retrieves all of the results into a single object +func (c ApplicationClient) ListComplete(ctx context.Context, id ApplicationGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ApplicationOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ApplicationClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationGroupId, predicate ApplicationOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]Application, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbyresourcegroup_autorest.go index 16186a1f419c..cbb565df7316 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbyresourcegroup_autorest.go @@ -84,50 +84,6 @@ func (c ApplicationGroupClient) ListByResourceGroup(ctx context.Context, id comm return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c ApplicationGroupClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, ApplicationGroupOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ApplicationGroupClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate ApplicationGroupOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]ApplicationGroup, 0) - - page, err := c.ListByResourceGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c ApplicationGroupClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c ApplicationGroupClient) responderForListByResourceGroup(resp *http.Respo } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c ApplicationGroupClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, ApplicationGroupOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ApplicationGroupClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate ApplicationGroupOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]ApplicationGroup, 0) + + page, err := c.ListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbysubscription_autorest.go index 18a438e150db..fb72370186b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbysubscription_autorest.go @@ -84,50 +84,6 @@ func (c ApplicationGroupClient) ListBySubscription(ctx context.Context, id commo return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c ApplicationGroupClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, ApplicationGroupOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ApplicationGroupClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate ApplicationGroupOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]ApplicationGroup, 0) - - page, err := c.ListBySubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c ApplicationGroupClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c ApplicationGroupClient) responderForListBySubscription(resp *http.Respon } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c ApplicationGroupClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, ApplicationGroupOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ApplicationGroupClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate ApplicationGroupOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]ApplicationGroup, 0) + + page, err := c.ListBySubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_list_autorest.go index 145ff8981ddb..111e71e4903d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_list_autorest.go @@ -59,50 +59,6 @@ func (c DesktopClient) List(ctx context.Context, id ApplicationGroupId) (resp Li return } -// ListComplete retrieves all of the results into a single object -func (c DesktopClient) ListComplete(ctx context.Context, id ApplicationGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, DesktopOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DesktopClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationGroupId, predicate DesktopOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]Desktop, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c DesktopClient) preparerForList(ctx context.Context, id ApplicationGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c DesktopClient) responderForList(resp *http.Response) (result ListOperati } return } + +// ListComplete retrieves all of the results into a single object +func (c DesktopClient) ListComplete(ctx context.Context, id ApplicationGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, DesktopOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DesktopClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationGroupId, predicate DesktopOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]Desktop, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_list_autorest.go index d776af10f11c..8beed4ef109d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_list_autorest.go @@ -60,50 +60,6 @@ func (c HostPoolClient) List(ctx context.Context, id commonids.SubscriptionId) ( return } -// ListComplete retrieves all of the results into a single object -func (c HostPoolClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, HostPoolOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c HostPoolClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate HostPoolOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]HostPool, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c HostPoolClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c HostPoolClient) responderForList(resp *http.Response) (result ListOperat } return } + +// ListComplete retrieves all of the results into a single object +func (c HostPoolClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, HostPoolOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c HostPoolClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate HostPoolOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]HostPool, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_listbyresourcegroup_autorest.go index 10e2fdbcb630..383730dacb00 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c HostPoolClient) ListByResourceGroup(ctx context.Context, id commonids.Re return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c HostPoolClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, HostPoolOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c HostPoolClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate HostPoolOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]HostPool, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c HostPoolClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c HostPoolClient) responderForListByResourceGroup(resp *http.Response) (re } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c HostPoolClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, HostPoolOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c HostPoolClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate HostPoolOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]HostPool, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbyhostpool_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbyhostpool_autorest.go index b60add783d35..011325451e33 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbyhostpool_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbyhostpool_autorest.go @@ -59,50 +59,6 @@ func (c ScalingPlanClient) ListByHostPool(ctx context.Context, id HostPoolId) (r return } -// ListByHostPoolComplete retrieves all of the results into a single object -func (c ScalingPlanClient) ListByHostPoolComplete(ctx context.Context, id HostPoolId) (ListByHostPoolCompleteResult, error) { - return c.ListByHostPoolCompleteMatchingPredicate(ctx, id, ScalingPlanOperationPredicate{}) -} - -// ListByHostPoolCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ScalingPlanClient) ListByHostPoolCompleteMatchingPredicate(ctx context.Context, id HostPoolId, predicate ScalingPlanOperationPredicate) (resp ListByHostPoolCompleteResult, err error) { - items := make([]ScalingPlan, 0) - - page, err := c.ListByHostPool(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByHostPoolCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByHostPool prepares the ListByHostPool request. func (c ScalingPlanClient) preparerForListByHostPool(ctx context.Context, id HostPoolId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ScalingPlanClient) responderForListByHostPool(resp *http.Response) (resu } return } + +// ListByHostPoolComplete retrieves all of the results into a single object +func (c ScalingPlanClient) ListByHostPoolComplete(ctx context.Context, id HostPoolId) (ListByHostPoolCompleteResult, error) { + return c.ListByHostPoolCompleteMatchingPredicate(ctx, id, ScalingPlanOperationPredicate{}) +} + +// ListByHostPoolCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ScalingPlanClient) ListByHostPoolCompleteMatchingPredicate(ctx context.Context, id HostPoolId, predicate ScalingPlanOperationPredicate) (resp ListByHostPoolCompleteResult, err error) { + items := make([]ScalingPlan, 0) + + page, err := c.ListByHostPool(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByHostPoolCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbyresourcegroup_autorest.go index 81cad260899e..766861da9ac6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ScalingPlanClient) ListByResourceGroup(ctx context.Context, id commonids return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c ScalingPlanClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ScalingPlanOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ScalingPlanClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ScalingPlanOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]ScalingPlan, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c ScalingPlanClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ScalingPlanClient) responderForListByResourceGroup(resp *http.Response) } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c ScalingPlanClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ScalingPlanOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ScalingPlanClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ScalingPlanOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]ScalingPlan, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbysubscription_autorest.go index aa6c7049d5a5..c1c4470b67d8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c ScalingPlanClient) ListBySubscription(ctx context.Context, id commonids. return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c ScalingPlanClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, ScalingPlanOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ScalingPlanClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ScalingPlanOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]ScalingPlan, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c ScalingPlanClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ScalingPlanClient) responderForListBySubscription(resp *http.Response) ( } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c ScalingPlanClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, ScalingPlanOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ScalingPlanClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ScalingPlanOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]ScalingPlan, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_list_autorest.go index 5d42759afa68..e1a8d5575dd4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_list_autorest.go @@ -59,50 +59,6 @@ func (c SessionHostClient) List(ctx context.Context, id HostPoolId) (resp ListOp return } -// ListComplete retrieves all of the results into a single object -func (c SessionHostClient) ListComplete(ctx context.Context, id HostPoolId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, SessionHostOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SessionHostClient) ListCompleteMatchingPredicate(ctx context.Context, id HostPoolId, predicate SessionHostOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]SessionHost, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c SessionHostClient) preparerForList(ctx context.Context, id HostPoolId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c SessionHostClient) responderForList(resp *http.Response) (result ListOpe } return } + +// ListComplete retrieves all of the results into a single object +func (c SessionHostClient) ListComplete(ctx context.Context, id HostPoolId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, SessionHostOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SessionHostClient) ListCompleteMatchingPredicate(ctx context.Context, id HostPoolId, predicate SessionHostOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]SessionHost, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_listbyresourcegroup_autorest.go index 426896e95418..996387ce4990 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c WorkspaceClient) ListByResourceGroup(ctx context.Context, id commonids.R return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c WorkspaceClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, WorkspaceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c WorkspaceClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate WorkspaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]Workspace, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c WorkspaceClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c WorkspaceClient) responderForListByResourceGroup(resp *http.Response) (r } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c WorkspaceClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, WorkspaceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkspaceClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate WorkspaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]Workspace, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_listbysubscription_autorest.go index 6ab5742aa3f6..f54b1fb98e78 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c WorkspaceClient) ListBySubscription(ctx context.Context, id commonids.Su return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c WorkspaceClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, WorkspaceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c WorkspaceClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate WorkspaceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]Workspace, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c WorkspaceClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c WorkspaceClient) responderForListBySubscription(resp *http.Response) (re } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c WorkspaceClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, WorkspaceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkspaceClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate WorkspaceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]Workspace, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorslist_autorest.go index 1aa4bfbcf760..858b88ba8b8a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorslist_autorest.go @@ -60,50 +60,6 @@ func (c MonitorsResourceClient) MonitorsList(ctx context.Context, id commonids.S return } -// MonitorsListComplete retrieves all of the results into a single object -func (c MonitorsResourceClient) MonitorsListComplete(ctx context.Context, id commonids.SubscriptionId) (MonitorsListCompleteResult, error) { - return c.MonitorsListCompleteMatchingPredicate(ctx, id, ElasticMonitorResourceOperationPredicate{}) -} - -// MonitorsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c MonitorsResourceClient) MonitorsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ElasticMonitorResourceOperationPredicate) (resp MonitorsListCompleteResult, err error) { - items := make([]ElasticMonitorResource, 0) - - page, err := c.MonitorsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := MonitorsListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForMonitorsList prepares the MonitorsList request. func (c MonitorsResourceClient) preparerForMonitorsList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c MonitorsResourceClient) responderForMonitorsList(resp *http.Response) (r } return } + +// MonitorsListComplete retrieves all of the results into a single object +func (c MonitorsResourceClient) MonitorsListComplete(ctx context.Context, id commonids.SubscriptionId) (MonitorsListCompleteResult, error) { + return c.MonitorsListCompleteMatchingPredicate(ctx, id, ElasticMonitorResourceOperationPredicate{}) +} + +// MonitorsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c MonitorsResourceClient) MonitorsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ElasticMonitorResourceOperationPredicate) (resp MonitorsListCompleteResult, err error) { + items := make([]ElasticMonitorResource, 0) + + page, err := c.MonitorsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := MonitorsListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorslistbyresourcegroup_autorest.go index bcca62a1e472..016eb93dd562 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource/method_monitorslistbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c MonitorsResourceClient) MonitorsListByResourceGroup(ctx context.Context, return } -// MonitorsListByResourceGroupComplete retrieves all of the results into a single object -func (c MonitorsResourceClient) MonitorsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (MonitorsListByResourceGroupCompleteResult, error) { - return c.MonitorsListByResourceGroupCompleteMatchingPredicate(ctx, id, ElasticMonitorResourceOperationPredicate{}) -} - -// MonitorsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c MonitorsResourceClient) MonitorsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ElasticMonitorResourceOperationPredicate) (resp MonitorsListByResourceGroupCompleteResult, err error) { - items := make([]ElasticMonitorResource, 0) - - page, err := c.MonitorsListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := MonitorsListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForMonitorsListByResourceGroup prepares the MonitorsListByResourceGroup request. func (c MonitorsResourceClient) preparerForMonitorsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c MonitorsResourceClient) responderForMonitorsListByResourceGroup(resp *ht } return } + +// MonitorsListByResourceGroupComplete retrieves all of the results into a single object +func (c MonitorsResourceClient) MonitorsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (MonitorsListByResourceGroupCompleteResult, error) { + return c.MonitorsListByResourceGroupCompleteMatchingPredicate(ctx, id, ElasticMonitorResourceOperationPredicate{}) +} + +// MonitorsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c MonitorsResourceClient) MonitorsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ElasticMonitorResourceOperationPredicate) (resp MonitorsListByResourceGroupCompleteResult, err error) { + items := make([]ElasticMonitorResource, 0) + + page, err := c.MonitorsListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := MonitorsListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagruleslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagruleslist_autorest.go index b97a7f2cda4d..6f2cbc36fc4c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagruleslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules/method_tagruleslist_autorest.go @@ -59,50 +59,6 @@ func (c RulesClient) TagRulesList(ctx context.Context, id MonitorId) (resp TagRu return } -// TagRulesListComplete retrieves all of the results into a single object -func (c RulesClient) TagRulesListComplete(ctx context.Context, id MonitorId) (TagRulesListCompleteResult, error) { - return c.TagRulesListCompleteMatchingPredicate(ctx, id, MonitoringTagRulesOperationPredicate{}) -} - -// TagRulesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RulesClient) TagRulesListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoringTagRulesOperationPredicate) (resp TagRulesListCompleteResult, err error) { - items := make([]MonitoringTagRules, 0) - - page, err := c.TagRulesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := TagRulesListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForTagRulesList prepares the TagRulesList request. func (c RulesClient) preparerForTagRulesList(ctx context.Context, id MonitorId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c RulesClient) responderForTagRulesList(resp *http.Response) (result TagRu } return } + +// TagRulesListComplete retrieves all of the results into a single object +func (c RulesClient) TagRulesListComplete(ctx context.Context, id MonitorId) (TagRulesListCompleteResult, error) { + return c.TagRulesListCompleteMatchingPredicate(ctx, id, MonitoringTagRulesOperationPredicate{}) +} + +// TagRulesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c RulesClient) TagRulesListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoringTagRulesOperationPredicate) (resp TagRulesListCompleteResult, err error) { + items := make([]MonitoringTagRules, 0) + + page, err := c.TagRulesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := TagRulesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistauthorizationrules_autorest.go index bbac653a1b30..85e47a98578d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsListAuthorizationRules(ctx c return } -// EventHubsListAuthorizationRulesComplete retrieves all of the results into a single object -func (c AuthorizationRulesEventHubsClient) EventHubsListAuthorizationRulesComplete(ctx context.Context, id EventhubId) (EventHubsListAuthorizationRulesCompleteResult, error) { - return c.EventHubsListAuthorizationRulesCompleteMatchingPredicate(ctx, id, AuthorizationRuleOperationPredicate{}) -} - -// EventHubsListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AuthorizationRulesEventHubsClient) EventHubsListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id EventhubId, predicate AuthorizationRuleOperationPredicate) (resp EventHubsListAuthorizationRulesCompleteResult, err error) { - items := make([]AuthorizationRule, 0) - - page, err := c.EventHubsListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := EventHubsListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForEventHubsListAuthorizationRules prepares the EventHubsListAuthorizationRules request. func (c AuthorizationRulesEventHubsClient) preparerForEventHubsListAuthorizationRules(ctx context.Context, id EventhubId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c AuthorizationRulesEventHubsClient) responderForEventHubsListAuthorizatio } return } + +// EventHubsListAuthorizationRulesComplete retrieves all of the results into a single object +func (c AuthorizationRulesEventHubsClient) EventHubsListAuthorizationRulesComplete(ctx context.Context, id EventhubId) (EventHubsListAuthorizationRulesCompleteResult, error) { + return c.EventHubsListAuthorizationRulesCompleteMatchingPredicate(ctx, id, AuthorizationRuleOperationPredicate{}) +} + +// EventHubsListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AuthorizationRulesEventHubsClient) EventHubsListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id EventhubId, predicate AuthorizationRuleOperationPredicate) (resp EventHubsListAuthorizationRulesCompleteResult, err error) { + items := make([]AuthorizationRule, 0) + + page, err := c.EventHubsListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := EventHubsListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistauthorizationrules_autorest.go index 8b5a84d04791..5dc47f95bc83 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesListAuthorizationRules(ctx return } -// NamespacesListAuthorizationRulesComplete retrieves all of the results into a single object -func (c AuthorizationRulesNamespacesClient) NamespacesListAuthorizationRulesComplete(ctx context.Context, id NamespaceId) (NamespacesListAuthorizationRulesCompleteResult, error) { - return c.NamespacesListAuthorizationRulesCompleteMatchingPredicate(ctx, id, AuthorizationRuleOperationPredicate{}) -} - -// NamespacesListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AuthorizationRulesNamespacesClient) NamespacesListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate AuthorizationRuleOperationPredicate) (resp NamespacesListAuthorizationRulesCompleteResult, err error) { - items := make([]AuthorizationRule, 0) - - page, err := c.NamespacesListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := NamespacesListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForNamespacesListAuthorizationRules prepares the NamespacesListAuthorizationRules request. func (c AuthorizationRulesNamespacesClient) preparerForNamespacesListAuthorizationRules(ctx context.Context, id NamespaceId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c AuthorizationRulesNamespacesClient) responderForNamespacesListAuthorizat } return } + +// NamespacesListAuthorizationRulesComplete retrieves all of the results into a single object +func (c AuthorizationRulesNamespacesClient) NamespacesListAuthorizationRulesComplete(ctx context.Context, id NamespaceId) (NamespacesListAuthorizationRulesCompleteResult, error) { + return c.NamespacesListAuthorizationRulesCompleteMatchingPredicate(ctx, id, AuthorizationRuleOperationPredicate{}) +} + +// NamespacesListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AuthorizationRulesNamespacesClient) NamespacesListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate AuthorizationRuleOperationPredicate) (resp NamespacesListAuthorizationRulesCompleteResult, err error) { + items := make([]AuthorizationRule, 0) + + page, err := c.NamespacesListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := NamespacesListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_listbyeventhub_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_listbyeventhub_autorest.go index a0a5ffdec1a2..0e63e820bc2a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_listbyeventhub_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/method_listbyeventhub_autorest.go @@ -88,50 +88,6 @@ func (c ConsumerGroupsClient) ListByEventHub(ctx context.Context, id EventhubId, return } -// ListByEventHubComplete retrieves all of the results into a single object -func (c ConsumerGroupsClient) ListByEventHubComplete(ctx context.Context, id EventhubId, options ListByEventHubOperationOptions) (ListByEventHubCompleteResult, error) { - return c.ListByEventHubCompleteMatchingPredicate(ctx, id, options, ConsumerGroupOperationPredicate{}) -} - -// ListByEventHubCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ConsumerGroupsClient) ListByEventHubCompleteMatchingPredicate(ctx context.Context, id EventhubId, options ListByEventHubOperationOptions, predicate ConsumerGroupOperationPredicate) (resp ListByEventHubCompleteResult, err error) { - items := make([]ConsumerGroup, 0) - - page, err := c.ListByEventHub(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByEventHubCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByEventHub prepares the ListByEventHub request. func (c ConsumerGroupsClient) preparerForListByEventHub(ctx context.Context, id EventhubId, options ListByEventHubOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c ConsumerGroupsClient) responderForListByEventHub(resp *http.Response) (r } return } + +// ListByEventHubComplete retrieves all of the results into a single object +func (c ConsumerGroupsClient) ListByEventHubComplete(ctx context.Context, id EventhubId, options ListByEventHubOperationOptions) (ListByEventHubCompleteResult, error) { + return c.ListByEventHubCompleteMatchingPredicate(ctx, id, options, ConsumerGroupOperationPredicate{}) +} + +// ListByEventHubCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ConsumerGroupsClient) ListByEventHubCompleteMatchingPredicate(ctx context.Context, id EventhubId, options ListByEventHubOperationOptions, predicate ConsumerGroupOperationPredicate) (resp ListByEventHubCompleteResult, err error) { + items := make([]ConsumerGroup, 0) + + page, err := c.ListByEventHub(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByEventHubCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_list_autorest.go index abd321a27394..8c2609194103 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_list_autorest.go @@ -59,50 +59,6 @@ func (c DisasterRecoveryConfigsClient) List(ctx context.Context, id NamespaceId) return } -// ListComplete retrieves all of the results into a single object -func (c DisasterRecoveryConfigsClient) ListComplete(ctx context.Context, id NamespaceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ArmDisasterRecoveryOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DisasterRecoveryConfigsClient) ListCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate ArmDisasterRecoveryOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]ArmDisasterRecovery, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c DisasterRecoveryConfigsClient) preparerForList(ctx context.Context, id NamespaceId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c DisasterRecoveryConfigsClient) responderForList(resp *http.Response) (re } return } + +// ListComplete retrieves all of the results into a single object +func (c DisasterRecoveryConfigsClient) ListComplete(ctx context.Context, id NamespaceId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ArmDisasterRecoveryOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DisasterRecoveryConfigsClient) ListCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate ArmDisasterRecoveryOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]ArmDisasterRecovery, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_listbynamespace_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_listbynamespace_autorest.go index 34dbc420a6d1..0973b4358fe8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_listbynamespace_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/method_listbynamespace_autorest.go @@ -88,50 +88,6 @@ func (c EventHubsClient) ListByNamespace(ctx context.Context, id NamespaceId, op return } -// ListByNamespaceComplete retrieves all of the results into a single object -func (c EventHubsClient) ListByNamespaceComplete(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions) (ListByNamespaceCompleteResult, error) { - return c.ListByNamespaceCompleteMatchingPredicate(ctx, id, options, EventhubOperationPredicate{}) -} - -// ListByNamespaceCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c EventHubsClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions, predicate EventhubOperationPredicate) (resp ListByNamespaceCompleteResult, err error) { - items := make([]Eventhub, 0) - - page, err := c.ListByNamespace(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByNamespaceCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByNamespace prepares the ListByNamespace request. func (c EventHubsClient) preparerForListByNamespace(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c EventHubsClient) responderForListByNamespace(resp *http.Response) (resul } return } + +// ListByNamespaceComplete retrieves all of the results into a single object +func (c EventHubsClient) ListByNamespaceComplete(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions) (ListByNamespaceCompleteResult, error) { + return c.ListByNamespaceCompleteMatchingPredicate(ctx, id, options, EventhubOperationPredicate{}) +} + +// ListByNamespaceCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c EventHubsClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions, predicate EventhubOperationPredicate) (resp ListByNamespaceCompleteResult, err error) { + items := make([]Eventhub, 0) + + page, err := c.ListByNamespace(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByNamespaceCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clusterslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clusterslistbyresourcegroup_autorest.go index da58b7ba37b0..cfcd577b1de3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clusterslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clusterslistbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c EventHubsClustersClient) ClustersListByResourceGroup(ctx context.Context return } -// ClustersListByResourceGroupComplete retrieves all of the results into a single object -func (c EventHubsClustersClient) ClustersListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ClustersListByResourceGroupCompleteResult, error) { - return c.ClustersListByResourceGroupCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) -} - -// ClustersListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c EventHubsClustersClient) ClustersListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (resp ClustersListByResourceGroupCompleteResult, err error) { - items := make([]Cluster, 0) - - page, err := c.ClustersListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ClustersListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForClustersListByResourceGroup prepares the ClustersListByResourceGroup request. func (c EventHubsClustersClient) preparerForClustersListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c EventHubsClustersClient) responderForClustersListByResourceGroup(resp *h } return } + +// ClustersListByResourceGroupComplete retrieves all of the results into a single object +func (c EventHubsClustersClient) ClustersListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ClustersListByResourceGroupCompleteResult, error) { + return c.ClustersListByResourceGroupCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) +} + +// ClustersListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c EventHubsClustersClient) ClustersListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (resp ClustersListByResourceGroupCompleteResult, err error) { + items := make([]Cluster, 0) + + page, err := c.ClustersListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ClustersListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clusterslistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clusterslistbysubscription_autorest.go index d6f5f24a5168..85e475c381ec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clusterslistbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clusterslistbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c EventHubsClustersClient) ClustersListBySubscription(ctx context.Context, return } -// ClustersListBySubscriptionComplete retrieves all of the results into a single object -func (c EventHubsClustersClient) ClustersListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ClustersListBySubscriptionCompleteResult, error) { - return c.ClustersListBySubscriptionCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) -} - -// ClustersListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c EventHubsClustersClient) ClustersListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (resp ClustersListBySubscriptionCompleteResult, err error) { - items := make([]Cluster, 0) - - page, err := c.ClustersListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ClustersListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForClustersListBySubscription prepares the ClustersListBySubscription request. func (c EventHubsClustersClient) preparerForClustersListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c EventHubsClustersClient) responderForClustersListBySubscription(resp *ht } return } + +// ClustersListBySubscriptionComplete retrieves all of the results into a single object +func (c EventHubsClustersClient) ClustersListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ClustersListBySubscriptionCompleteResult, error) { + return c.ClustersListBySubscriptionCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) +} + +// ClustersListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c EventHubsClustersClient) ClustersListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (resp ClustersListBySubscriptionCompleteResult, err error) { + items := make([]Cluster, 0) + + page, err := c.ClustersListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ClustersListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_list_autorest.go index ccd84c360fc6..5a7df04ecfd2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_list_autorest.go @@ -60,50 +60,6 @@ func (c NamespacesClient) List(ctx context.Context, id commonids.SubscriptionId) return } -// ListComplete retrieves all of the results into a single object -func (c NamespacesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, EHNamespaceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate EHNamespaceOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]EHNamespace, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c NamespacesClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NamespacesClient) responderForList(resp *http.Response) (result ListOper } return } + +// ListComplete retrieves all of the results into a single object +func (c NamespacesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, EHNamespaceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate EHNamespaceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]EHNamespace, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_listbyresourcegroup_autorest.go index 99c00b6ad9d6..d655de7c1ac1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c NamespacesClient) ListByResourceGroup(ctx context.Context, id commonids. return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c NamespacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, EHNamespaceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate EHNamespaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]EHNamespace, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c NamespacesClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NamespacesClient) responderForListByResourceGroup(resp *http.Response) ( } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c NamespacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, EHNamespaceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate EHNamespaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]EHNamespace, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listbyresourcegroup_autorest.go index 8579dfa5bca6..467395fe52fa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c FluidRelayServersClient) ListByResourceGroup(ctx context.Context, id com return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c FluidRelayServersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, FluidRelayServerOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c FluidRelayServersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate FluidRelayServerOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]FluidRelayServer, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c FluidRelayServersClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c FluidRelayServersClient) responderForListByResourceGroup(resp *http.Resp } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c FluidRelayServersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, FluidRelayServerOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c FluidRelayServersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate FluidRelayServerOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]FluidRelayServer, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listbysubscription_autorest.go index 1386b52cadc9..99736adb4604 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c FluidRelayServersClient) ListBySubscription(ctx context.Context, id comm return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c FluidRelayServersClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, FluidRelayServerOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c FluidRelayServersClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate FluidRelayServerOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]FluidRelayServer, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c FluidRelayServersClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c FluidRelayServersClient) responderForListBySubscription(resp *http.Respo } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c FluidRelayServersClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, FluidRelayServerOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c FluidRelayServersClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate FluidRelayServerOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]FluidRelayServer, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbyresourcegroup_autorest.go index 515f178362f3..a0582dfc6f6f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbyresourcegroup_autorest.go @@ -84,50 +84,6 @@ func (c DedicatedHsmsClient) DedicatedHsmListByResourceGroup(ctx context.Context return } -// DedicatedHsmListByResourceGroupComplete retrieves all of the results into a single object -func (c DedicatedHsmsClient) DedicatedHsmListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options DedicatedHsmListByResourceGroupOperationOptions) (DedicatedHsmListByResourceGroupCompleteResult, error) { - return c.DedicatedHsmListByResourceGroupCompleteMatchingPredicate(ctx, id, options, DedicatedHsmOperationPredicate{}) -} - -// DedicatedHsmListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DedicatedHsmsClient) DedicatedHsmListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options DedicatedHsmListByResourceGroupOperationOptions, predicate DedicatedHsmOperationPredicate) (resp DedicatedHsmListByResourceGroupCompleteResult, err error) { - items := make([]DedicatedHsm, 0) - - page, err := c.DedicatedHsmListByResourceGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := DedicatedHsmListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForDedicatedHsmListByResourceGroup prepares the DedicatedHsmListByResourceGroup request. func (c DedicatedHsmsClient) preparerForDedicatedHsmListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options DedicatedHsmListByResourceGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c DedicatedHsmsClient) responderForDedicatedHsmListByResourceGroup(resp *h } return } + +// DedicatedHsmListByResourceGroupComplete retrieves all of the results into a single object +func (c DedicatedHsmsClient) DedicatedHsmListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options DedicatedHsmListByResourceGroupOperationOptions) (DedicatedHsmListByResourceGroupCompleteResult, error) { + return c.DedicatedHsmListByResourceGroupCompleteMatchingPredicate(ctx, id, options, DedicatedHsmOperationPredicate{}) +} + +// DedicatedHsmListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DedicatedHsmsClient) DedicatedHsmListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options DedicatedHsmListByResourceGroupOperationOptions, predicate DedicatedHsmOperationPredicate) (resp DedicatedHsmListByResourceGroupCompleteResult, err error) { + items := make([]DedicatedHsm, 0) + + page, err := c.DedicatedHsmListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := DedicatedHsmListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbysubscription_autorest.go index bc8ef5408e64..60a985837288 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbysubscription_autorest.go @@ -84,50 +84,6 @@ func (c DedicatedHsmsClient) DedicatedHsmListBySubscription(ctx context.Context, return } -// DedicatedHsmListBySubscriptionComplete retrieves all of the results into a single object -func (c DedicatedHsmsClient) DedicatedHsmListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options DedicatedHsmListBySubscriptionOperationOptions) (DedicatedHsmListBySubscriptionCompleteResult, error) { - return c.DedicatedHsmListBySubscriptionCompleteMatchingPredicate(ctx, id, options, DedicatedHsmOperationPredicate{}) -} - -// DedicatedHsmListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DedicatedHsmsClient) DedicatedHsmListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options DedicatedHsmListBySubscriptionOperationOptions, predicate DedicatedHsmOperationPredicate) (resp DedicatedHsmListBySubscriptionCompleteResult, err error) { - items := make([]DedicatedHsm, 0) - - page, err := c.DedicatedHsmListBySubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := DedicatedHsmListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForDedicatedHsmListBySubscription prepares the DedicatedHsmListBySubscription request. func (c DedicatedHsmsClient) preparerForDedicatedHsmListBySubscription(ctx context.Context, id commonids.SubscriptionId, options DedicatedHsmListBySubscriptionOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c DedicatedHsmsClient) responderForDedicatedHsmListBySubscription(resp *ht } return } + +// DedicatedHsmListBySubscriptionComplete retrieves all of the results into a single object +func (c DedicatedHsmsClient) DedicatedHsmListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options DedicatedHsmListBySubscriptionOperationOptions) (DedicatedHsmListBySubscriptionCompleteResult, error) { + return c.DedicatedHsmListBySubscriptionCompleteMatchingPredicate(ctx, id, options, DedicatedHsmOperationPredicate{}) +} + +// DedicatedHsmListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DedicatedHsmsClient) DedicatedHsmListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options DedicatedHsmListBySubscriptionOperationOptions, predicate DedicatedHsmOperationPredicate) (resp DedicatedHsmListBySubscriptionCompleteResult, err error) { + items := make([]DedicatedHsm, 0) + + page, err := c.DedicatedHsmListBySubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := DedicatedHsmListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistoutboundnetworkdependenciesendpoints_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistoutboundnetworkdependenciesendpoints_autorest.go index a938efbddd13..5444b844daff 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistoutboundnetworkdependenciesendpoints_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistoutboundnetworkdependenciesendpoints_autorest.go @@ -59,50 +59,6 @@ func (c DedicatedHsmsClient) DedicatedHsmListOutboundNetworkDependenciesEndpoint return } -// DedicatedHsmListOutboundNetworkDependenciesEndpointsComplete retrieves all of the results into a single object -func (c DedicatedHsmsClient) DedicatedHsmListOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, id DedicatedHSMId) (DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteResult, error) { - return c.DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx, id, OutboundEnvironmentEndpointOperationPredicate{}) -} - -// DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DedicatedHsmsClient) DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx context.Context, id DedicatedHSMId, predicate OutboundEnvironmentEndpointOperationPredicate) (resp DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteResult, err error) { - items := make([]OutboundEnvironmentEndpoint, 0) - - page, err := c.DedicatedHsmListOutboundNetworkDependenciesEndpoints(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForDedicatedHsmListOutboundNetworkDependenciesEndpoints prepares the DedicatedHsmListOutboundNetworkDependenciesEndpoints request. func (c DedicatedHsmsClient) preparerForDedicatedHsmListOutboundNetworkDependenciesEndpoints(ctx context.Context, id DedicatedHSMId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c DedicatedHsmsClient) responderForDedicatedHsmListOutboundNetworkDependen } return } + +// DedicatedHsmListOutboundNetworkDependenciesEndpointsComplete retrieves all of the results into a single object +func (c DedicatedHsmsClient) DedicatedHsmListOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, id DedicatedHSMId) (DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteResult, error) { + return c.DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx, id, OutboundEnvironmentEndpointOperationPredicate{}) +} + +// DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DedicatedHsmsClient) DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx context.Context, id DedicatedHSMId, predicate OutboundEnvironmentEndpointOperationPredicate) (resp DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteResult, err error) { + items := make([]OutboundEnvironmentEndpoint, 0) + + page, err := c.DedicatedHsmListOutboundNetworkDependenciesEndpoints(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := DedicatedHsmListOutboundNetworkDependenciesEndpointsCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_create_autorest.go index a6b993592fb9..89455d7bf722 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_create_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_create_autorest.go @@ -64,5 +64,6 @@ func (c DataCollectionEndpointsClient) responderForCreate(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_delete_autorest.go index 2ff778d189eb..a2ef214585bb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_delete_autorest.go @@ -61,5 +61,6 @@ func (c DataCollectionEndpointsClient) responderForDelete(resp *http.Response) ( azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_get_autorest.go index d5069e6b354b..2f824dc9a07f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_get_autorest.go @@ -63,5 +63,6 @@ func (c DataCollectionEndpointsClient) responderForGet(resp *http.Response) (res autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbyresourcegroup_autorest.go index 56c3282359ac..51e7a2d2ce89 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c DataCollectionEndpointsClient) ListByResourceGroup(ctx context.Context, return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c DataCollectionEndpointsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DataCollectionEndpointResourceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DataCollectionEndpointsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DataCollectionEndpointResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]DataCollectionEndpointResource, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c DataCollectionEndpointsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c DataCollectionEndpointsClient) responderForListByResourceGroup(resp *htt } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c DataCollectionEndpointsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DataCollectionEndpointResourceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DataCollectionEndpointsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DataCollectionEndpointResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]DataCollectionEndpointResource, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbysubscription_autorest.go index 8e15c9877897..6fbec475a01e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c DataCollectionEndpointsClient) ListBySubscription(ctx context.Context, i return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c DataCollectionEndpointsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, DataCollectionEndpointResourceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DataCollectionEndpointsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DataCollectionEndpointResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]DataCollectionEndpointResource, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c DataCollectionEndpointsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c DataCollectionEndpointsClient) responderForListBySubscription(resp *http } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c DataCollectionEndpointsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, DataCollectionEndpointResourceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DataCollectionEndpointsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DataCollectionEndpointResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]DataCollectionEndpointResource, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_update_autorest.go index 9ab2bbe320ab..5079c3e90c43 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionendpoints/method_update_autorest.go @@ -64,5 +64,6 @@ func (c DataCollectionEndpointsClient) responderForUpdate(resp *http.Response) ( autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp + return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_listbyresourcegroup_autorest.go index 11c6f644d800..4e8ee59a881e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c DataCollectionRulesClient) ListByResourceGroup(ctx context.Context, id c return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c DataCollectionRulesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DataCollectionRuleResourceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DataCollectionRulesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DataCollectionRuleResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]DataCollectionRuleResource, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c DataCollectionRulesClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c DataCollectionRulesClient) responderForListByResourceGroup(resp *http.Re } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c DataCollectionRulesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DataCollectionRuleResourceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DataCollectionRulesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DataCollectionRuleResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]DataCollectionRuleResource, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_listbysubscription_autorest.go index a6b9c204fe00..c90864f1a56c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c DataCollectionRulesClient) ListBySubscription(ctx context.Context, id co return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c DataCollectionRulesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, DataCollectionRuleResourceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DataCollectionRulesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DataCollectionRuleResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]DataCollectionRuleResource, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c DataCollectionRulesClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c DataCollectionRulesClient) responderForListBySubscription(resp *http.Res } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c DataCollectionRulesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, DataCollectionRuleResourceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DataCollectionRulesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DataCollectionRuleResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]DataCollectionRuleResource, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listbyresourcegroup_autorest.go index f9c3e538c364..0eb4729220d4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c AppsClient) ListByResourceGroup(ctx context.Context, id commonids.Resour return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c AppsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, AppOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AppsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AppOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]App, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c AppsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AppsClient) responderForListByResourceGroup(resp *http.Response) (result } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c AppsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, AppOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AppsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AppOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]App, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listbysubscription_autorest.go index 73ec1c9a5dae..2af177188cf4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c AppsClient) ListBySubscription(ctx context.Context, id commonids.Subscri return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c AppsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, AppOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AppsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AppOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]App, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c AppsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AppsClient) responderForListBySubscription(resp *http.Response) (result } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c AppsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, AppOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AppsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AppOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]App, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listtemplates_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listtemplates_autorest.go index 6c37778263d3..fcddca918209 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listtemplates_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/method_listtemplates_autorest.go @@ -60,50 +60,6 @@ func (c AppsClient) ListTemplates(ctx context.Context, id commonids.Subscription return } -// ListTemplatesComplete retrieves all of the results into a single object -func (c AppsClient) ListTemplatesComplete(ctx context.Context, id commonids.SubscriptionId) (ListTemplatesCompleteResult, error) { - return c.ListTemplatesCompleteMatchingPredicate(ctx, id, AppTemplateOperationPredicate{}) -} - -// ListTemplatesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AppsClient) ListTemplatesCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AppTemplateOperationPredicate) (resp ListTemplatesCompleteResult, err error) { - items := make([]AppTemplate, 0) - - page, err := c.ListTemplates(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListTemplatesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListTemplates prepares the ListTemplates request. func (c AppsClient) preparerForListTemplates(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AppsClient) responderForListTemplates(resp *http.Response) (result ListT } return } + +// ListTemplatesComplete retrieves all of the results into a single object +func (c AppsClient) ListTemplatesComplete(ctx context.Context, id commonids.SubscriptionId) (ListTemplatesCompleteResult, error) { + return c.ListTemplatesCompleteMatchingPredicate(ctx, id, AppTemplateOperationPredicate{}) +} + +// ListTemplatesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AppsClient) ListTemplatesCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AppTemplateOperationPredicate) (resp ListTemplatesCompleteResult, err error) { + items := make([]AppTemplate, 0) + + page, err := c.ListTemplates(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListTemplatesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_listbyresourcegroup_autorest.go index 8878b961bd15..8d6f822e2158 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c LoadTestsClient) ListByResourceGroup(ctx context.Context, id commonids.R return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c LoadTestsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, LoadTestResourceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c LoadTestsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LoadTestResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]LoadTestResource, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c LoadTestsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c LoadTestsClient) responderForListByResourceGroup(resp *http.Response) (r } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c LoadTestsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, LoadTestResourceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c LoadTestsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LoadTestResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]LoadTestResource, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_listbysubscription_autorest.go index 7f890a2a3f82..b376350e0343 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c LoadTestsClient) ListBySubscription(ctx context.Context, id commonids.Su return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c LoadTestsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, LoadTestResourceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c LoadTestsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LoadTestResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]LoadTestResource, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c LoadTestsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c LoadTestsClient) responderForListBySubscription(resp *http.Response) (re } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c LoadTestsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, LoadTestResourceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c LoadTestsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LoadTestResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]LoadTestResource, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitieslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitieslistbyresourcegroup_autorest.go index 18541ff45966..cc6ccb5011dd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitieslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitieslistbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ManagedIdentityClient) UserAssignedIdentitiesListByResourceGroup(ctx con return } -// UserAssignedIdentitiesListByResourceGroupComplete retrieves all of the results into a single object -func (c ManagedIdentityClient) UserAssignedIdentitiesListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (UserAssignedIdentitiesListByResourceGroupCompleteResult, error) { - return c.UserAssignedIdentitiesListByResourceGroupCompleteMatchingPredicate(ctx, id, IdentityOperationPredicate{}) -} - -// UserAssignedIdentitiesListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ManagedIdentityClient) UserAssignedIdentitiesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate IdentityOperationPredicate) (resp UserAssignedIdentitiesListByResourceGroupCompleteResult, err error) { - items := make([]Identity, 0) - - page, err := c.UserAssignedIdentitiesListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := UserAssignedIdentitiesListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForUserAssignedIdentitiesListByResourceGroup prepares the UserAssignedIdentitiesListByResourceGroup request. func (c ManagedIdentityClient) preparerForUserAssignedIdentitiesListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ManagedIdentityClient) responderForUserAssignedIdentitiesListByResourceG } return } + +// UserAssignedIdentitiesListByResourceGroupComplete retrieves all of the results into a single object +func (c ManagedIdentityClient) UserAssignedIdentitiesListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (UserAssignedIdentitiesListByResourceGroupCompleteResult, error) { + return c.UserAssignedIdentitiesListByResourceGroupCompleteMatchingPredicate(ctx, id, IdentityOperationPredicate{}) +} + +// UserAssignedIdentitiesListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ManagedIdentityClient) UserAssignedIdentitiesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate IdentityOperationPredicate) (resp UserAssignedIdentitiesListByResourceGroupCompleteResult, err error) { + items := make([]Identity, 0) + + page, err := c.UserAssignedIdentitiesListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := UserAssignedIdentitiesListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitieslistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitieslistbysubscription_autorest.go index 35ce6c75873e..f884a1a6d346 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitieslistbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2018-11-30/managedidentity/method_userassignedidentitieslistbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c ManagedIdentityClient) UserAssignedIdentitiesListBySubscription(ctx cont return } -// UserAssignedIdentitiesListBySubscriptionComplete retrieves all of the results into a single object -func (c ManagedIdentityClient) UserAssignedIdentitiesListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (UserAssignedIdentitiesListBySubscriptionCompleteResult, error) { - return c.UserAssignedIdentitiesListBySubscriptionCompleteMatchingPredicate(ctx, id, IdentityOperationPredicate{}) -} - -// UserAssignedIdentitiesListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ManagedIdentityClient) UserAssignedIdentitiesListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate IdentityOperationPredicate) (resp UserAssignedIdentitiesListBySubscriptionCompleteResult, err error) { - items := make([]Identity, 0) - - page, err := c.UserAssignedIdentitiesListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := UserAssignedIdentitiesListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForUserAssignedIdentitiesListBySubscription prepares the UserAssignedIdentitiesListBySubscription request. func (c ManagedIdentityClient) preparerForUserAssignedIdentitiesListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ManagedIdentityClient) responderForUserAssignedIdentitiesListBySubscript } return } + +// UserAssignedIdentitiesListBySubscriptionComplete retrieves all of the results into a single object +func (c ManagedIdentityClient) UserAssignedIdentitiesListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (UserAssignedIdentitiesListBySubscriptionCompleteResult, error) { + return c.UserAssignedIdentitiesListBySubscriptionCompleteMatchingPredicate(ctx, id, IdentityOperationPredicate{}) +} + +// UserAssignedIdentitiesListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ManagedIdentityClient) UserAssignedIdentitiesListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate IdentityOperationPredicate) (resp UserAssignedIdentitiesListBySubscriptionCompleteResult, err error) { + items := make([]Identity, 0) + + page, err := c.UserAssignedIdentitiesListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := UserAssignedIdentitiesListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/method_list_autorest.go index e65c223e6a3d..6f99eb0914de 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/method_list_autorest.go @@ -84,50 +84,6 @@ func (c RegistrationAssignmentsClient) List(ctx context.Context, id commonids.Sc return } -// ListComplete retrieves all of the results into a single object -func (c RegistrationAssignmentsClient) ListComplete(ctx context.Context, id commonids.ScopeId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, RegistrationAssignmentOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RegistrationAssignmentsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListOperationOptions, predicate RegistrationAssignmentOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]RegistrationAssignment, 0) - - page, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c RegistrationAssignmentsClient) preparerForList(ctx context.Context, id commonids.ScopeId, options ListOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c RegistrationAssignmentsClient) responderForList(resp *http.Response) (re } return } + +// ListComplete retrieves all of the results into a single object +func (c RegistrationAssignmentsClient) ListComplete(ctx context.Context, id commonids.ScopeId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, RegistrationAssignmentOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c RegistrationAssignmentsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListOperationOptions, predicate RegistrationAssignmentOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]RegistrationAssignment, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_list_autorest.go index b935a709b729..8aadef47e5bc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_list_autorest.go @@ -60,50 +60,6 @@ func (c RegistrationDefinitionsClient) List(ctx context.Context, id commonids.Sc return } -// ListComplete retrieves all of the results into a single object -func (c RegistrationDefinitionsClient) ListComplete(ctx context.Context, id commonids.ScopeId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, RegistrationDefinitionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RegistrationDefinitionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate RegistrationDefinitionOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]RegistrationDefinition, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c RegistrationDefinitionsClient) preparerForList(ctx context.Context, id commonids.ScopeId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c RegistrationDefinitionsClient) responderForList(resp *http.Response) (re } return } + +// ListComplete retrieves all of the results into a single object +func (c RegistrationDefinitionsClient) ListComplete(ctx context.Context, id commonids.ScopeId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, RegistrationDefinitionOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c RegistrationDefinitionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate RegistrationDefinitionOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]RegistrationDefinition, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listbyresourcegroup_autorest.go index 5f5ac92d683a..6892470d55ec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c AccountsClient) ListByResourceGroup(ctx context.Context, id commonids.Re return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c AccountsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, MapsAccountOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AccountsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MapsAccountOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]MapsAccount, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c AccountsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AccountsClient) responderForListByResourceGroup(resp *http.Response) (re } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c AccountsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, MapsAccountOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AccountsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MapsAccountOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]MapsAccount, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listbysubscription_autorest.go index 789ad076477d..2b33b2ebf73d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c AccountsClient) ListBySubscription(ctx context.Context, id commonids.Sub return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c AccountsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, MapsAccountOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AccountsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MapsAccountOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]MapsAccount, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c AccountsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AccountsClient) responderForListBySubscription(resp *http.Response) (res } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c AccountsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, MapsAccountOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AccountsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MapsAccountOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]MapsAccount, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_listbyaccount_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_listbyaccount_autorest.go index c084a1699d52..838527884527 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_listbyaccount_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/method_listbyaccount_autorest.go @@ -59,50 +59,6 @@ func (c CreatorsClient) ListByAccount(ctx context.Context, id AccountId) (resp L return } -// ListByAccountComplete retrieves all of the results into a single object -func (c CreatorsClient) ListByAccountComplete(ctx context.Context, id AccountId) (ListByAccountCompleteResult, error) { - return c.ListByAccountCompleteMatchingPredicate(ctx, id, CreatorOperationPredicate{}) -} - -// ListByAccountCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c CreatorsClient) ListByAccountCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate CreatorOperationPredicate) (resp ListByAccountCompleteResult, err error) { - items := make([]Creator, 0) - - page, err := c.ListByAccount(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByAccountCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByAccount prepares the ListByAccount request. func (c CreatorsClient) preparerForListByAccount(ctx context.Context, id AccountId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c CreatorsClient) responderForListByAccount(resp *http.Response) (result L } return } + +// ListByAccountComplete retrieves all of the results into a single object +func (c CreatorsClient) ListByAccountComplete(ctx context.Context, id AccountId) (ListByAccountCompleteResult, error) { + return c.ListByAccountCompleteMatchingPredicate(ctx, id, CreatorOperationPredicate{}) +} + +// ListByAccountCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c CreatorsClient) ListByAccountCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate CreatorOperationPredicate) (resp ListByAccountCompleteResult, err error) { + items := make([]Creator, 0) + + page, err := c.ListByAccount(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByAccountCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountslistbyresourcegroup_autorest.go index 807bc8a1efc0..b3fccea255be 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountslistbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ResourceClient) RemoteRenderingAccountsListByResourceGroup(ctx context.C return } -// RemoteRenderingAccountsListByResourceGroupComplete retrieves all of the results into a single object -func (c ResourceClient) RemoteRenderingAccountsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (RemoteRenderingAccountsListByResourceGroupCompleteResult, error) { - return c.RemoteRenderingAccountsListByResourceGroupCompleteMatchingPredicate(ctx, id, RemoteRenderingAccountOperationPredicate{}) -} - -// RemoteRenderingAccountsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceClient) RemoteRenderingAccountsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate RemoteRenderingAccountOperationPredicate) (resp RemoteRenderingAccountsListByResourceGroupCompleteResult, err error) { - items := make([]RemoteRenderingAccount, 0) - - page, err := c.RemoteRenderingAccountsListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemoteRenderingAccountsListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemoteRenderingAccountsListByResourceGroup prepares the RemoteRenderingAccountsListByResourceGroup request. func (c ResourceClient) preparerForRemoteRenderingAccountsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ResourceClient) responderForRemoteRenderingAccountsListByResourceGroup(r } return } + +// RemoteRenderingAccountsListByResourceGroupComplete retrieves all of the results into a single object +func (c ResourceClient) RemoteRenderingAccountsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (RemoteRenderingAccountsListByResourceGroupCompleteResult, error) { + return c.RemoteRenderingAccountsListByResourceGroupCompleteMatchingPredicate(ctx, id, RemoteRenderingAccountOperationPredicate{}) +} + +// RemoteRenderingAccountsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceClient) RemoteRenderingAccountsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate RemoteRenderingAccountOperationPredicate) (resp RemoteRenderingAccountsListByResourceGroupCompleteResult, err error) { + items := make([]RemoteRenderingAccount, 0) + + page, err := c.RemoteRenderingAccountsListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemoteRenderingAccountsListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountslistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountslistbysubscription_autorest.go index 726b8e0a7a98..0d7de601b478 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountslistbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountslistbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c ResourceClient) RemoteRenderingAccountsListBySubscription(ctx context.Co return } -// RemoteRenderingAccountsListBySubscriptionComplete retrieves all of the results into a single object -func (c ResourceClient) RemoteRenderingAccountsListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (RemoteRenderingAccountsListBySubscriptionCompleteResult, error) { - return c.RemoteRenderingAccountsListBySubscriptionCompleteMatchingPredicate(ctx, id, RemoteRenderingAccountOperationPredicate{}) -} - -// RemoteRenderingAccountsListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceClient) RemoteRenderingAccountsListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RemoteRenderingAccountOperationPredicate) (resp RemoteRenderingAccountsListBySubscriptionCompleteResult, err error) { - items := make([]RemoteRenderingAccount, 0) - - page, err := c.RemoteRenderingAccountsListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemoteRenderingAccountsListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemoteRenderingAccountsListBySubscription prepares the RemoteRenderingAccountsListBySubscription request. func (c ResourceClient) preparerForRemoteRenderingAccountsListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ResourceClient) responderForRemoteRenderingAccountsListBySubscription(re } return } + +// RemoteRenderingAccountsListBySubscriptionComplete retrieves all of the results into a single object +func (c ResourceClient) RemoteRenderingAccountsListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (RemoteRenderingAccountsListBySubscriptionCompleteResult, error) { + return c.RemoteRenderingAccountsListBySubscriptionCompleteMatchingPredicate(ctx, id, RemoteRenderingAccountOperationPredicate{}) +} + +// RemoteRenderingAccountsListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceClient) RemoteRenderingAccountsListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RemoteRenderingAccountOperationPredicate) (resp RemoteRenderingAccountsListBySubscriptionCompleteResult, err error) { + items := make([]RemoteRenderingAccount, 0) + + page, err := c.RemoteRenderingAccountsListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemoteRenderingAccountsListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountslistbyresourcegroup_autorest.go index 9bb5ac51ebc0..2dbd43d72132 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountslistbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ResourceClient) SpatialAnchorsAccountsListByResourceGroup(ctx context.Co return } -// SpatialAnchorsAccountsListByResourceGroupComplete retrieves all of the results into a single object -func (c ResourceClient) SpatialAnchorsAccountsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (SpatialAnchorsAccountsListByResourceGroupCompleteResult, error) { - return c.SpatialAnchorsAccountsListByResourceGroupCompleteMatchingPredicate(ctx, id, SpatialAnchorsAccountOperationPredicate{}) -} - -// SpatialAnchorsAccountsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceClient) SpatialAnchorsAccountsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SpatialAnchorsAccountOperationPredicate) (resp SpatialAnchorsAccountsListByResourceGroupCompleteResult, err error) { - items := make([]SpatialAnchorsAccount, 0) - - page, err := c.SpatialAnchorsAccountsListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := SpatialAnchorsAccountsListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForSpatialAnchorsAccountsListByResourceGroup prepares the SpatialAnchorsAccountsListByResourceGroup request. func (c ResourceClient) preparerForSpatialAnchorsAccountsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ResourceClient) responderForSpatialAnchorsAccountsListByResourceGroup(re } return } + +// SpatialAnchorsAccountsListByResourceGroupComplete retrieves all of the results into a single object +func (c ResourceClient) SpatialAnchorsAccountsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (SpatialAnchorsAccountsListByResourceGroupCompleteResult, error) { + return c.SpatialAnchorsAccountsListByResourceGroupCompleteMatchingPredicate(ctx, id, SpatialAnchorsAccountOperationPredicate{}) +} + +// SpatialAnchorsAccountsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceClient) SpatialAnchorsAccountsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SpatialAnchorsAccountOperationPredicate) (resp SpatialAnchorsAccountsListByResourceGroupCompleteResult, err error) { + items := make([]SpatialAnchorsAccount, 0) + + page, err := c.SpatialAnchorsAccountsListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := SpatialAnchorsAccountsListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountslistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountslistbysubscription_autorest.go index 8124ddc722d3..4f158bf5c2eb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountslistbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountslistbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c ResourceClient) SpatialAnchorsAccountsListBySubscription(ctx context.Con return } -// SpatialAnchorsAccountsListBySubscriptionComplete retrieves all of the results into a single object -func (c ResourceClient) SpatialAnchorsAccountsListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (SpatialAnchorsAccountsListBySubscriptionCompleteResult, error) { - return c.SpatialAnchorsAccountsListBySubscriptionCompleteMatchingPredicate(ctx, id, SpatialAnchorsAccountOperationPredicate{}) -} - -// SpatialAnchorsAccountsListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ResourceClient) SpatialAnchorsAccountsListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SpatialAnchorsAccountOperationPredicate) (resp SpatialAnchorsAccountsListBySubscriptionCompleteResult, err error) { - items := make([]SpatialAnchorsAccount, 0) - - page, err := c.SpatialAnchorsAccountsListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := SpatialAnchorsAccountsListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForSpatialAnchorsAccountsListBySubscription prepares the SpatialAnchorsAccountsListBySubscription request. func (c ResourceClient) preparerForSpatialAnchorsAccountsListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ResourceClient) responderForSpatialAnchorsAccountsListBySubscription(res } return } + +// SpatialAnchorsAccountsListBySubscriptionComplete retrieves all of the results into a single object +func (c ResourceClient) SpatialAnchorsAccountsListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (SpatialAnchorsAccountsListBySubscriptionCompleteResult, error) { + return c.SpatialAnchorsAccountsListBySubscriptionCompleteMatchingPredicate(ctx, id, SpatialAnchorsAccountOperationPredicate{}) +} + +// SpatialAnchorsAccountsListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ResourceClient) SpatialAnchorsAccountsListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SpatialAnchorsAccountOperationPredicate) (resp SpatialAnchorsAccountsListBySubscriptionCompleteResult, err error) { + items := make([]SpatialAnchorsAccount, 0) + + page, err := c.SpatialAnchorsAccountsListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := SpatialAnchorsAccountsListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/capacitypools/method_poolslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/capacitypools/method_poolslist_autorest.go index 25c06a45e9bd..c94f2008f22d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/capacitypools/method_poolslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/capacitypools/method_poolslist_autorest.go @@ -59,50 +59,6 @@ func (c CapacityPoolsClient) PoolsList(ctx context.Context, id NetAppAccountId) return } -// PoolsListComplete retrieves all of the results into a single object -func (c CapacityPoolsClient) PoolsListComplete(ctx context.Context, id NetAppAccountId) (PoolsListCompleteResult, error) { - return c.PoolsListCompleteMatchingPredicate(ctx, id, CapacityPoolOperationPredicate{}) -} - -// PoolsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c CapacityPoolsClient) PoolsListCompleteMatchingPredicate(ctx context.Context, id NetAppAccountId, predicate CapacityPoolOperationPredicate) (resp PoolsListCompleteResult, err error) { - items := make([]CapacityPool, 0) - - page, err := c.PoolsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := PoolsListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForPoolsList prepares the PoolsList request. func (c CapacityPoolsClient) preparerForPoolsList(ctx context.Context, id NetAppAccountId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c CapacityPoolsClient) responderForPoolsList(resp *http.Response) (result } return } + +// PoolsListComplete retrieves all of the results into a single object +func (c CapacityPoolsClient) PoolsListComplete(ctx context.Context, id NetAppAccountId) (PoolsListCompleteResult, error) { + return c.PoolsListCompleteMatchingPredicate(ctx, id, CapacityPoolOperationPredicate{}) +} + +// PoolsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c CapacityPoolsClient) PoolsListCompleteMatchingPredicate(ctx context.Context, id NetAppAccountId, predicate CapacityPoolOperationPredicate) (resp PoolsListCompleteResult, err error) { + items := make([]CapacityPool, 0) + + page, err := c.PoolsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := PoolsListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountslist_autorest.go index dd93604fbcd5..e847a17848c4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountslist_autorest.go @@ -60,50 +60,6 @@ func (c NetAppAccountsClient) AccountsList(ctx context.Context, id commonids.Res return } -// AccountsListComplete retrieves all of the results into a single object -func (c NetAppAccountsClient) AccountsListComplete(ctx context.Context, id commonids.ResourceGroupId) (AccountsListCompleteResult, error) { - return c.AccountsListCompleteMatchingPredicate(ctx, id, NetAppAccountOperationPredicate{}) -} - -// AccountsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NetAppAccountsClient) AccountsListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetAppAccountOperationPredicate) (resp AccountsListCompleteResult, err error) { - items := make([]NetAppAccount, 0) - - page, err := c.AccountsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := AccountsListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForAccountsList prepares the AccountsList request. func (c NetAppAccountsClient) preparerForAccountsList(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NetAppAccountsClient) responderForAccountsList(resp *http.Response) (res } return } + +// AccountsListComplete retrieves all of the results into a single object +func (c NetAppAccountsClient) AccountsListComplete(ctx context.Context, id commonids.ResourceGroupId) (AccountsListCompleteResult, error) { + return c.AccountsListCompleteMatchingPredicate(ctx, id, NetAppAccountOperationPredicate{}) +} + +// AccountsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NetAppAccountsClient) AccountsListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetAppAccountOperationPredicate) (resp AccountsListCompleteResult, err error) { + items := make([]NetAppAccount, 0) + + page, err := c.AccountsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := AccountsListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountslistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountslistbysubscription_autorest.go index bd65578f1751..38f468c2b83a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountslistbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts/method_accountslistbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c NetAppAccountsClient) AccountsListBySubscription(ctx context.Context, id return } -// AccountsListBySubscriptionComplete retrieves all of the results into a single object -func (c NetAppAccountsClient) AccountsListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (AccountsListBySubscriptionCompleteResult, error) { - return c.AccountsListBySubscriptionCompleteMatchingPredicate(ctx, id, NetAppAccountOperationPredicate{}) -} - -// AccountsListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NetAppAccountsClient) AccountsListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetAppAccountOperationPredicate) (resp AccountsListBySubscriptionCompleteResult, err error) { - items := make([]NetAppAccount, 0) - - page, err := c.AccountsListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := AccountsListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForAccountsListBySubscription prepares the AccountsListBySubscription request. func (c NetAppAccountsClient) preparerForAccountsListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NetAppAccountsClient) responderForAccountsListBySubscription(resp *http. } return } + +// AccountsListBySubscriptionComplete retrieves all of the results into a single object +func (c NetAppAccountsClient) AccountsListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (AccountsListBySubscriptionCompleteResult, error) { + return c.AccountsListBySubscriptionCompleteMatchingPredicate(ctx, id, NetAppAccountOperationPredicate{}) +} + +// AccountsListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NetAppAccountsClient) AccountsListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetAppAccountOperationPredicate) (resp AccountsListBySubscriptionCompleteResult, err error) { + items := make([]NetAppAccount, 0) + + page, err := c.AccountsListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := AccountsListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumes/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumes/method_list_autorest.go index 40c311905e59..967b23940680 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumes/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/volumes/method_list_autorest.go @@ -59,50 +59,6 @@ func (c VolumesClient) List(ctx context.Context, id CapacityPoolId) (resp ListOp return } -// ListComplete retrieves all of the results into a single object -func (c VolumesClient) ListComplete(ctx context.Context, id CapacityPoolId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VolumeOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c VolumesClient) ListCompleteMatchingPredicate(ctx context.Context, id CapacityPoolId, predicate VolumeOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]Volume, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c VolumesClient) preparerForList(ctx context.Context, id CapacityPoolId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c VolumesClient) responderForList(resp *http.Response) (result ListOperati } return } + +// ListComplete retrieves all of the results into a single object +func (c VolumesClient) ListComplete(ctx context.Context, id CapacityPoolId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, VolumeOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c VolumesClient) ListCompleteMatchingPredicate(ctx context.Context, id CapacityPoolId, predicate VolumeOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]Volume, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_list_autorest.go index 84d1ff164b51..523c1386ed12 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_list_autorest.go @@ -60,50 +60,6 @@ func (c NamespacesClient) List(ctx context.Context, id commonids.ResourceGroupId return } -// ListComplete retrieves all of the results into a single object -func (c NamespacesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NamespaceResourceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NamespaceResourceOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]NamespaceResource, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c NamespacesClient) preparerForList(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NamespacesClient) responderForList(resp *http.Response) (result ListOper } return } + +// ListComplete retrieves all of the results into a single object +func (c NamespacesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, NamespaceResourceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NamespaceResourceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]NamespaceResource, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listall_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listall_autorest.go index 652698908d01..f3a3ef9789ad 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listall_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listall_autorest.go @@ -60,50 +60,6 @@ func (c NamespacesClient) ListAll(ctx context.Context, id commonids.Subscription return } -// ListAllComplete retrieves all of the results into a single object -func (c NamespacesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, NamespaceResourceOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NamespaceResourceOperationPredicate) (resp ListAllCompleteResult, err error) { - items := make([]NamespaceResource, 0) - - page, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListAllCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListAll prepares the ListAll request. func (c NamespacesClient) preparerForListAll(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NamespacesClient) responderForListAll(resp *http.Response) (result ListA } return } + +// ListAllComplete retrieves all of the results into a single object +func (c NamespacesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { + return c.ListAllCompleteMatchingPredicate(ctx, id, NamespaceResourceOperationPredicate{}) +} + +// ListAllCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NamespaceResourceOperationPredicate) (resp ListAllCompleteResult, err error) { + items := make([]NamespaceResource, 0) + + page, err := c.ListAll(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListAllCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listauthorizationrules_autorest.go index 1973389e0d7e..b241c5740afc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/method_listauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c NamespacesClient) ListAuthorizationRules(ctx context.Context, id Namespa return } -// ListAuthorizationRulesComplete retrieves all of the results into a single object -func (c NamespacesClient) ListAuthorizationRulesComplete(ctx context.Context, id NamespaceId) (ListAuthorizationRulesCompleteResult, error) { - return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SharedAccessAuthorizationRuleResourceOperationPredicate{}) -} - -// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate SharedAccessAuthorizationRuleResourceOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { - items := make([]SharedAccessAuthorizationRuleResource, 0) - - page, err := c.ListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListAuthorizationRules prepares the ListAuthorizationRules request. func (c NamespacesClient) preparerForListAuthorizationRules(ctx context.Context, id NamespaceId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c NamespacesClient) responderForListAuthorizationRules(resp *http.Response } return } + +// ListAuthorizationRulesComplete retrieves all of the results into a single object +func (c NamespacesClient) ListAuthorizationRulesComplete(ctx context.Context, id NamespaceId) (ListAuthorizationRulesCompleteResult, error) { + return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SharedAccessAuthorizationRuleResourceOperationPredicate{}) +} + +// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate SharedAccessAuthorizationRuleResourceOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { + items := make([]SharedAccessAuthorizationRuleResource, 0) + + page, err := c.ListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_list_autorest.go index f91cfacf2013..a1eb5d672b20 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_list_autorest.go @@ -59,50 +59,6 @@ func (c NotificationHubsClient) List(ctx context.Context, id NamespaceId) (resp return } -// ListComplete retrieves all of the results into a single object -func (c NotificationHubsClient) ListComplete(ctx context.Context, id NamespaceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NotificationHubResourceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NotificationHubsClient) ListCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate NotificationHubResourceOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]NotificationHubResource, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c NotificationHubsClient) preparerForList(ctx context.Context, id NamespaceId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c NotificationHubsClient) responderForList(resp *http.Response) (result Li } return } + +// ListComplete retrieves all of the results into a single object +func (c NotificationHubsClient) ListComplete(ctx context.Context, id NamespaceId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, NotificationHubResourceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NotificationHubsClient) ListCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate NotificationHubResourceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]NotificationHubResource, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listauthorizationrules_autorest.go index 07b54192862c..9aabfdf10099 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c NotificationHubsClient) ListAuthorizationRules(ctx context.Context, id N return } -// ListAuthorizationRulesComplete retrieves all of the results into a single object -func (c NotificationHubsClient) ListAuthorizationRulesComplete(ctx context.Context, id NotificationHubId) (ListAuthorizationRulesCompleteResult, error) { - return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SharedAccessAuthorizationRuleResourceOperationPredicate{}) -} - -// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NotificationHubsClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NotificationHubId, predicate SharedAccessAuthorizationRuleResourceOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { - items := make([]SharedAccessAuthorizationRuleResource, 0) - - page, err := c.ListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListAuthorizationRules prepares the ListAuthorizationRules request. func (c NotificationHubsClient) preparerForListAuthorizationRules(ctx context.Context, id NotificationHubId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c NotificationHubsClient) responderForListAuthorizationRules(resp *http.Re } return } + +// ListAuthorizationRulesComplete retrieves all of the results into a single object +func (c NotificationHubsClient) ListAuthorizationRulesComplete(ctx context.Context, id NotificationHubId) (ListAuthorizationRulesCompleteResult, error) { + return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SharedAccessAuthorizationRuleResourceOperationPredicate{}) +} + +// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NotificationHubsClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NotificationHubId, predicate SharedAccessAuthorizationRuleResourceOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { + items := make([]SharedAccessAuthorizationRuleResource, 0) + + page, err := c.ListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querieslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querieslist_autorest.go index 1254f7c00d55..c20f9c4a84d3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querieslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querieslist_autorest.go @@ -88,50 +88,6 @@ func (c OperationalInsightsClient) QueriesList(ctx context.Context, id QueryPack return } -// QueriesListComplete retrieves all of the results into a single object -func (c OperationalInsightsClient) QueriesListComplete(ctx context.Context, id QueryPackId, options QueriesListOperationOptions) (QueriesListCompleteResult, error) { - return c.QueriesListCompleteMatchingPredicate(ctx, id, options, LogAnalyticsQueryPackQueryOperationPredicate{}) -} - -// QueriesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c OperationalInsightsClient) QueriesListCompleteMatchingPredicate(ctx context.Context, id QueryPackId, options QueriesListOperationOptions, predicate LogAnalyticsQueryPackQueryOperationPredicate) (resp QueriesListCompleteResult, err error) { - items := make([]LogAnalyticsQueryPackQuery, 0) - - page, err := c.QueriesList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := QueriesListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForQueriesList prepares the QueriesList request. func (c OperationalInsightsClient) preparerForQueriesList(ctx context.Context, id QueryPackId, options QueriesListOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c OperationalInsightsClient) responderForQueriesList(resp *http.Response) } return } + +// QueriesListComplete retrieves all of the results into a single object +func (c OperationalInsightsClient) QueriesListComplete(ctx context.Context, id QueryPackId, options QueriesListOperationOptions) (QueriesListCompleteResult, error) { + return c.QueriesListCompleteMatchingPredicate(ctx, id, options, LogAnalyticsQueryPackQueryOperationPredicate{}) +} + +// QueriesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c OperationalInsightsClient) QueriesListCompleteMatchingPredicate(ctx context.Context, id QueryPackId, options QueriesListOperationOptions, predicate LogAnalyticsQueryPackQueryOperationPredicate) (resp QueriesListCompleteResult, err error) { + items := make([]LogAnalyticsQueryPackQuery, 0) + + page, err := c.QueriesList(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := QueriesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriessearch_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriessearch_autorest.go index 871113c98db0..3c9029e17dd3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriessearch_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_queriessearch_autorest.go @@ -88,50 +88,6 @@ func (c OperationalInsightsClient) QueriesSearch(ctx context.Context, id QueryPa return } -// QueriesSearchComplete retrieves all of the results into a single object -func (c OperationalInsightsClient) QueriesSearchComplete(ctx context.Context, id QueryPackId, input LogAnalyticsQueryPackQuerySearchProperties, options QueriesSearchOperationOptions) (QueriesSearchCompleteResult, error) { - return c.QueriesSearchCompleteMatchingPredicate(ctx, id, input, options, LogAnalyticsQueryPackQueryOperationPredicate{}) -} - -// QueriesSearchCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c OperationalInsightsClient) QueriesSearchCompleteMatchingPredicate(ctx context.Context, id QueryPackId, input LogAnalyticsQueryPackQuerySearchProperties, options QueriesSearchOperationOptions, predicate LogAnalyticsQueryPackQueryOperationPredicate) (resp QueriesSearchCompleteResult, err error) { - items := make([]LogAnalyticsQueryPackQuery, 0) - - page, err := c.QueriesSearch(ctx, id, input, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := QueriesSearchCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForQueriesSearch prepares the QueriesSearch request. func (c OperationalInsightsClient) preparerForQueriesSearch(ctx context.Context, id QueryPackId, input LogAnalyticsQueryPackQuerySearchProperties, options QueriesSearchOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -219,3 +175,47 @@ func (c OperationalInsightsClient) responderForQueriesSearch(resp *http.Response } return } + +// QueriesSearchComplete retrieves all of the results into a single object +func (c OperationalInsightsClient) QueriesSearchComplete(ctx context.Context, id QueryPackId, input LogAnalyticsQueryPackQuerySearchProperties, options QueriesSearchOperationOptions) (QueriesSearchCompleteResult, error) { + return c.QueriesSearchCompleteMatchingPredicate(ctx, id, input, options, LogAnalyticsQueryPackQueryOperationPredicate{}) +} + +// QueriesSearchCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c OperationalInsightsClient) QueriesSearchCompleteMatchingPredicate(ctx context.Context, id QueryPackId, input LogAnalyticsQueryPackQuerySearchProperties, options QueriesSearchOperationOptions, predicate LogAnalyticsQueryPackQueryOperationPredicate) (resp QueriesSearchCompleteResult, err error) { + items := make([]LogAnalyticsQueryPackQuery, 0) + + page, err := c.QueriesSearch(ctx, id, input, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := QueriesSearchCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackslist_autorest.go index 579cd4fbb24d..5da696c35e74 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackslist_autorest.go @@ -60,50 +60,6 @@ func (c OperationalInsightsClient) QueryPacksList(ctx context.Context, id common return } -// QueryPacksListComplete retrieves all of the results into a single object -func (c OperationalInsightsClient) QueryPacksListComplete(ctx context.Context, id commonids.SubscriptionId) (QueryPacksListCompleteResult, error) { - return c.QueryPacksListCompleteMatchingPredicate(ctx, id, LogAnalyticsQueryPackOperationPredicate{}) -} - -// QueryPacksListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c OperationalInsightsClient) QueryPacksListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LogAnalyticsQueryPackOperationPredicate) (resp QueryPacksListCompleteResult, err error) { - items := make([]LogAnalyticsQueryPack, 0) - - page, err := c.QueryPacksList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := QueryPacksListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForQueryPacksList prepares the QueryPacksList request. func (c OperationalInsightsClient) preparerForQueryPacksList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c OperationalInsightsClient) responderForQueryPacksList(resp *http.Respons } return } + +// QueryPacksListComplete retrieves all of the results into a single object +func (c OperationalInsightsClient) QueryPacksListComplete(ctx context.Context, id commonids.SubscriptionId) (QueryPacksListCompleteResult, error) { + return c.QueryPacksListCompleteMatchingPredicate(ctx, id, LogAnalyticsQueryPackOperationPredicate{}) +} + +// QueryPacksListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c OperationalInsightsClient) QueryPacksListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LogAnalyticsQueryPackOperationPredicate) (resp QueryPacksListCompleteResult, err error) { + items := make([]LogAnalyticsQueryPack, 0) + + page, err := c.QueryPacksList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := QueryPacksListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackslistbyresourcegroup_autorest.go index 039d8addb9a3..ed95d3779b06 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackslistbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/operationalinsights/method_querypackslistbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c OperationalInsightsClient) QueryPacksListByResourceGroup(ctx context.Con return } -// QueryPacksListByResourceGroupComplete retrieves all of the results into a single object -func (c OperationalInsightsClient) QueryPacksListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (QueryPacksListByResourceGroupCompleteResult, error) { - return c.QueryPacksListByResourceGroupCompleteMatchingPredicate(ctx, id, LogAnalyticsQueryPackOperationPredicate{}) -} - -// QueryPacksListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c OperationalInsightsClient) QueryPacksListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LogAnalyticsQueryPackOperationPredicate) (resp QueryPacksListByResourceGroupCompleteResult, err error) { - items := make([]LogAnalyticsQueryPack, 0) - - page, err := c.QueryPacksListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := QueryPacksListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForQueryPacksListByResourceGroup prepares the QueryPacksListByResourceGroup request. func (c OperationalInsightsClient) preparerForQueryPacksListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c OperationalInsightsClient) responderForQueryPacksListByResourceGroup(res } return } + +// QueryPacksListByResourceGroupComplete retrieves all of the results into a single object +func (c OperationalInsightsClient) QueryPacksListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (QueryPacksListByResourceGroupCompleteResult, error) { + return c.QueryPacksListByResourceGroupCompleteMatchingPredicate(ctx, id, LogAnalyticsQueryPackOperationPredicate{}) +} + +// QueryPacksListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c OperationalInsightsClient) QueryPacksListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LogAnalyticsQueryPackOperationPredicate) (resp QueryPacksListByResourceGroupCompleteResult, err error) { + items := make([]LogAnalyticsQueryPack, 0) + + page, err := c.QueryPacksListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := QueryPacksListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatmanagementgroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatmanagementgroup_autorest.go index 3f8498215095..c9f369689d9e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatmanagementgroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatmanagementgroup_autorest.go @@ -83,50 +83,6 @@ func (c PolicyInsightsClient) RemediationsListDeploymentsAtManagementGroup(ctx c return } -// RemediationsListDeploymentsAtManagementGroupComplete retrieves all of the results into a single object -func (c PolicyInsightsClient) RemediationsListDeploymentsAtManagementGroupComplete(ctx context.Context, id Providers2RemediationId, options RemediationsListDeploymentsAtManagementGroupOperationOptions) (RemediationsListDeploymentsAtManagementGroupCompleteResult, error) { - return c.RemediationsListDeploymentsAtManagementGroupCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) -} - -// RemediationsListDeploymentsAtManagementGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PolicyInsightsClient) RemediationsListDeploymentsAtManagementGroupCompleteMatchingPredicate(ctx context.Context, id Providers2RemediationId, options RemediationsListDeploymentsAtManagementGroupOperationOptions, predicate RemediationDeploymentOperationPredicate) (resp RemediationsListDeploymentsAtManagementGroupCompleteResult, err error) { - items := make([]RemediationDeployment, 0) - - page, err := c.RemediationsListDeploymentsAtManagementGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemediationsListDeploymentsAtManagementGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemediationsListDeploymentsAtManagementGroup prepares the RemediationsListDeploymentsAtManagementGroup request. func (c PolicyInsightsClient) preparerForRemediationsListDeploymentsAtManagementGroup(ctx context.Context, id Providers2RemediationId, options RemediationsListDeploymentsAtManagementGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -213,3 +169,47 @@ func (c PolicyInsightsClient) responderForRemediationsListDeploymentsAtManagemen } return } + +// RemediationsListDeploymentsAtManagementGroupComplete retrieves all of the results into a single object +func (c PolicyInsightsClient) RemediationsListDeploymentsAtManagementGroupComplete(ctx context.Context, id Providers2RemediationId, options RemediationsListDeploymentsAtManagementGroupOperationOptions) (RemediationsListDeploymentsAtManagementGroupCompleteResult, error) { + return c.RemediationsListDeploymentsAtManagementGroupCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) +} + +// RemediationsListDeploymentsAtManagementGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PolicyInsightsClient) RemediationsListDeploymentsAtManagementGroupCompleteMatchingPredicate(ctx context.Context, id Providers2RemediationId, options RemediationsListDeploymentsAtManagementGroupOperationOptions, predicate RemediationDeploymentOperationPredicate) (resp RemediationsListDeploymentsAtManagementGroupCompleteResult, err error) { + items := make([]RemediationDeployment, 0) + + page, err := c.RemediationsListDeploymentsAtManagementGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemediationsListDeploymentsAtManagementGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatresource_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatresource_autorest.go index fd82c4339713..3865d9156a1f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatresource_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatresource_autorest.go @@ -83,50 +83,6 @@ func (c PolicyInsightsClient) RemediationsListDeploymentsAtResource(ctx context. return } -// RemediationsListDeploymentsAtResourceComplete retrieves all of the results into a single object -func (c PolicyInsightsClient) RemediationsListDeploymentsAtResourceComplete(ctx context.Context, id ScopedRemediationId, options RemediationsListDeploymentsAtResourceOperationOptions) (RemediationsListDeploymentsAtResourceCompleteResult, error) { - return c.RemediationsListDeploymentsAtResourceCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) -} - -// RemediationsListDeploymentsAtResourceCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PolicyInsightsClient) RemediationsListDeploymentsAtResourceCompleteMatchingPredicate(ctx context.Context, id ScopedRemediationId, options RemediationsListDeploymentsAtResourceOperationOptions, predicate RemediationDeploymentOperationPredicate) (resp RemediationsListDeploymentsAtResourceCompleteResult, err error) { - items := make([]RemediationDeployment, 0) - - page, err := c.RemediationsListDeploymentsAtResource(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemediationsListDeploymentsAtResourceCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemediationsListDeploymentsAtResource prepares the RemediationsListDeploymentsAtResource request. func (c PolicyInsightsClient) preparerForRemediationsListDeploymentsAtResource(ctx context.Context, id ScopedRemediationId, options RemediationsListDeploymentsAtResourceOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -213,3 +169,47 @@ func (c PolicyInsightsClient) responderForRemediationsListDeploymentsAtResource( } return } + +// RemediationsListDeploymentsAtResourceComplete retrieves all of the results into a single object +func (c PolicyInsightsClient) RemediationsListDeploymentsAtResourceComplete(ctx context.Context, id ScopedRemediationId, options RemediationsListDeploymentsAtResourceOperationOptions) (RemediationsListDeploymentsAtResourceCompleteResult, error) { + return c.RemediationsListDeploymentsAtResourceCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) +} + +// RemediationsListDeploymentsAtResourceCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PolicyInsightsClient) RemediationsListDeploymentsAtResourceCompleteMatchingPredicate(ctx context.Context, id ScopedRemediationId, options RemediationsListDeploymentsAtResourceOperationOptions, predicate RemediationDeploymentOperationPredicate) (resp RemediationsListDeploymentsAtResourceCompleteResult, err error) { + items := make([]RemediationDeployment, 0) + + page, err := c.RemediationsListDeploymentsAtResource(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemediationsListDeploymentsAtResourceCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatresourcegroup_autorest.go index ac8f20557850..25afc17b6333 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatresourcegroup_autorest.go @@ -83,50 +83,6 @@ func (c PolicyInsightsClient) RemediationsListDeploymentsAtResourceGroup(ctx con return } -// RemediationsListDeploymentsAtResourceGroupComplete retrieves all of the results into a single object -func (c PolicyInsightsClient) RemediationsListDeploymentsAtResourceGroupComplete(ctx context.Context, id ProviderRemediationId, options RemediationsListDeploymentsAtResourceGroupOperationOptions) (RemediationsListDeploymentsAtResourceGroupCompleteResult, error) { - return c.RemediationsListDeploymentsAtResourceGroupCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) -} - -// RemediationsListDeploymentsAtResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PolicyInsightsClient) RemediationsListDeploymentsAtResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderRemediationId, options RemediationsListDeploymentsAtResourceGroupOperationOptions, predicate RemediationDeploymentOperationPredicate) (resp RemediationsListDeploymentsAtResourceGroupCompleteResult, err error) { - items := make([]RemediationDeployment, 0) - - page, err := c.RemediationsListDeploymentsAtResourceGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemediationsListDeploymentsAtResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemediationsListDeploymentsAtResourceGroup prepares the RemediationsListDeploymentsAtResourceGroup request. func (c PolicyInsightsClient) preparerForRemediationsListDeploymentsAtResourceGroup(ctx context.Context, id ProviderRemediationId, options RemediationsListDeploymentsAtResourceGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -213,3 +169,47 @@ func (c PolicyInsightsClient) responderForRemediationsListDeploymentsAtResourceG } return } + +// RemediationsListDeploymentsAtResourceGroupComplete retrieves all of the results into a single object +func (c PolicyInsightsClient) RemediationsListDeploymentsAtResourceGroupComplete(ctx context.Context, id ProviderRemediationId, options RemediationsListDeploymentsAtResourceGroupOperationOptions) (RemediationsListDeploymentsAtResourceGroupCompleteResult, error) { + return c.RemediationsListDeploymentsAtResourceGroupCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) +} + +// RemediationsListDeploymentsAtResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PolicyInsightsClient) RemediationsListDeploymentsAtResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderRemediationId, options RemediationsListDeploymentsAtResourceGroupOperationOptions, predicate RemediationDeploymentOperationPredicate) (resp RemediationsListDeploymentsAtResourceGroupCompleteResult, err error) { + items := make([]RemediationDeployment, 0) + + page, err := c.RemediationsListDeploymentsAtResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemediationsListDeploymentsAtResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatsubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatsubscription_autorest.go index 8d6af304154d..36dbcee3fdf4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatsubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistdeploymentsatsubscription_autorest.go @@ -83,50 +83,6 @@ func (c PolicyInsightsClient) RemediationsListDeploymentsAtSubscription(ctx cont return } -// RemediationsListDeploymentsAtSubscriptionComplete retrieves all of the results into a single object -func (c PolicyInsightsClient) RemediationsListDeploymentsAtSubscriptionComplete(ctx context.Context, id RemediationId, options RemediationsListDeploymentsAtSubscriptionOperationOptions) (RemediationsListDeploymentsAtSubscriptionCompleteResult, error) { - return c.RemediationsListDeploymentsAtSubscriptionCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) -} - -// RemediationsListDeploymentsAtSubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PolicyInsightsClient) RemediationsListDeploymentsAtSubscriptionCompleteMatchingPredicate(ctx context.Context, id RemediationId, options RemediationsListDeploymentsAtSubscriptionOperationOptions, predicate RemediationDeploymentOperationPredicate) (resp RemediationsListDeploymentsAtSubscriptionCompleteResult, err error) { - items := make([]RemediationDeployment, 0) - - page, err := c.RemediationsListDeploymentsAtSubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemediationsListDeploymentsAtSubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemediationsListDeploymentsAtSubscription prepares the RemediationsListDeploymentsAtSubscription request. func (c PolicyInsightsClient) preparerForRemediationsListDeploymentsAtSubscription(ctx context.Context, id RemediationId, options RemediationsListDeploymentsAtSubscriptionOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -213,3 +169,47 @@ func (c PolicyInsightsClient) responderForRemediationsListDeploymentsAtSubscript } return } + +// RemediationsListDeploymentsAtSubscriptionComplete retrieves all of the results into a single object +func (c PolicyInsightsClient) RemediationsListDeploymentsAtSubscriptionComplete(ctx context.Context, id RemediationId, options RemediationsListDeploymentsAtSubscriptionOperationOptions) (RemediationsListDeploymentsAtSubscriptionCompleteResult, error) { + return c.RemediationsListDeploymentsAtSubscriptionCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) +} + +// RemediationsListDeploymentsAtSubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PolicyInsightsClient) RemediationsListDeploymentsAtSubscriptionCompleteMatchingPredicate(ctx context.Context, id RemediationId, options RemediationsListDeploymentsAtSubscriptionOperationOptions, predicate RemediationDeploymentOperationPredicate) (resp RemediationsListDeploymentsAtSubscriptionCompleteResult, err error) { + items := make([]RemediationDeployment, 0) + + page, err := c.RemediationsListDeploymentsAtSubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemediationsListDeploymentsAtSubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistformanagementgroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistformanagementgroup_autorest.go index c01bae19732d..8a5767596d02 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistformanagementgroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistformanagementgroup_autorest.go @@ -88,50 +88,6 @@ func (c PolicyInsightsClient) RemediationsListForManagementGroup(ctx context.Con return } -// RemediationsListForManagementGroupComplete retrieves all of the results into a single object -func (c PolicyInsightsClient) RemediationsListForManagementGroupComplete(ctx context.Context, id ManagementGroupId, options RemediationsListForManagementGroupOperationOptions) (RemediationsListForManagementGroupCompleteResult, error) { - return c.RemediationsListForManagementGroupCompleteMatchingPredicate(ctx, id, options, RemediationOperationPredicate{}) -} - -// RemediationsListForManagementGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PolicyInsightsClient) RemediationsListForManagementGroupCompleteMatchingPredicate(ctx context.Context, id ManagementGroupId, options RemediationsListForManagementGroupOperationOptions, predicate RemediationOperationPredicate) (resp RemediationsListForManagementGroupCompleteResult, err error) { - items := make([]Remediation, 0) - - page, err := c.RemediationsListForManagementGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemediationsListForManagementGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemediationsListForManagementGroup prepares the RemediationsListForManagementGroup request. func (c PolicyInsightsClient) preparerForRemediationsListForManagementGroup(ctx context.Context, id ManagementGroupId, options RemediationsListForManagementGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c PolicyInsightsClient) responderForRemediationsListForManagementGroup(res } return } + +// RemediationsListForManagementGroupComplete retrieves all of the results into a single object +func (c PolicyInsightsClient) RemediationsListForManagementGroupComplete(ctx context.Context, id ManagementGroupId, options RemediationsListForManagementGroupOperationOptions) (RemediationsListForManagementGroupCompleteResult, error) { + return c.RemediationsListForManagementGroupCompleteMatchingPredicate(ctx, id, options, RemediationOperationPredicate{}) +} + +// RemediationsListForManagementGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PolicyInsightsClient) RemediationsListForManagementGroupCompleteMatchingPredicate(ctx context.Context, id ManagementGroupId, options RemediationsListForManagementGroupOperationOptions, predicate RemediationOperationPredicate) (resp RemediationsListForManagementGroupCompleteResult, err error) { + items := make([]Remediation, 0) + + page, err := c.RemediationsListForManagementGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemediationsListForManagementGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforresource_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforresource_autorest.go index 216197b93b02..d9cd061f60df 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforresource_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforresource_autorest.go @@ -89,50 +89,6 @@ func (c PolicyInsightsClient) RemediationsListForResource(ctx context.Context, i return } -// RemediationsListForResourceComplete retrieves all of the results into a single object -func (c PolicyInsightsClient) RemediationsListForResourceComplete(ctx context.Context, id commonids.ScopeId, options RemediationsListForResourceOperationOptions) (RemediationsListForResourceCompleteResult, error) { - return c.RemediationsListForResourceCompleteMatchingPredicate(ctx, id, options, RemediationOperationPredicate{}) -} - -// RemediationsListForResourceCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PolicyInsightsClient) RemediationsListForResourceCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options RemediationsListForResourceOperationOptions, predicate RemediationOperationPredicate) (resp RemediationsListForResourceCompleteResult, err error) { - items := make([]Remediation, 0) - - page, err := c.RemediationsListForResource(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemediationsListForResourceCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemediationsListForResource prepares the RemediationsListForResource request. func (c PolicyInsightsClient) preparerForRemediationsListForResource(ctx context.Context, id commonids.ScopeId, options RemediationsListForResourceOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -219,3 +175,47 @@ func (c PolicyInsightsClient) responderForRemediationsListForResource(resp *http } return } + +// RemediationsListForResourceComplete retrieves all of the results into a single object +func (c PolicyInsightsClient) RemediationsListForResourceComplete(ctx context.Context, id commonids.ScopeId, options RemediationsListForResourceOperationOptions) (RemediationsListForResourceCompleteResult, error) { + return c.RemediationsListForResourceCompleteMatchingPredicate(ctx, id, options, RemediationOperationPredicate{}) +} + +// RemediationsListForResourceCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PolicyInsightsClient) RemediationsListForResourceCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options RemediationsListForResourceOperationOptions, predicate RemediationOperationPredicate) (resp RemediationsListForResourceCompleteResult, err error) { + items := make([]Remediation, 0) + + page, err := c.RemediationsListForResource(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemediationsListForResourceCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforresourcegroup_autorest.go index dca11d5822b1..dfc5abea3808 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforresourcegroup_autorest.go @@ -89,50 +89,6 @@ func (c PolicyInsightsClient) RemediationsListForResourceGroup(ctx context.Conte return } -// RemediationsListForResourceGroupComplete retrieves all of the results into a single object -func (c PolicyInsightsClient) RemediationsListForResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options RemediationsListForResourceGroupOperationOptions) (RemediationsListForResourceGroupCompleteResult, error) { - return c.RemediationsListForResourceGroupCompleteMatchingPredicate(ctx, id, options, RemediationOperationPredicate{}) -} - -// RemediationsListForResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PolicyInsightsClient) RemediationsListForResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options RemediationsListForResourceGroupOperationOptions, predicate RemediationOperationPredicate) (resp RemediationsListForResourceGroupCompleteResult, err error) { - items := make([]Remediation, 0) - - page, err := c.RemediationsListForResourceGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemediationsListForResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemediationsListForResourceGroup prepares the RemediationsListForResourceGroup request. func (c PolicyInsightsClient) preparerForRemediationsListForResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options RemediationsListForResourceGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -219,3 +175,47 @@ func (c PolicyInsightsClient) responderForRemediationsListForResourceGroup(resp } return } + +// RemediationsListForResourceGroupComplete retrieves all of the results into a single object +func (c PolicyInsightsClient) RemediationsListForResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options RemediationsListForResourceGroupOperationOptions) (RemediationsListForResourceGroupCompleteResult, error) { + return c.RemediationsListForResourceGroupCompleteMatchingPredicate(ctx, id, options, RemediationOperationPredicate{}) +} + +// RemediationsListForResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PolicyInsightsClient) RemediationsListForResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options RemediationsListForResourceGroupOperationOptions, predicate RemediationOperationPredicate) (resp RemediationsListForResourceGroupCompleteResult, err error) { + items := make([]Remediation, 0) + + page, err := c.RemediationsListForResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemediationsListForResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforsubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforsubscription_autorest.go index d40344c62fd7..00c7fd279100 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforsubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/policyinsights/method_remediationslistforsubscription_autorest.go @@ -89,50 +89,6 @@ func (c PolicyInsightsClient) RemediationsListForSubscription(ctx context.Contex return } -// RemediationsListForSubscriptionComplete retrieves all of the results into a single object -func (c PolicyInsightsClient) RemediationsListForSubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options RemediationsListForSubscriptionOperationOptions) (RemediationsListForSubscriptionCompleteResult, error) { - return c.RemediationsListForSubscriptionCompleteMatchingPredicate(ctx, id, options, RemediationOperationPredicate{}) -} - -// RemediationsListForSubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PolicyInsightsClient) RemediationsListForSubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options RemediationsListForSubscriptionOperationOptions, predicate RemediationOperationPredicate) (resp RemediationsListForSubscriptionCompleteResult, err error) { - items := make([]Remediation, 0) - - page, err := c.RemediationsListForSubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := RemediationsListForSubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForRemediationsListForSubscription prepares the RemediationsListForSubscription request. func (c PolicyInsightsClient) preparerForRemediationsListForSubscription(ctx context.Context, id commonids.SubscriptionId, options RemediationsListForSubscriptionOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -219,3 +175,47 @@ func (c PolicyInsightsClient) responderForRemediationsListForSubscription(resp * } return } + +// RemediationsListForSubscriptionComplete retrieves all of the results into a single object +func (c PolicyInsightsClient) RemediationsListForSubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options RemediationsListForSubscriptionOperationOptions) (RemediationsListForSubscriptionCompleteResult, error) { + return c.RemediationsListForSubscriptionCompleteMatchingPredicate(ctx, id, options, RemediationOperationPredicate{}) +} + +// RemediationsListForSubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PolicyInsightsClient) RemediationsListForSubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options RemediationsListForSubscriptionOperationOptions, predicate RemediationOperationPredicate) (resp RemediationsListForSubscriptionCompleteResult, err error) { + items := make([]Remediation, 0) + + page, err := c.RemediationsListForSubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := RemediationsListForSubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_listbyresourcegroup_autorest.go index 30edf901b2ba..afc26fbbef91 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c DashboardClient) ListByResourceGroup(ctx context.Context, id commonids.R return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c DashboardClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DashboardOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DashboardClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DashboardOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]Dashboard, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c DashboardClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c DashboardClient) responderForListByResourceGroup(resp *http.Response) (r } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c DashboardClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DashboardOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DashboardClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DashboardOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]Dashboard, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_listbysubscription_autorest.go index cbc7421a12e2..7418fde9bb20 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c DashboardClient) ListBySubscription(ctx context.Context, id commonids.Su return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c DashboardClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, DashboardOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DashboardClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DashboardOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]Dashboard, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c DashboardClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c DashboardClient) responderForListBySubscription(resp *http.Response) (re } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c DashboardClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, DashboardOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DashboardClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DashboardOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]Dashboard, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_listbyserver_autorest.go index 352767ca4a9d..c809b8b3df71 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_listbyserver_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_listbyserver_autorest.go @@ -59,50 +59,6 @@ func (c ServerSecurityAlertPoliciesClient) ListByServer(ctx context.Context, id return } -// ListByServerComplete retrieves all of the results into a single object -func (c ServerSecurityAlertPoliciesClient) ListByServerComplete(ctx context.Context, id ServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, ServerSecurityAlertPolicyOperationPredicate{}) -} - -// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ServerSecurityAlertPoliciesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate ServerSecurityAlertPolicyOperationPredicate) (resp ListByServerCompleteResult, err error) { - items := make([]ServerSecurityAlertPolicy, 0) - - page, err := c.ListByServer(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByServerCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByServer prepares the ListByServer request. func (c ServerSecurityAlertPoliciesClient) preparerForListByServer(ctx context.Context, id ServerId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ServerSecurityAlertPoliciesClient) responderForListByServer(resp *http.R } return } + +// ListByServerComplete retrieves all of the results into a single object +func (c ServerSecurityAlertPoliciesClient) ListByServerComplete(ctx context.Context, id ServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, ServerSecurityAlertPolicyOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ServerSecurityAlertPoliciesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate ServerSecurityAlertPolicyOperationPredicate) (resp ListByServerCompleteResult, err error) { + items := make([]ServerSecurityAlertPolicy, 0) + + page, err := c.ListByServer(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByServerCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_listbyserver_autorest.go index 02aee1776052..73136508fcb4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_listbyserver_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_listbyserver_autorest.go @@ -59,50 +59,6 @@ func (c VirtualNetworkRulesClient) ListByServer(ctx context.Context, id ServerId return } -// ListByServerComplete retrieves all of the results into a single object -func (c VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, id ServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, VirtualNetworkRuleOperationPredicate{}) -} - -// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c VirtualNetworkRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate VirtualNetworkRuleOperationPredicate) (resp ListByServerCompleteResult, err error) { - items := make([]VirtualNetworkRule, 0) - - page, err := c.ListByServer(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByServerCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByServer prepares the ListByServer request. func (c VirtualNetworkRulesClient) preparerForListByServer(ctx context.Context, id ServerId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c VirtualNetworkRulesClient) responderForListByServer(resp *http.Response) } return } + +// ListByServerComplete retrieves all of the results into a single object +func (c VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, id ServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, VirtualNetworkRuleOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c VirtualNetworkRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate VirtualNetworkRuleOperationPredicate) (resp ListByServerCompleteResult, err error) { + items := make([]VirtualNetworkRule, 0) + + page, err := c.ListByServer(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByServerCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/method_list_autorest.go index 687ba77b5547..3220784b72df 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/method_list_autorest.go @@ -59,50 +59,6 @@ func (c ServerKeysClient) List(ctx context.Context, id ServerId) (resp ListOpera return } -// ListComplete retrieves all of the results into a single object -func (c ServerKeysClient) ListComplete(ctx context.Context, id ServerId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ServerKeyOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ServerKeysClient) ListCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate ServerKeyOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]ServerKey, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c ServerKeysClient) preparerForList(ctx context.Context, id ServerId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ServerKeysClient) responderForList(resp *http.Response) (result ListOper } return } + +// ListComplete retrieves all of the results into a single object +func (c ServerKeysClient) ListComplete(ctx context.Context, id ServerId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ServerKeyOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ServerKeysClient) ListCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate ServerKeyOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]ServerKey, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/method_listbyserver_autorest.go index 5b83505dbdd2..93f2ecccdee6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/method_listbyserver_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/method_listbyserver_autorest.go @@ -59,50 +59,6 @@ func (c ConfigurationsClient) ListByServer(ctx context.Context, id FlexibleServe return } -// ListByServerComplete retrieves all of the results into a single object -func (c ConfigurationsClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, ConfigurationOperationPredicate{}) -} - -// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ConfigurationsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ConfigurationOperationPredicate) (resp ListByServerCompleteResult, err error) { - items := make([]Configuration, 0) - - page, err := c.ListByServer(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByServerCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByServer prepares the ListByServer request. func (c ConfigurationsClient) preparerForListByServer(ctx context.Context, id FlexibleServerId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ConfigurationsClient) responderForListByServer(resp *http.Response) (res } return } + +// ListByServerComplete retrieves all of the results into a single object +func (c ConfigurationsClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, ConfigurationOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ConfigurationsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ConfigurationOperationPredicate) (resp ListByServerCompleteResult, err error) { + items := make([]Configuration, 0) + + page, err := c.ListByServer(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByServerCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/databases/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/databases/method_listbyserver_autorest.go index 83a86470c813..5937f9e89587 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/databases/method_listbyserver_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/databases/method_listbyserver_autorest.go @@ -59,50 +59,6 @@ func (c DatabasesClient) ListByServer(ctx context.Context, id FlexibleServerId) return } -// ListByServerComplete retrieves all of the results into a single object -func (c DatabasesClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, DatabaseOperationPredicate{}) -} - -// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DatabasesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate DatabaseOperationPredicate) (resp ListByServerCompleteResult, err error) { - items := make([]Database, 0) - - page, err := c.ListByServer(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByServerCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByServer prepares the ListByServer request. func (c DatabasesClient) preparerForListByServer(ctx context.Context, id FlexibleServerId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c DatabasesClient) responderForListByServer(resp *http.Response) (result L } return } + +// ListByServerComplete retrieves all of the results into a single object +func (c DatabasesClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, DatabaseOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DatabasesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate DatabaseOperationPredicate) (resp ListByServerCompleteResult, err error) { + items := make([]Database, 0) + + page, err := c.ListByServer(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByServerCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/firewallrules/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/firewallrules/method_listbyserver_autorest.go index e4ba93f843a0..82fe51aed309 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/firewallrules/method_listbyserver_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/firewallrules/method_listbyserver_autorest.go @@ -59,50 +59,6 @@ func (c FirewallRulesClient) ListByServer(ctx context.Context, id FlexibleServer return } -// ListByServerComplete retrieves all of the results into a single object -func (c FirewallRulesClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, FirewallRuleOperationPredicate{}) -} - -// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c FirewallRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate FirewallRuleOperationPredicate) (resp ListByServerCompleteResult, err error) { - items := make([]FirewallRule, 0) - - page, err := c.ListByServer(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByServerCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByServer prepares the ListByServer request. func (c FirewallRulesClient) preparerForListByServer(ctx context.Context, id FlexibleServerId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c FirewallRulesClient) responderForListByServer(resp *http.Response) (resu } return } + +// ListByServerComplete retrieves all of the results into a single object +func (c FirewallRulesClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, FirewallRuleOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c FirewallRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate FirewallRuleOperationPredicate) (resp ListByServerCompleteResult, err error) { + items := make([]FirewallRule, 0) + + page, err := c.ListByServer(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByServerCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_list_autorest.go index fad33e15755f..c41e8d8ec753 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_list_autorest.go @@ -60,50 +60,6 @@ func (c ServersClient) List(ctx context.Context, id commonids.SubscriptionId) (r return } -// ListComplete retrieves all of the results into a single object -func (c ServersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ServerOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ServersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ServerOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]Server, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c ServersClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ServersClient) responderForList(resp *http.Response) (result ListOperati } return } + +// ListComplete retrieves all of the results into a single object +func (c ServersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ServerOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ServersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ServerOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]Server, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_listbyresourcegroup_autorest.go index 810a7f5f668e..e0329e5d7018 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ServersClient) ListByResourceGroup(ctx context.Context, id commonids.Res return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c ServersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ServerOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ServersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ServerOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]Server, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c ServersClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ServersClient) responderForListByResourceGroup(resp *http.Response) (res } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c ServersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ServerOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ServersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ServerOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]Server, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_list_autorest.go index e360aae9dba6..2a05c8a2602e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_list_autorest.go @@ -84,50 +84,6 @@ func (c PrivateZonesClient) List(ctx context.Context, id commonids.SubscriptionI return } -// ListComplete retrieves all of the results into a single object -func (c PrivateZonesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, PrivateZoneOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PrivateZonesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate PrivateZoneOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]PrivateZone, 0) - - page, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c PrivateZonesClient) preparerForList(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c PrivateZonesClient) responderForList(resp *http.Response) (result ListOp } return } + +// ListComplete retrieves all of the results into a single object +func (c PrivateZonesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, PrivateZoneOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PrivateZonesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate PrivateZoneOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]PrivateZone, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_listbyresourcegroup_autorest.go index 324d733240ba..21d9bacd8a21 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones/method_listbyresourcegroup_autorest.go @@ -84,50 +84,6 @@ func (c PrivateZonesClient) ListByResourceGroup(ctx context.Context, id commonid return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c PrivateZonesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, PrivateZoneOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PrivateZonesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate PrivateZoneOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]PrivateZone, 0) - - page, err := c.ListByResourceGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c PrivateZonesClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c PrivateZonesClient) responderForListByResourceGroup(resp *http.Response) } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c PrivateZonesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, PrivateZoneOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PrivateZonesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate PrivateZoneOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]PrivateZone, 0) + + page, err := c.ListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_list_autorest.go index 4c4c79f36785..f7b2d7a08390 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_list_autorest.go @@ -88,50 +88,6 @@ func (c RecordSetsClient) List(ctx context.Context, id PrivateDnsZoneId, options return } -// ListComplete retrieves all of the results into a single object -func (c RecordSetsClient) ListComplete(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, RecordSetOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RecordSetsClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions, predicate RecordSetOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]RecordSet, 0) - - page, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c RecordSetsClient) preparerForList(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c RecordSetsClient) responderForList(resp *http.Response) (result ListOper } return } + +// ListComplete retrieves all of the results into a single object +func (c RecordSetsClient) ListComplete(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, RecordSetOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c RecordSetsClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions, predicate RecordSetOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]RecordSet, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_listbytype_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_listbytype_autorest.go index ff07af1142d0..2d8355e2f2b8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_listbytype_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/recordsets/method_listbytype_autorest.go @@ -88,50 +88,6 @@ func (c RecordSetsClient) ListByType(ctx context.Context, id PrivateZoneId, opti return } -// ListByTypeComplete retrieves all of the results into a single object -func (c RecordSetsClient) ListByTypeComplete(ctx context.Context, id PrivateZoneId, options ListByTypeOperationOptions) (ListByTypeCompleteResult, error) { - return c.ListByTypeCompleteMatchingPredicate(ctx, id, options, RecordSetOperationPredicate{}) -} - -// ListByTypeCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RecordSetsClient) ListByTypeCompleteMatchingPredicate(ctx context.Context, id PrivateZoneId, options ListByTypeOperationOptions, predicate RecordSetOperationPredicate) (resp ListByTypeCompleteResult, err error) { - items := make([]RecordSet, 0) - - page, err := c.ListByType(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByTypeCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByType prepares the ListByType request. func (c RecordSetsClient) preparerForListByType(ctx context.Context, id PrivateZoneId, options ListByTypeOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c RecordSetsClient) responderForListByType(resp *http.Response) (result Li } return } + +// ListByTypeComplete retrieves all of the results into a single object +func (c RecordSetsClient) ListByTypeComplete(ctx context.Context, id PrivateZoneId, options ListByTypeOperationOptions) (ListByTypeCompleteResult, error) { + return c.ListByTypeCompleteMatchingPredicate(ctx, id, options, RecordSetOperationPredicate{}) +} + +// ListByTypeCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c RecordSetsClient) ListByTypeCompleteMatchingPredicate(ctx context.Context, id PrivateZoneId, options ListByTypeOperationOptions, predicate RecordSetOperationPredicate) (resp ListByTypeCompleteResult, err error) { + items := make([]RecordSet, 0) + + page, err := c.ListByType(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByTypeCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_list_autorest.go index 1b914068a49e..0855a9fcfc4b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/virtualnetworklinks/method_list_autorest.go @@ -83,50 +83,6 @@ func (c VirtualNetworkLinksClient) List(ctx context.Context, id PrivateDnsZoneId return } -// ListComplete retrieves all of the results into a single object -func (c VirtualNetworkLinksClient) ListComplete(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, VirtualNetworkLinkOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c VirtualNetworkLinksClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions, predicate VirtualNetworkLinkOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]VirtualNetworkLink, 0) - - page, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c VirtualNetworkLinksClient) preparerForList(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -213,3 +169,47 @@ func (c VirtualNetworkLinksClient) responderForList(resp *http.Response) (result } return } + +// ListComplete retrieves all of the results into a single object +func (c VirtualNetworkLinksClient) ListComplete(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, VirtualNetworkLinkOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c VirtualNetworkLinksClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions, predicate VirtualNetworkLinkOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]VirtualNetworkLink, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listbyresourcegroup_autorest.go index 22ceb2be2020..452d03d3bab0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c AccountClient) ListByResourceGroup(ctx context.Context, id commonids.Res return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c AccountClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AccountClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AccountOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]Account, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c AccountClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AccountClient) responderForListByResourceGroup(resp *http.Response) (res } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c AccountClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AccountClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AccountOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]Account, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listbysubscription_autorest.go index 3b197bd33aec..ae32361d3b20 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c AccountClient) ListBySubscription(ctx context.Context, id commonids.Subs return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c AccountClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AccountClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AccountOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]Account, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c AccountClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c AccountClient) responderForListBySubscription(resp *http.Response) (resu } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c AccountClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, AccountOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AccountClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AccountOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]Account, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_listbycluster_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_listbycluster_autorest.go index c04fe2e56bd6..9e17a1551a22 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_listbycluster_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/databases/method_listbycluster_autorest.go @@ -59,50 +59,6 @@ func (c DatabasesClient) ListByCluster(ctx context.Context, id RedisEnterpriseId return } -// ListByClusterComplete retrieves all of the results into a single object -func (c DatabasesClient) ListByClusterComplete(ctx context.Context, id RedisEnterpriseId) (ListByClusterCompleteResult, error) { - return c.ListByClusterCompleteMatchingPredicate(ctx, id, DatabaseOperationPredicate{}) -} - -// ListByClusterCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DatabasesClient) ListByClusterCompleteMatchingPredicate(ctx context.Context, id RedisEnterpriseId, predicate DatabaseOperationPredicate) (resp ListByClusterCompleteResult, err error) { - items := make([]Database, 0) - - page, err := c.ListByCluster(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByClusterCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByCluster prepares the ListByCluster request. func (c DatabasesClient) preparerForListByCluster(ctx context.Context, id RedisEnterpriseId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c DatabasesClient) responderForListByCluster(resp *http.Response) (result } return } + +// ListByClusterComplete retrieves all of the results into a single object +func (c DatabasesClient) ListByClusterComplete(ctx context.Context, id RedisEnterpriseId) (ListByClusterCompleteResult, error) { + return c.ListByClusterCompleteMatchingPredicate(ctx, id, DatabaseOperationPredicate{}) +} + +// ListByClusterCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DatabasesClient) ListByClusterCompleteMatchingPredicate(ctx context.Context, id RedisEnterpriseId, predicate DatabaseOperationPredicate) (resp ListByClusterCompleteResult, err error) { + items := make([]Database, 0) + + page, err := c.ListByCluster(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByClusterCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databaseslistbycluster_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databaseslistbycluster_autorest.go index ee50d8c7e45c..65ff784e56b1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databaseslistbycluster_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_databaseslistbycluster_autorest.go @@ -59,50 +59,6 @@ func (c RedisEnterpriseClient) DatabasesListByCluster(ctx context.Context, id Re return } -// DatabasesListByClusterComplete retrieves all of the results into a single object -func (c RedisEnterpriseClient) DatabasesListByClusterComplete(ctx context.Context, id RedisEnterpriseId) (DatabasesListByClusterCompleteResult, error) { - return c.DatabasesListByClusterCompleteMatchingPredicate(ctx, id, DatabaseOperationPredicate{}) -} - -// DatabasesListByClusterCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RedisEnterpriseClient) DatabasesListByClusterCompleteMatchingPredicate(ctx context.Context, id RedisEnterpriseId, predicate DatabaseOperationPredicate) (resp DatabasesListByClusterCompleteResult, err error) { - items := make([]Database, 0) - - page, err := c.DatabasesListByCluster(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := DatabasesListByClusterCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForDatabasesListByCluster prepares the DatabasesListByCluster request. func (c RedisEnterpriseClient) preparerForDatabasesListByCluster(ctx context.Context, id RedisEnterpriseId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c RedisEnterpriseClient) responderForDatabasesListByCluster(resp *http.Res } return } + +// DatabasesListByClusterComplete retrieves all of the results into a single object +func (c RedisEnterpriseClient) DatabasesListByClusterComplete(ctx context.Context, id RedisEnterpriseId) (DatabasesListByClusterCompleteResult, error) { + return c.DatabasesListByClusterCompleteMatchingPredicate(ctx, id, DatabaseOperationPredicate{}) +} + +// DatabasesListByClusterCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c RedisEnterpriseClient) DatabasesListByClusterCompleteMatchingPredicate(ctx context.Context, id RedisEnterpriseId, predicate DatabaseOperationPredicate) (resp DatabasesListByClusterCompleteResult, err error) { + items := make([]Database, 0) + + page, err := c.DatabasesListByCluster(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := DatabasesListByClusterCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_list_autorest.go index 6e382afe8a46..daade762428c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_list_autorest.go @@ -60,50 +60,6 @@ func (c RedisEnterpriseClient) List(ctx context.Context, id commonids.Subscripti return } -// ListComplete retrieves all of the results into a single object -func (c RedisEnterpriseClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RedisEnterpriseClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]Cluster, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c RedisEnterpriseClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c RedisEnterpriseClient) responderForList(resp *http.Response) (result Lis } return } + +// ListComplete retrieves all of the results into a single object +func (c RedisEnterpriseClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c RedisEnterpriseClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]Cluster, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_listbyresourcegroup_autorest.go index 520233fbb856..2240557de0b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2022-01-01/redisenterprise/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c RedisEnterpriseClient) ListByResourceGroup(ctx context.Context, id commo return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c RedisEnterpriseClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RedisEnterpriseClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]Cluster, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c RedisEnterpriseClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c RedisEnterpriseClient) responderForListByResourceGroup(resp *http.Respon } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c RedisEnterpriseClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c RedisEnterpriseClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]Cluster, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listauthorizationrules_autorest.go index c6abcad906fc..23c400872662 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c HybridConnectionsClient) ListAuthorizationRules(ctx context.Context, id return } -// ListAuthorizationRulesComplete retrieves all of the results into a single object -func (c HybridConnectionsClient) ListAuthorizationRulesComplete(ctx context.Context, id HybridConnectionId) (ListAuthorizationRulesCompleteResult, error) { - return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, AuthorizationRuleOperationPredicate{}) -} - -// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c HybridConnectionsClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id HybridConnectionId, predicate AuthorizationRuleOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { - items := make([]AuthorizationRule, 0) - - page, err := c.ListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListAuthorizationRules prepares the ListAuthorizationRules request. func (c HybridConnectionsClient) preparerForListAuthorizationRules(ctx context.Context, id HybridConnectionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c HybridConnectionsClient) responderForListAuthorizationRules(resp *http.R } return } + +// ListAuthorizationRulesComplete retrieves all of the results into a single object +func (c HybridConnectionsClient) ListAuthorizationRulesComplete(ctx context.Context, id HybridConnectionId) (ListAuthorizationRulesCompleteResult, error) { + return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, AuthorizationRuleOperationPredicate{}) +} + +// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c HybridConnectionsClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id HybridConnectionId, predicate AuthorizationRuleOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { + items := make([]AuthorizationRule, 0) + + page, err := c.ListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listbynamespace_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listbynamespace_autorest.go index 4a3fb4f0af2b..1062f8d85d5d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listbynamespace_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections/method_listbynamespace_autorest.go @@ -59,50 +59,6 @@ func (c HybridConnectionsClient) ListByNamespace(ctx context.Context, id Namespa return } -// ListByNamespaceComplete retrieves all of the results into a single object -func (c HybridConnectionsClient) ListByNamespaceComplete(ctx context.Context, id NamespaceId) (ListByNamespaceCompleteResult, error) { - return c.ListByNamespaceCompleteMatchingPredicate(ctx, id, HybridConnectionOperationPredicate{}) -} - -// ListByNamespaceCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c HybridConnectionsClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate HybridConnectionOperationPredicate) (resp ListByNamespaceCompleteResult, err error) { - items := make([]HybridConnection, 0) - - page, err := c.ListByNamespace(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByNamespaceCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByNamespace prepares the ListByNamespace request. func (c HybridConnectionsClient) preparerForListByNamespace(ctx context.Context, id NamespaceId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c HybridConnectionsClient) responderForListByNamespace(resp *http.Response } return } + +// ListByNamespaceComplete retrieves all of the results into a single object +func (c HybridConnectionsClient) ListByNamespaceComplete(ctx context.Context, id NamespaceId) (ListByNamespaceCompleteResult, error) { + return c.ListByNamespaceCompleteMatchingPredicate(ctx, id, HybridConnectionOperationPredicate{}) +} + +// ListByNamespaceCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c HybridConnectionsClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate HybridConnectionOperationPredicate) (resp ListByNamespaceCompleteResult, err error) { + items := make([]HybridConnection, 0) + + page, err := c.ListByNamespace(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByNamespaceCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_list_autorest.go index 8634e93e992c..f5067719cee0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_list_autorest.go @@ -60,50 +60,6 @@ func (c NamespacesClient) List(ctx context.Context, id commonids.SubscriptionId) return } -// ListComplete retrieves all of the results into a single object -func (c NamespacesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, RelayNamespaceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RelayNamespaceOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]RelayNamespace, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c NamespacesClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NamespacesClient) responderForList(resp *http.Response) (result ListOper } return } + +// ListComplete retrieves all of the results into a single object +func (c NamespacesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, RelayNamespaceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RelayNamespaceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]RelayNamespace, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listauthorizationrules_autorest.go index aa1c293f80af..39e6b9d4eca9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c NamespacesClient) ListAuthorizationRules(ctx context.Context, id Namespa return } -// ListAuthorizationRulesComplete retrieves all of the results into a single object -func (c NamespacesClient) ListAuthorizationRulesComplete(ctx context.Context, id NamespaceId) (ListAuthorizationRulesCompleteResult, error) { - return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, AuthorizationRuleOperationPredicate{}) -} - -// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate AuthorizationRuleOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { - items := make([]AuthorizationRule, 0) - - page, err := c.ListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListAuthorizationRules prepares the ListAuthorizationRules request. func (c NamespacesClient) preparerForListAuthorizationRules(ctx context.Context, id NamespaceId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c NamespacesClient) responderForListAuthorizationRules(resp *http.Response } return } + +// ListAuthorizationRulesComplete retrieves all of the results into a single object +func (c NamespacesClient) ListAuthorizationRulesComplete(ctx context.Context, id NamespaceId) (ListAuthorizationRulesCompleteResult, error) { + return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, AuthorizationRuleOperationPredicate{}) +} + +// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate AuthorizationRuleOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { + items := make([]AuthorizationRule, 0) + + page, err := c.ListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listbyresourcegroup_autorest.go index 2dec8afaffa2..e1248f2d5aa5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c NamespacesClient) ListByResourceGroup(ctx context.Context, id commonids. return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c NamespacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, RelayNamespaceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate RelayNamespaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]RelayNamespace, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c NamespacesClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NamespacesClient) responderForListByResourceGroup(resp *http.Response) ( } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c NamespacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, RelayNamespaceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate RelayNamespaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]RelayNamespace, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_listbysearchservice_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_listbysearchservice_autorest.go index 340eadb1a28f..da48dbc76805 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_listbysearchservice_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/querykeys/method_listbysearchservice_autorest.go @@ -83,50 +83,6 @@ func (c QueryKeysClient) ListBySearchService(ctx context.Context, id SearchServi return } -// ListBySearchServiceComplete retrieves all of the results into a single object -func (c QueryKeysClient) ListBySearchServiceComplete(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions) (ListBySearchServiceCompleteResult, error) { - return c.ListBySearchServiceCompleteMatchingPredicate(ctx, id, options, QueryKeyOperationPredicate{}) -} - -// ListBySearchServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c QueryKeysClient) ListBySearchServiceCompleteMatchingPredicate(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions, predicate QueryKeyOperationPredicate) (resp ListBySearchServiceCompleteResult, err error) { - items := make([]QueryKey, 0) - - page, err := c.ListBySearchService(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySearchServiceCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySearchService prepares the ListBySearchService request. func (c QueryKeysClient) preparerForListBySearchService(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -213,3 +169,47 @@ func (c QueryKeysClient) responderForListBySearchService(resp *http.Response) (r } return } + +// ListBySearchServiceComplete retrieves all of the results into a single object +func (c QueryKeysClient) ListBySearchServiceComplete(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions) (ListBySearchServiceCompleteResult, error) { + return c.ListBySearchServiceCompleteMatchingPredicate(ctx, id, options, QueryKeyOperationPredicate{}) +} + +// ListBySearchServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c QueryKeysClient) ListBySearchServiceCompleteMatchingPredicate(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions, predicate QueryKeyOperationPredicate) (resp ListBySearchServiceCompleteResult, err error) { + items := make([]QueryKey, 0) + + page, err := c.ListBySearchService(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySearchServiceCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_listbyresourcegroup_autorest.go index 24ca1fd237d6..1e1bd5bcb51b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_listbyresourcegroup_autorest.go @@ -84,50 +84,6 @@ func (c ServicesClient) ListByResourceGroup(ctx context.Context, id commonids.Re return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c ServicesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, SearchServiceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ServicesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate SearchServiceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]SearchService, 0) - - page, err := c.ListByResourceGroup(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c ServicesClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c ServicesClient) responderForListByResourceGroup(resp *http.Response) (re } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c ServicesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, SearchServiceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ServicesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate SearchServiceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]SearchService, 0) + + page, err := c.ListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_listbysubscription_autorest.go index e849c6069041..3f5d2c62d6cd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2020-03-13/services/method_listbysubscription_autorest.go @@ -84,50 +84,6 @@ func (c ServicesClient) ListBySubscription(ctx context.Context, id commonids.Sub return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c ServicesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, SearchServiceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ServicesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate SearchServiceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]SearchService, 0) - - page, err := c.ListBySubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c ServicesClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -214,3 +170,47 @@ func (c ServicesClient) responderForListBySubscription(resp *http.Response) (res } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c ServicesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, SearchServiceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ServicesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate SearchServiceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]SearchService, 0) + + page, err := c.ListBySubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_list_autorest.go index abd321a27394..8c2609194103 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_list_autorest.go @@ -59,50 +59,6 @@ func (c DisasterRecoveryConfigsClient) List(ctx context.Context, id NamespaceId) return } -// ListComplete retrieves all of the results into a single object -func (c DisasterRecoveryConfigsClient) ListComplete(ctx context.Context, id NamespaceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ArmDisasterRecoveryOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DisasterRecoveryConfigsClient) ListCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate ArmDisasterRecoveryOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]ArmDisasterRecovery, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c DisasterRecoveryConfigsClient) preparerForList(ctx context.Context, id NamespaceId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c DisasterRecoveryConfigsClient) responderForList(resp *http.Response) (re } return } + +// ListComplete retrieves all of the results into a single object +func (c DisasterRecoveryConfigsClient) ListComplete(ctx context.Context, id NamespaceId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ArmDisasterRecoveryOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DisasterRecoveryConfigsClient) ListCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate ArmDisasterRecoveryOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]ArmDisasterRecovery, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listauthorizationrules_autorest.go index e6bdeaccb281..15c372a6dbb9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c DisasterRecoveryConfigsClient) ListAuthorizationRules(ctx context.Contex return } -// ListAuthorizationRulesComplete retrieves all of the results into a single object -func (c DisasterRecoveryConfigsClient) ListAuthorizationRulesComplete(ctx context.Context, id DisasterRecoveryConfigId) (ListAuthorizationRulesCompleteResult, error) { - return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SBAuthorizationRuleOperationPredicate{}) -} - -// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DisasterRecoveryConfigsClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id DisasterRecoveryConfigId, predicate SBAuthorizationRuleOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { - items := make([]SBAuthorizationRule, 0) - - page, err := c.ListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListAuthorizationRules prepares the ListAuthorizationRules request. func (c DisasterRecoveryConfigsClient) preparerForListAuthorizationRules(ctx context.Context, id DisasterRecoveryConfigId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c DisasterRecoveryConfigsClient) responderForListAuthorizationRules(resp * } return } + +// ListAuthorizationRulesComplete retrieves all of the results into a single object +func (c DisasterRecoveryConfigsClient) ListAuthorizationRulesComplete(ctx context.Context, id DisasterRecoveryConfigId) (ListAuthorizationRulesCompleteResult, error) { + return c.ListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SBAuthorizationRuleOperationPredicate{}) +} + +// ListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DisasterRecoveryConfigsClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id DisasterRecoveryConfigId, predicate SBAuthorizationRuleOperationPredicate) (resp ListAuthorizationRulesCompleteResult, err error) { + items := make([]SBAuthorizationRule, 0) + + page, err := c.ListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_list_autorest.go index 462132445705..718a613dd9c1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_list_autorest.go @@ -60,50 +60,6 @@ func (c NamespacesClient) List(ctx context.Context, id commonids.SubscriptionId) return } -// ListComplete retrieves all of the results into a single object -func (c NamespacesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, SBNamespaceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SBNamespaceOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]SBNamespace, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c NamespacesClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NamespacesClient) responderForList(resp *http.Response) (result ListOper } return } + +// ListComplete retrieves all of the results into a single object +func (c NamespacesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, SBNamespaceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SBNamespaceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]SBNamespace, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_listbyresourcegroup_autorest.go index 3fd7cc3216d1..079db544744e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c NamespacesClient) ListByResourceGroup(ctx context.Context, id commonids. return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c NamespacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SBNamespaceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SBNamespaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]SBNamespace, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c NamespacesClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c NamespacesClient) responderForListByResourceGroup(resp *http.Response) ( } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c NamespacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SBNamespaceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SBNamespaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]SBNamespace, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_listnetworkrulesets_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_listnetworkrulesets_autorest.go index 3993bb002402..0310c543727a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_listnetworkrulesets_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces/method_listnetworkrulesets_autorest.go @@ -59,50 +59,6 @@ func (c NamespacesClient) ListNetworkRuleSets(ctx context.Context, id NamespaceI return } -// ListNetworkRuleSetsComplete retrieves all of the results into a single object -func (c NamespacesClient) ListNetworkRuleSetsComplete(ctx context.Context, id NamespaceId) (ListNetworkRuleSetsCompleteResult, error) { - return c.ListNetworkRuleSetsCompleteMatchingPredicate(ctx, id, NetworkRuleSetOperationPredicate{}) -} - -// ListNetworkRuleSetsCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesClient) ListNetworkRuleSetsCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate NetworkRuleSetOperationPredicate) (resp ListNetworkRuleSetsCompleteResult, err error) { - items := make([]NetworkRuleSet, 0) - - page, err := c.ListNetworkRuleSets(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListNetworkRuleSetsCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListNetworkRuleSets prepares the ListNetworkRuleSets request. func (c NamespacesClient) preparerForListNetworkRuleSets(ctx context.Context, id NamespaceId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c NamespacesClient) responderForListNetworkRuleSets(resp *http.Response) ( } return } + +// ListNetworkRuleSetsComplete retrieves all of the results into a single object +func (c NamespacesClient) ListNetworkRuleSetsComplete(ctx context.Context, id NamespaceId) (ListNetworkRuleSetsCompleteResult, error) { + return c.ListNetworkRuleSetsCompleteMatchingPredicate(ctx, id, NetworkRuleSetOperationPredicate{}) +} + +// ListNetworkRuleSetsCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesClient) ListNetworkRuleSetsCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate NetworkRuleSetOperationPredicate) (resp ListNetworkRuleSetsCompleteResult, err error) { + items := make([]NetworkRuleSet, 0) + + page, err := c.ListNetworkRuleSets(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListNetworkRuleSetsCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistauthorizationrules_autorest.go index d1b97182d315..02b0a38a0ea7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesListAuthorizationRules(ctx return } -// NamespacesListAuthorizationRulesComplete retrieves all of the results into a single object -func (c NamespacesAuthorizationRuleClient) NamespacesListAuthorizationRulesComplete(ctx context.Context, id NamespaceId) (NamespacesListAuthorizationRulesCompleteResult, error) { - return c.NamespacesListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SBAuthorizationRuleOperationPredicate{}) -} - -// NamespacesListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NamespacesAuthorizationRuleClient) NamespacesListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate SBAuthorizationRuleOperationPredicate) (resp NamespacesListAuthorizationRulesCompleteResult, err error) { - items := make([]SBAuthorizationRule, 0) - - page, err := c.NamespacesListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := NamespacesListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForNamespacesListAuthorizationRules prepares the NamespacesListAuthorizationRules request. func (c NamespacesAuthorizationRuleClient) preparerForNamespacesListAuthorizationRules(ctx context.Context, id NamespaceId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c NamespacesAuthorizationRuleClient) responderForNamespacesListAuthorizati } return } + +// NamespacesListAuthorizationRulesComplete retrieves all of the results into a single object +func (c NamespacesAuthorizationRuleClient) NamespacesListAuthorizationRulesComplete(ctx context.Context, id NamespaceId) (NamespacesListAuthorizationRulesCompleteResult, error) { + return c.NamespacesListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SBAuthorizationRuleOperationPredicate{}) +} + +// NamespacesListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NamespacesAuthorizationRuleClient) NamespacesListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate SBAuthorizationRuleOperationPredicate) (resp NamespacesListAuthorizationRulesCompleteResult, err error) { + items := make([]SBAuthorizationRule, 0) + + page, err := c.NamespacesListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := NamespacesListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_listbynamespace_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_listbynamespace_autorest.go index 53be58663414..a3a53f1cfaf1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_listbynamespace_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/method_listbynamespace_autorest.go @@ -88,50 +88,6 @@ func (c QueuesClient) ListByNamespace(ctx context.Context, id NamespaceId, optio return } -// ListByNamespaceComplete retrieves all of the results into a single object -func (c QueuesClient) ListByNamespaceComplete(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions) (ListByNamespaceCompleteResult, error) { - return c.ListByNamespaceCompleteMatchingPredicate(ctx, id, options, SBQueueOperationPredicate{}) -} - -// ListByNamespaceCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c QueuesClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions, predicate SBQueueOperationPredicate) (resp ListByNamespaceCompleteResult, err error) { - items := make([]SBQueue, 0) - - page, err := c.ListByNamespace(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByNamespaceCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByNamespace prepares the ListByNamespace request. func (c QueuesClient) preparerForListByNamespace(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c QueuesClient) responderForListByNamespace(resp *http.Response) (result L } return } + +// ListByNamespaceComplete retrieves all of the results into a single object +func (c QueuesClient) ListByNamespaceComplete(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions) (ListByNamespaceCompleteResult, error) { + return c.ListByNamespaceCompleteMatchingPredicate(ctx, id, options, SBQueueOperationPredicate{}) +} + +// ListByNamespaceCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c QueuesClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions, predicate SBQueueOperationPredicate) (resp ListByNamespaceCompleteResult, err error) { + items := make([]SBQueue, 0) + + page, err := c.ListByNamespace(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByNamespaceCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistauthorizationrules_autorest.go index 82e7db8815eb..f34013aefd57 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c QueuesAuthorizationRuleClient) QueuesListAuthorizationRules(ctx context. return } -// QueuesListAuthorizationRulesComplete retrieves all of the results into a single object -func (c QueuesAuthorizationRuleClient) QueuesListAuthorizationRulesComplete(ctx context.Context, id QueueId) (QueuesListAuthorizationRulesCompleteResult, error) { - return c.QueuesListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SBAuthorizationRuleOperationPredicate{}) -} - -// QueuesListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c QueuesAuthorizationRuleClient) QueuesListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id QueueId, predicate SBAuthorizationRuleOperationPredicate) (resp QueuesListAuthorizationRulesCompleteResult, err error) { - items := make([]SBAuthorizationRule, 0) - - page, err := c.QueuesListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := QueuesListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForQueuesListAuthorizationRules prepares the QueuesListAuthorizationRules request. func (c QueuesAuthorizationRuleClient) preparerForQueuesListAuthorizationRules(ctx context.Context, id QueueId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c QueuesAuthorizationRuleClient) responderForQueuesListAuthorizationRules( } return } + +// QueuesListAuthorizationRulesComplete retrieves all of the results into a single object +func (c QueuesAuthorizationRuleClient) QueuesListAuthorizationRulesComplete(ctx context.Context, id QueueId) (QueuesListAuthorizationRulesCompleteResult, error) { + return c.QueuesListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SBAuthorizationRuleOperationPredicate{}) +} + +// QueuesListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c QueuesAuthorizationRuleClient) QueuesListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id QueueId, predicate SBAuthorizationRuleOperationPredicate) (resp QueuesListAuthorizationRulesCompleteResult, err error) { + items := make([]SBAuthorizationRule, 0) + + page, err := c.QueuesListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := QueuesListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_listbysubscriptions_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_listbysubscriptions_autorest.go index 57c918acc5f7..6a73c40dd46b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_listbysubscriptions_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/method_listbysubscriptions_autorest.go @@ -88,50 +88,6 @@ func (c RulesClient) ListBySubscriptions(ctx context.Context, id Subscriptions2I return } -// ListBySubscriptionsComplete retrieves all of the results into a single object -func (c RulesClient) ListBySubscriptionsComplete(ctx context.Context, id Subscriptions2Id, options ListBySubscriptionsOperationOptions) (ListBySubscriptionsCompleteResult, error) { - return c.ListBySubscriptionsCompleteMatchingPredicate(ctx, id, options, RuleOperationPredicate{}) -} - -// ListBySubscriptionsCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RulesClient) ListBySubscriptionsCompleteMatchingPredicate(ctx context.Context, id Subscriptions2Id, options ListBySubscriptionsOperationOptions, predicate RuleOperationPredicate) (resp ListBySubscriptionsCompleteResult, err error) { - items := make([]Rule, 0) - - page, err := c.ListBySubscriptions(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionsCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscriptions prepares the ListBySubscriptions request. func (c RulesClient) preparerForListBySubscriptions(ctx context.Context, id Subscriptions2Id, options ListBySubscriptionsOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c RulesClient) responderForListBySubscriptions(resp *http.Response) (resul } return } + +// ListBySubscriptionsComplete retrieves all of the results into a single object +func (c RulesClient) ListBySubscriptionsComplete(ctx context.Context, id Subscriptions2Id, options ListBySubscriptionsOperationOptions) (ListBySubscriptionsCompleteResult, error) { + return c.ListBySubscriptionsCompleteMatchingPredicate(ctx, id, options, RuleOperationPredicate{}) +} + +// ListBySubscriptionsCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c RulesClient) ListBySubscriptionsCompleteMatchingPredicate(ctx context.Context, id Subscriptions2Id, options ListBySubscriptionsOperationOptions, predicate RuleOperationPredicate) (resp ListBySubscriptionsCompleteResult, err error) { + items := make([]Rule, 0) + + page, err := c.ListBySubscriptions(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionsCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_listbytopic_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_listbytopic_autorest.go index 42884bed6c53..eda66172c4fe 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_listbytopic_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_listbytopic_autorest.go @@ -88,50 +88,6 @@ func (c SubscriptionsClient) ListByTopic(ctx context.Context, id TopicId, option return } -// ListByTopicComplete retrieves all of the results into a single object -func (c SubscriptionsClient) ListByTopicComplete(ctx context.Context, id TopicId, options ListByTopicOperationOptions) (ListByTopicCompleteResult, error) { - return c.ListByTopicCompleteMatchingPredicate(ctx, id, options, SBSubscriptionOperationPredicate{}) -} - -// ListByTopicCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SubscriptionsClient) ListByTopicCompleteMatchingPredicate(ctx context.Context, id TopicId, options ListByTopicOperationOptions, predicate SBSubscriptionOperationPredicate) (resp ListByTopicCompleteResult, err error) { - items := make([]SBSubscription, 0) - - page, err := c.ListByTopic(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByTopicCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByTopic prepares the ListByTopic request. func (c SubscriptionsClient) preparerForListByTopic(ctx context.Context, id TopicId, options ListByTopicOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c SubscriptionsClient) responderForListByTopic(resp *http.Response) (resul } return } + +// ListByTopicComplete retrieves all of the results into a single object +func (c SubscriptionsClient) ListByTopicComplete(ctx context.Context, id TopicId, options ListByTopicOperationOptions) (ListByTopicCompleteResult, error) { + return c.ListByTopicCompleteMatchingPredicate(ctx, id, options, SBSubscriptionOperationPredicate{}) +} + +// ListByTopicCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SubscriptionsClient) ListByTopicCompleteMatchingPredicate(ctx context.Context, id TopicId, options ListByTopicOperationOptions, predicate SBSubscriptionOperationPredicate) (resp ListByTopicCompleteResult, err error) { + items := make([]SBSubscription, 0) + + page, err := c.ListByTopic(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByTopicCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_listbynamespace_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_listbynamespace_autorest.go index 1f202d4aeef9..5b3257c8eece 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_listbynamespace_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/method_listbynamespace_autorest.go @@ -88,50 +88,6 @@ func (c TopicsClient) ListByNamespace(ctx context.Context, id NamespaceId, optio return } -// ListByNamespaceComplete retrieves all of the results into a single object -func (c TopicsClient) ListByNamespaceComplete(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions) (ListByNamespaceCompleteResult, error) { - return c.ListByNamespaceCompleteMatchingPredicate(ctx, id, options, SBTopicOperationPredicate{}) -} - -// ListByNamespaceCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c TopicsClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions, predicate SBTopicOperationPredicate) (resp ListByNamespaceCompleteResult, err error) { - items := make([]SBTopic, 0) - - page, err := c.ListByNamespace(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByNamespaceCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByNamespace prepares the ListByNamespace request. func (c TopicsClient) preparerForListByNamespace(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -218,3 +174,47 @@ func (c TopicsClient) responderForListByNamespace(resp *http.Response) (result L } return } + +// ListByNamespaceComplete retrieves all of the results into a single object +func (c TopicsClient) ListByNamespaceComplete(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions) (ListByNamespaceCompleteResult, error) { + return c.ListByNamespaceCompleteMatchingPredicate(ctx, id, options, SBTopicOperationPredicate{}) +} + +// ListByNamespaceCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c TopicsClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions, predicate SBTopicOperationPredicate) (resp ListByNamespaceCompleteResult, err error) { + items := make([]SBTopic, 0) + + page, err := c.ListByNamespace(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByNamespaceCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistauthorizationrules_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistauthorizationrules_autorest.go index 23dad36ef651..be10b275338a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistauthorizationrules_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistauthorizationrules_autorest.go @@ -59,50 +59,6 @@ func (c TopicsAuthorizationRuleClient) TopicsListAuthorizationRules(ctx context. return } -// TopicsListAuthorizationRulesComplete retrieves all of the results into a single object -func (c TopicsAuthorizationRuleClient) TopicsListAuthorizationRulesComplete(ctx context.Context, id TopicId) (TopicsListAuthorizationRulesCompleteResult, error) { - return c.TopicsListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SBAuthorizationRuleOperationPredicate{}) -} - -// TopicsListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c TopicsAuthorizationRuleClient) TopicsListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id TopicId, predicate SBAuthorizationRuleOperationPredicate) (resp TopicsListAuthorizationRulesCompleteResult, err error) { - items := make([]SBAuthorizationRule, 0) - - page, err := c.TopicsListAuthorizationRules(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := TopicsListAuthorizationRulesCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForTopicsListAuthorizationRules prepares the TopicsListAuthorizationRules request. func (c TopicsAuthorizationRuleClient) preparerForTopicsListAuthorizationRules(ctx context.Context, id TopicId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c TopicsAuthorizationRuleClient) responderForTopicsListAuthorizationRules( } return } + +// TopicsListAuthorizationRulesComplete retrieves all of the results into a single object +func (c TopicsAuthorizationRuleClient) TopicsListAuthorizationRulesComplete(ctx context.Context, id TopicId) (TopicsListAuthorizationRulesCompleteResult, error) { + return c.TopicsListAuthorizationRulesCompleteMatchingPredicate(ctx, id, SBAuthorizationRuleOperationPredicate{}) +} + +// TopicsListAuthorizationRulesCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c TopicsAuthorizationRuleClient) TopicsListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id TopicId, predicate SBAuthorizationRuleOperationPredicate) (resp TopicsListAuthorizationRulesCompleteResult, err error) { + items := make([]SBAuthorizationRule, 0) + + page, err := c.TopicsListAuthorizationRules(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := TopicsListAuthorizationRulesCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_listbyresourcegroup_autorest.go index f866cc840273..aa3e398b6487 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c ManagedClusterClient) ListByResourceGroup(ctx context.Context, id common return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c ManagedClusterClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ManagedClusterOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ManagedClusterClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ManagedClusterOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]ManagedCluster, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c ManagedClusterClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ManagedClusterClient) responderForListByResourceGroup(resp *http.Respons } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c ManagedClusterClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ManagedClusterOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ManagedClusterClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ManagedClusterOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]ManagedCluster, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_listbysubscription_autorest.go index 98cf48796cf4..427223897961 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c ManagedClusterClient) ListBySubscription(ctx context.Context, id commoni return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c ManagedClusterClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, ManagedClusterOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ManagedClusterClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ManagedClusterOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]ManagedCluster, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c ManagedClusterClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c ManagedClusterClient) responderForListBySubscription(resp *http.Response } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c ManagedClusterClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, ManagedClusterOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ManagedClusterClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ManagedClusterOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]ManagedCluster, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_listbymanagedclusters_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_listbymanagedclusters_autorest.go index 31828c597515..6c118c653677 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_listbymanagedclusters_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_listbymanagedclusters_autorest.go @@ -59,50 +59,6 @@ func (c NodeTypeClient) ListByManagedClusters(ctx context.Context, id ManagedClu return } -// ListByManagedClustersComplete retrieves all of the results into a single object -func (c NodeTypeClient) ListByManagedClustersComplete(ctx context.Context, id ManagedClusterId) (ListByManagedClustersCompleteResult, error) { - return c.ListByManagedClustersCompleteMatchingPredicate(ctx, id, NodeTypeOperationPredicate{}) -} - -// ListByManagedClustersCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c NodeTypeClient) ListByManagedClustersCompleteMatchingPredicate(ctx context.Context, id ManagedClusterId, predicate NodeTypeOperationPredicate) (resp ListByManagedClustersCompleteResult, err error) { - items := make([]NodeType, 0) - - page, err := c.ListByManagedClusters(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByManagedClustersCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByManagedClusters prepares the ListByManagedClusters request. func (c NodeTypeClient) preparerForListByManagedClusters(ctx context.Context, id ManagedClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c NodeTypeClient) responderForListByManagedClusters(resp *http.Response) ( } return } + +// ListByManagedClustersComplete retrieves all of the results into a single object +func (c NodeTypeClient) ListByManagedClustersComplete(ctx context.Context, id ManagedClusterId) (ListByManagedClustersCompleteResult, error) { + return c.ListByManagedClustersCompleteMatchingPredicate(ctx, id, NodeTypeOperationPredicate{}) +} + +// ListByManagedClustersCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c NodeTypeClient) ListByManagedClustersCompleteMatchingPredicate(ctx context.Context, id ManagedClusterId, predicate NodeTypeOperationPredicate) (resp ListByManagedClustersCompleteResult, err error) { + items := make([]NodeType, 0) + + page, err := c.ListByManagedClusters(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByManagedClustersCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificateslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificateslist_autorest.go index 70592ebc6c5a..42456f640ad2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificateslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customcertificateslist_autorest.go @@ -59,50 +59,6 @@ func (c SignalRClient) CustomCertificatesList(ctx context.Context, id SignalRId) return } -// CustomCertificatesListComplete retrieves all of the results into a single object -func (c SignalRClient) CustomCertificatesListComplete(ctx context.Context, id SignalRId) (CustomCertificatesListCompleteResult, error) { - return c.CustomCertificatesListCompleteMatchingPredicate(ctx, id, CustomCertificateOperationPredicate{}) -} - -// CustomCertificatesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SignalRClient) CustomCertificatesListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate CustomCertificateOperationPredicate) (resp CustomCertificatesListCompleteResult, err error) { - items := make([]CustomCertificate, 0) - - page, err := c.CustomCertificatesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := CustomCertificatesListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForCustomCertificatesList prepares the CustomCertificatesList request. func (c SignalRClient) preparerForCustomCertificatesList(ctx context.Context, id SignalRId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c SignalRClient) responderForCustomCertificatesList(resp *http.Response) ( } return } + +// CustomCertificatesListComplete retrieves all of the results into a single object +func (c SignalRClient) CustomCertificatesListComplete(ctx context.Context, id SignalRId) (CustomCertificatesListCompleteResult, error) { + return c.CustomCertificatesListCompleteMatchingPredicate(ctx, id, CustomCertificateOperationPredicate{}) +} + +// CustomCertificatesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SignalRClient) CustomCertificatesListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate CustomCertificateOperationPredicate) (resp CustomCertificatesListCompleteResult, err error) { + items := make([]CustomCertificate, 0) + + page, err := c.CustomCertificatesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := CustomCertificatesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customdomainslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customdomainslist_autorest.go index 97d11162896b..51f55391623c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customdomainslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_customdomainslist_autorest.go @@ -59,50 +59,6 @@ func (c SignalRClient) CustomDomainsList(ctx context.Context, id SignalRId) (res return } -// CustomDomainsListComplete retrieves all of the results into a single object -func (c SignalRClient) CustomDomainsListComplete(ctx context.Context, id SignalRId) (CustomDomainsListCompleteResult, error) { - return c.CustomDomainsListCompleteMatchingPredicate(ctx, id, CustomDomainOperationPredicate{}) -} - -// CustomDomainsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SignalRClient) CustomDomainsListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate CustomDomainOperationPredicate) (resp CustomDomainsListCompleteResult, err error) { - items := make([]CustomDomain, 0) - - page, err := c.CustomDomainsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := CustomDomainsListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForCustomDomainsList prepares the CustomDomainsList request. func (c SignalRClient) preparerForCustomDomainsList(ctx context.Context, id SignalRId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c SignalRClient) responderForCustomDomainsList(resp *http.Response) (resul } return } + +// CustomDomainsListComplete retrieves all of the results into a single object +func (c SignalRClient) CustomDomainsListComplete(ctx context.Context, id SignalRId) (CustomDomainsListCompleteResult, error) { + return c.CustomDomainsListCompleteMatchingPredicate(ctx, id, CustomDomainOperationPredicate{}) +} + +// CustomDomainsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SignalRClient) CustomDomainsListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate CustomDomainOperationPredicate) (resp CustomDomainsListCompleteResult, err error) { + items := make([]CustomDomain, 0) + + page, err := c.CustomDomainsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := CustomDomainsListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listbyresourcegroup_autorest.go index d1bddeb41025..cb0fc415b8a8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c SignalRClient) ListByResourceGroup(ctx context.Context, id commonids.Res return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c SignalRClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SignalRResourceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SignalRClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SignalRResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]SignalRResource, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c SignalRClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c SignalRClient) responderForListByResourceGroup(resp *http.Response) (res } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c SignalRClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SignalRResourceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SignalRClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SignalRResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]SignalRResource, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listbysubscription_autorest.go index 0685a9f3b122..c4b4975b2949 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listbysubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_listbysubscription_autorest.go @@ -60,50 +60,6 @@ func (c SignalRClient) ListBySubscription(ctx context.Context, id commonids.Subs return } -// ListBySubscriptionComplete retrieves all of the results into a single object -func (c SignalRClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, SignalRResourceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SignalRClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SignalRResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { - items := make([]SignalRResource, 0) - - page, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySubscription prepares the ListBySubscription request. func (c SignalRClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c SignalRClient) responderForListBySubscription(resp *http.Response) (resu } return } + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c SignalRClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, SignalRResourceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SignalRClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SignalRResourceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]SignalRResource, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionslist_autorest.go index 9341a17127b2..a4ceffbc54fa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privateendpointconnectionslist_autorest.go @@ -59,50 +59,6 @@ func (c SignalRClient) PrivateEndpointConnectionsList(ctx context.Context, id Si return } -// PrivateEndpointConnectionsListComplete retrieves all of the results into a single object -func (c SignalRClient) PrivateEndpointConnectionsListComplete(ctx context.Context, id SignalRId) (PrivateEndpointConnectionsListCompleteResult, error) { - return c.PrivateEndpointConnectionsListCompleteMatchingPredicate(ctx, id, PrivateEndpointConnectionOperationPredicate{}) -} - -// PrivateEndpointConnectionsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SignalRClient) PrivateEndpointConnectionsListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate PrivateEndpointConnectionOperationPredicate) (resp PrivateEndpointConnectionsListCompleteResult, err error) { - items := make([]PrivateEndpointConnection, 0) - - page, err := c.PrivateEndpointConnectionsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := PrivateEndpointConnectionsListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForPrivateEndpointConnectionsList prepares the PrivateEndpointConnectionsList request. func (c SignalRClient) preparerForPrivateEndpointConnectionsList(ctx context.Context, id SignalRId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c SignalRClient) responderForPrivateEndpointConnectionsList(resp *http.Res } return } + +// PrivateEndpointConnectionsListComplete retrieves all of the results into a single object +func (c SignalRClient) PrivateEndpointConnectionsListComplete(ctx context.Context, id SignalRId) (PrivateEndpointConnectionsListCompleteResult, error) { + return c.PrivateEndpointConnectionsListCompleteMatchingPredicate(ctx, id, PrivateEndpointConnectionOperationPredicate{}) +} + +// PrivateEndpointConnectionsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SignalRClient) PrivateEndpointConnectionsListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate PrivateEndpointConnectionOperationPredicate) (resp PrivateEndpointConnectionsListCompleteResult, err error) { + items := make([]PrivateEndpointConnection, 0) + + page, err := c.PrivateEndpointConnectionsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := PrivateEndpointConnectionsListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privatelinkresourceslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privatelinkresourceslist_autorest.go index 4bd2c25e5316..e55b5ce3fbf2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privatelinkresourceslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_privatelinkresourceslist_autorest.go @@ -59,50 +59,6 @@ func (c SignalRClient) PrivateLinkResourcesList(ctx context.Context, id SignalRI return } -// PrivateLinkResourcesListComplete retrieves all of the results into a single object -func (c SignalRClient) PrivateLinkResourcesListComplete(ctx context.Context, id SignalRId) (PrivateLinkResourcesListCompleteResult, error) { - return c.PrivateLinkResourcesListCompleteMatchingPredicate(ctx, id, PrivateLinkResourceOperationPredicate{}) -} - -// PrivateLinkResourcesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SignalRClient) PrivateLinkResourcesListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate PrivateLinkResourceOperationPredicate) (resp PrivateLinkResourcesListCompleteResult, err error) { - items := make([]PrivateLinkResource, 0) - - page, err := c.PrivateLinkResourcesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := PrivateLinkResourcesListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForPrivateLinkResourcesList prepares the PrivateLinkResourcesList request. func (c SignalRClient) preparerForPrivateLinkResourcesList(ctx context.Context, id SignalRId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c SignalRClient) responderForPrivateLinkResourcesList(resp *http.Response) } return } + +// PrivateLinkResourcesListComplete retrieves all of the results into a single object +func (c SignalRClient) PrivateLinkResourcesListComplete(ctx context.Context, id SignalRId) (PrivateLinkResourcesListCompleteResult, error) { + return c.PrivateLinkResourcesListCompleteMatchingPredicate(ctx, id, PrivateLinkResourceOperationPredicate{}) +} + +// PrivateLinkResourcesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SignalRClient) PrivateLinkResourcesListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate PrivateLinkResourceOperationPredicate) (resp PrivateLinkResourcesListCompleteResult, err error) { + items := make([]PrivateLinkResource, 0) + + page, err := c.PrivateLinkResourcesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := PrivateLinkResourcesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_sharedprivatelinkresourceslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_sharedprivatelinkresourceslist_autorest.go index 503b76457586..77089157d1d8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_sharedprivatelinkresourceslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_sharedprivatelinkresourceslist_autorest.go @@ -59,50 +59,6 @@ func (c SignalRClient) SharedPrivateLinkResourcesList(ctx context.Context, id Si return } -// SharedPrivateLinkResourcesListComplete retrieves all of the results into a single object -func (c SignalRClient) SharedPrivateLinkResourcesListComplete(ctx context.Context, id SignalRId) (SharedPrivateLinkResourcesListCompleteResult, error) { - return c.SharedPrivateLinkResourcesListCompleteMatchingPredicate(ctx, id, SharedPrivateLinkResourceOperationPredicate{}) -} - -// SharedPrivateLinkResourcesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SignalRClient) SharedPrivateLinkResourcesListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate SharedPrivateLinkResourceOperationPredicate) (resp SharedPrivateLinkResourcesListCompleteResult, err error) { - items := make([]SharedPrivateLinkResource, 0) - - page, err := c.SharedPrivateLinkResourcesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := SharedPrivateLinkResourcesListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForSharedPrivateLinkResourcesList prepares the SharedPrivateLinkResourcesList request. func (c SignalRClient) preparerForSharedPrivateLinkResourcesList(ctx context.Context, id SignalRId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c SignalRClient) responderForSharedPrivateLinkResourcesList(resp *http.Res } return } + +// SharedPrivateLinkResourcesListComplete retrieves all of the results into a single object +func (c SignalRClient) SharedPrivateLinkResourcesListComplete(ctx context.Context, id SignalRId) (SharedPrivateLinkResourcesListCompleteResult, error) { + return c.SharedPrivateLinkResourcesListCompleteMatchingPredicate(ctx, id, SharedPrivateLinkResourceOperationPredicate{}) +} + +// SharedPrivateLinkResourcesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SignalRClient) SharedPrivateLinkResourcesListCompleteMatchingPredicate(ctx context.Context, id SignalRId, predicate SharedPrivateLinkResourceOperationPredicate) (resp SharedPrivateLinkResourcesListCompleteResult, err error) { + items := make([]SharedPrivateLinkResource, 0) + + page, err := c.SharedPrivateLinkResourcesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := SharedPrivateLinkResourcesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_usageslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_usageslist_autorest.go index 081740d059e2..d19e73baa150 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_usageslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr/method_usageslist_autorest.go @@ -59,50 +59,6 @@ func (c SignalRClient) UsagesList(ctx context.Context, id LocationId) (resp Usag return } -// UsagesListComplete retrieves all of the results into a single object -func (c SignalRClient) UsagesListComplete(ctx context.Context, id LocationId) (UsagesListCompleteResult, error) { - return c.UsagesListCompleteMatchingPredicate(ctx, id, SignalRUsageOperationPredicate{}) -} - -// UsagesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SignalRClient) UsagesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate SignalRUsageOperationPredicate) (resp UsagesListCompleteResult, err error) { - items := make([]SignalRUsage, 0) - - page, err := c.UsagesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := UsagesListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForUsagesList prepares the UsagesList request. func (c SignalRClient) preparerForUsagesList(ctx context.Context, id LocationId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c SignalRClient) responderForUsagesList(resp *http.Response) (result Usage } return } + +// UsagesListComplete retrieves all of the results into a single object +func (c SignalRClient) UsagesListComplete(ctx context.Context, id LocationId) (UsagesListCompleteResult, error) { + return c.UsagesListCompleteMatchingPredicate(ctx, id, SignalRUsageOperationPredicate{}) +} + +// UsagesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SignalRClient) UsagesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate SignalRUsageOperationPredicate) (resp UsagesListCompleteResult, err error) { + items := make([]SignalRUsage, 0) + + page, err := c.UsagesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := UsagesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_list_autorest.go index 25d340398960..a765feeab37f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_list_autorest.go @@ -60,50 +60,6 @@ func (c SqlVirtualMachinesClient) List(ctx context.Context, id commonids.Subscri return } -// ListComplete retrieves all of the results into a single object -func (c SqlVirtualMachinesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, SqlVirtualMachineOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SqlVirtualMachinesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SqlVirtualMachineOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]SqlVirtualMachine, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c SqlVirtualMachinesClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c SqlVirtualMachinesClient) responderForList(resp *http.Response) (result } return } + +// ListComplete retrieves all of the results into a single object +func (c SqlVirtualMachinesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, SqlVirtualMachineOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SqlVirtualMachinesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SqlVirtualMachineOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]SqlVirtualMachine, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_listbyresourcegroup_autorest.go index 4e996597c811..d500636c9708 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_listbyresourcegroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_listbyresourcegroup_autorest.go @@ -60,50 +60,6 @@ func (c SqlVirtualMachinesClient) ListByResourceGroup(ctx context.Context, id co return } -// ListByResourceGroupComplete retrieves all of the results into a single object -func (c SqlVirtualMachinesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SqlVirtualMachineOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SqlVirtualMachinesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SqlVirtualMachineOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { - items := make([]SqlVirtualMachine, 0) - - page, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListByResourceGroup prepares the ListByResourceGroup request. func (c SqlVirtualMachinesClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c SqlVirtualMachinesClient) responderForListByResourceGroup(resp *http.Res } return } + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c SqlVirtualMachinesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SqlVirtualMachineOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SqlVirtualMachinesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SqlVirtualMachineOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]SqlVirtualMachine, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_listbysqlvmgroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_listbysqlvmgroup_autorest.go index eafda6bd4bfb..c26c03240c8c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_listbysqlvmgroup_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_listbysqlvmgroup_autorest.go @@ -59,50 +59,6 @@ func (c SqlVirtualMachinesClient) ListBySqlVmGroup(ctx context.Context, id SqlVi return } -// ListBySqlVmGroupComplete retrieves all of the results into a single object -func (c SqlVirtualMachinesClient) ListBySqlVmGroupComplete(ctx context.Context, id SqlVirtualMachineGroupId) (ListBySqlVmGroupCompleteResult, error) { - return c.ListBySqlVmGroupCompleteMatchingPredicate(ctx, id, SqlVirtualMachineOperationPredicate{}) -} - -// ListBySqlVmGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c SqlVirtualMachinesClient) ListBySqlVmGroupCompleteMatchingPredicate(ctx context.Context, id SqlVirtualMachineGroupId, predicate SqlVirtualMachineOperationPredicate) (resp ListBySqlVmGroupCompleteResult, err error) { - items := make([]SqlVirtualMachine, 0) - - page, err := c.ListBySqlVmGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListBySqlVmGroupCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListBySqlVmGroup prepares the ListBySqlVmGroup request. func (c SqlVirtualMachinesClient) preparerForListBySqlVmGroup(ctx context.Context, id SqlVirtualMachineGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c SqlVirtualMachinesClient) responderForListBySqlVmGroup(resp *http.Respon } return } + +// ListBySqlVmGroupComplete retrieves all of the results into a single object +func (c SqlVirtualMachinesClient) ListBySqlVmGroupComplete(ctx context.Context, id SqlVirtualMachineGroupId) (ListBySqlVmGroupCompleteResult, error) { + return c.ListBySqlVmGroupCompleteMatchingPredicate(ctx, id, SqlVirtualMachineOperationPredicate{}) +} + +// ListBySqlVmGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c SqlVirtualMachinesClient) ListBySqlVmGroupCompleteMatchingPredicate(ctx context.Context, id SqlVirtualMachineGroupId, predicate SqlVirtualMachineOperationPredicate) (resp ListBySqlVmGroupCompleteResult, err error) { + items := make([]SqlVirtualMachine, 0) + + page, err := c.ListBySqlVmGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySqlVmGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspolicieslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspolicieslist_autorest.go index 1eb410918c63..0fb820dcefeb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspolicieslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_accesspolicieslist_autorest.go @@ -83,50 +83,6 @@ func (c VideoAnalyzerClient) AccessPoliciesList(ctx context.Context, id VideoAna return } -// AccessPoliciesListComplete retrieves all of the results into a single object -func (c VideoAnalyzerClient) AccessPoliciesListComplete(ctx context.Context, id VideoAnalyzerId, options AccessPoliciesListOperationOptions) (AccessPoliciesListCompleteResult, error) { - return c.AccessPoliciesListCompleteMatchingPredicate(ctx, id, options, AccessPolicyEntityOperationPredicate{}) -} - -// AccessPoliciesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c VideoAnalyzerClient) AccessPoliciesListCompleteMatchingPredicate(ctx context.Context, id VideoAnalyzerId, options AccessPoliciesListOperationOptions, predicate AccessPolicyEntityOperationPredicate) (resp AccessPoliciesListCompleteResult, err error) { - items := make([]AccessPolicyEntity, 0) - - page, err := c.AccessPoliciesList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := AccessPoliciesListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForAccessPoliciesList prepares the AccessPoliciesList request. func (c VideoAnalyzerClient) preparerForAccessPoliciesList(ctx context.Context, id VideoAnalyzerId, options AccessPoliciesListOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -213,3 +169,47 @@ func (c VideoAnalyzerClient) responderForAccessPoliciesList(resp *http.Response) } return } + +// AccessPoliciesListComplete retrieves all of the results into a single object +func (c VideoAnalyzerClient) AccessPoliciesListComplete(ctx context.Context, id VideoAnalyzerId, options AccessPoliciesListOperationOptions) (AccessPoliciesListCompleteResult, error) { + return c.AccessPoliciesListCompleteMatchingPredicate(ctx, id, options, AccessPolicyEntityOperationPredicate{}) +} + +// AccessPoliciesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c VideoAnalyzerClient) AccessPoliciesListCompleteMatchingPredicate(ctx context.Context, id VideoAnalyzerId, options AccessPoliciesListOperationOptions, predicate AccessPolicyEntityOperationPredicate) (resp AccessPoliciesListCompleteResult, err error) { + items := make([]AccessPolicyEntity, 0) + + page, err := c.AccessPoliciesList(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := AccessPoliciesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemoduleslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemoduleslist_autorest.go index 3b250dbed090..41f3f31b1af7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemoduleslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_edgemoduleslist_autorest.go @@ -93,50 +93,6 @@ func (c VideoAnalyzerClient) EdgeModulesList(ctx context.Context, id VideoAnalyz return } -// EdgeModulesListComplete retrieves all of the results into a single object -func (c VideoAnalyzerClient) EdgeModulesListComplete(ctx context.Context, id VideoAnalyzerId, options EdgeModulesListOperationOptions) (EdgeModulesListCompleteResult, error) { - return c.EdgeModulesListCompleteMatchingPredicate(ctx, id, options, EdgeModuleEntityOperationPredicate{}) -} - -// EdgeModulesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c VideoAnalyzerClient) EdgeModulesListCompleteMatchingPredicate(ctx context.Context, id VideoAnalyzerId, options EdgeModulesListOperationOptions, predicate EdgeModuleEntityOperationPredicate) (resp EdgeModulesListCompleteResult, err error) { - items := make([]EdgeModuleEntity, 0) - - page, err := c.EdgeModulesList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := EdgeModulesListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForEdgeModulesList prepares the EdgeModulesList request. func (c VideoAnalyzerClient) preparerForEdgeModulesList(ctx context.Context, id VideoAnalyzerId, options EdgeModulesListOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -223,3 +179,47 @@ func (c VideoAnalyzerClient) responderForEdgeModulesList(resp *http.Response) (r } return } + +// EdgeModulesListComplete retrieves all of the results into a single object +func (c VideoAnalyzerClient) EdgeModulesListComplete(ctx context.Context, id VideoAnalyzerId, options EdgeModulesListOperationOptions) (EdgeModulesListCompleteResult, error) { + return c.EdgeModulesListCompleteMatchingPredicate(ctx, id, options, EdgeModuleEntityOperationPredicate{}) +} + +// EdgeModulesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c VideoAnalyzerClient) EdgeModulesListCompleteMatchingPredicate(ctx context.Context, id VideoAnalyzerId, options EdgeModulesListOperationOptions, predicate EdgeModuleEntityOperationPredicate) (resp EdgeModulesListCompleteResult, err error) { + items := make([]EdgeModuleEntity, 0) + + page, err := c.EdgeModulesList(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := EdgeModulesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoslist_autorest.go index c4c4b075e91e..887b866cb8eb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoslist_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzer/method_videoslist_autorest.go @@ -83,50 +83,6 @@ func (c VideoAnalyzerClient) VideosList(ctx context.Context, id VideoAnalyzerId, return } -// VideosListComplete retrieves all of the results into a single object -func (c VideoAnalyzerClient) VideosListComplete(ctx context.Context, id VideoAnalyzerId, options VideosListOperationOptions) (VideosListCompleteResult, error) { - return c.VideosListCompleteMatchingPredicate(ctx, id, options, VideoEntityOperationPredicate{}) -} - -// VideosListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c VideoAnalyzerClient) VideosListCompleteMatchingPredicate(ctx context.Context, id VideoAnalyzerId, options VideosListOperationOptions, predicate VideoEntityOperationPredicate) (resp VideosListCompleteResult, err error) { - items := make([]VideoEntity, 0) - - page, err := c.VideosList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := VideosListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForVideosList prepares the VideosList request. func (c VideoAnalyzerClient) preparerForVideosList(ctx context.Context, id VideoAnalyzerId, options VideosListOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -213,3 +169,47 @@ func (c VideoAnalyzerClient) responderForVideosList(resp *http.Response) (result } return } + +// VideosListComplete retrieves all of the results into a single object +func (c VideoAnalyzerClient) VideosListComplete(ctx context.Context, id VideoAnalyzerId, options VideosListOperationOptions) (VideosListCompleteResult, error) { + return c.VideosListCompleteMatchingPredicate(ctx, id, options, VideoEntityOperationPredicate{}) +} + +// VideosListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c VideoAnalyzerClient) VideosListCompleteMatchingPredicate(ctx context.Context, id VideoAnalyzerId, options VideosListOperationOptions, predicate VideoEntityOperationPredicate) (resp VideosListCompleteResult, err error) { + items := make([]VideoEntity, 0) + + page, err := c.VideosList(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := VideosListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_list_autorest.go index 5c5876a70e24..bb6006caffee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/authorizations/method_list_autorest.go @@ -59,50 +59,6 @@ func (c AuthorizationsClient) List(ctx context.Context, id PrivateCloudId) (resp return } -// ListComplete retrieves all of the results into a single object -func (c AuthorizationsClient) ListComplete(ctx context.Context, id PrivateCloudId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteAuthorizationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AuthorizationsClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateCloudId, predicate ExpressRouteAuthorizationOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]ExpressRouteAuthorization, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c AuthorizationsClient) preparerForList(ctx context.Context, id PrivateCloudId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c AuthorizationsClient) responderForList(resp *http.Response) (result List } return } + +// ListComplete retrieves all of the results into a single object +func (c AuthorizationsClient) ListComplete(ctx context.Context, id PrivateCloudId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteAuthorizationOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c AuthorizationsClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateCloudId, predicate ExpressRouteAuthorizationOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]ExpressRouteAuthorization, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_list_autorest.go index 2dcbfc402c51..0d73a89a9da9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/clusters/method_list_autorest.go @@ -59,50 +59,6 @@ func (c ClustersClient) List(ctx context.Context, id PrivateCloudId) (resp ListO return } -// ListComplete retrieves all of the results into a single object -func (c ClustersClient) ListComplete(ctx context.Context, id PrivateCloudId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateCloudId, predicate ClusterOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]Cluster, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c ClustersClient) preparerForList(ctx context.Context, id PrivateCloudId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -184,3 +140,47 @@ func (c ClustersClient) responderForList(resp *http.Response) (result ListOperat } return } + +// ListComplete retrieves all of the results into a single object +func (c ClustersClient) ListComplete(ctx context.Context, id PrivateCloudId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c ClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateCloudId, predicate ClusterOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]Cluster, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_list_autorest.go index 53307312105c..e3dc84169502 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_list_autorest.go @@ -60,50 +60,6 @@ func (c PrivateCloudsClient) List(ctx context.Context, id commonids.ResourceGrou return } -// ListComplete retrieves all of the results into a single object -func (c PrivateCloudsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PrivateCloudOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PrivateCloudsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PrivateCloudOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]PrivateCloud, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForList prepares the List request. func (c PrivateCloudsClient) preparerForList(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c PrivateCloudsClient) responderForList(resp *http.Response) (result ListO } return } + +// ListComplete retrieves all of the results into a single object +func (c PrivateCloudsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, PrivateCloudOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PrivateCloudsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PrivateCloudOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]PrivateCloud, 0) + + page, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_listinsubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_listinsubscription_autorest.go index 8e415c675515..d5eb4718623b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_listinsubscription_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2020-03-20/privateclouds/method_listinsubscription_autorest.go @@ -60,50 +60,6 @@ func (c PrivateCloudsClient) ListInSubscription(ctx context.Context, id commonid return } -// ListInSubscriptionComplete retrieves all of the results into a single object -func (c PrivateCloudsClient) ListInSubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListInSubscriptionCompleteResult, error) { - return c.ListInSubscriptionCompleteMatchingPredicate(ctx, id, PrivateCloudOperationPredicate{}) -} - -// ListInSubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PrivateCloudsClient) ListInSubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PrivateCloudOperationPredicate) (resp ListInSubscriptionCompleteResult, err error) { - items := make([]PrivateCloud, 0) - - page, err := c.ListInSubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListInSubscriptionCompleteResult{ - Items: items, - } - return out, nil -} - // preparerForListInSubscription prepares the ListInSubscription request. func (c PrivateCloudsClient) preparerForListInSubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { queryParameters := map[string]interface{}{ @@ -185,3 +141,47 @@ func (c PrivateCloudsClient) responderForListInSubscription(resp *http.Response) } return } + +// ListInSubscriptionComplete retrieves all of the results into a single object +func (c PrivateCloudsClient) ListInSubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListInSubscriptionCompleteResult, error) { + return c.ListInSubscriptionCompleteMatchingPredicate(ctx, id, PrivateCloudOperationPredicate{}) +} + +// ListInSubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PrivateCloudsClient) ListInSubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PrivateCloudOperationPredicate) (resp ListInSubscriptionCompleteResult, err error) { + items := make([]PrivateCloud, 0) + + page, err := c.ListInSubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListInSubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 351fe5bfe7b9..bd079ce292b2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -191,7 +191,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.20220805.1100614 +# github.com/hashicorp/go-azure-sdk v0.20220809.1122626 ## explicit; go 1.18 github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants From 112aa158aefdb8a1da6a9829bf41416bb0730ea8 Mon Sep 17 00:00:00 2001 From: Tom Harvey Date: Thu, 11 Aug 2022 13:01:29 +0200 Subject: [PATCH 067/100] updating to include #17905 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96a868245594..a67870066bc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: ENHANCEMENTS: +* dependencies: updating `github.com/hashicorp/go-azure-sdk` to `v0.20220809.1122626` [GH-17905] * storage: updating to use API Version `2021-09-01` [GH-17523] * `azurerm_express_route_circuit_peering` - support for the `ipv4_enabled` and `gateway_manager_etag` properties [GH-17338] * `azurerm_site_recovery_replicated_vm` - support for the `target_disk_encryption` block [GH-15783] From e31b6febe9c5cc7d37dc5ae93b77ee49a52fdf7c Mon Sep 17 00:00:00 2001 From: Lars Maes Date: Thu, 11 Aug 2022 16:26:45 +0200 Subject: [PATCH 068/100] Update naming validation to allow length to be 1 - 128 (#17965) * Update naming validation to allow length to be 1 - 128 See: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftauthorization length of a definitionname is 1 - 128 and not 3 - 24 * update comment about name length --- .../services/policy/assignment_management_group_resource.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/services/policy/assignment_management_group_resource.go b/internal/services/policy/assignment_management_group_resource.go index 6480b40972c5..34ca520973d6 100644 --- a/internal/services/policy/assignment_management_group_resource.go +++ b/internal/services/policy/assignment_management_group_resource.go @@ -28,8 +28,8 @@ func (r ManagementGroupAssignmentResource) Arguments() map[string]*pluginsdk.Sch ForceNew: true, ValidateFunc: validation.All( validation.StringIsNotWhiteSpace, - // The policy assignment name length must not exceed '24' characters. - validation.StringLenBetween(3, 24), + // The policy assignment name length must not exceed '128' characters. + validation.StringLenBetween(1, 128), validation.StringDoesNotContainAny("/"), ), }, From 92281d90f8d2abc1164ace0dfc8ede9357f4a234 Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 11 Aug 2022 08:00:29 -0700 Subject: [PATCH 069/100] azurerm_cognitive_account - update docs wrt bing search types (#17958) --- website/docs/r/cognitive_account.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/r/cognitive_account.html.markdown b/website/docs/r/cognitive_account.html.markdown index 3a8d8b5873ab..1c44211c59fc 100644 --- a/website/docs/r/cognitive_account.html.markdown +++ b/website/docs/r/cognitive_account.html.markdown @@ -46,6 +46,8 @@ The following arguments are supported: * `kind` - (Required) Specifies the type of Cognitive Service Account that should be created. Possible values are `Academic`, `AnomalyDetector`, `Bing.Autosuggest`, `Bing.Autosuggest.v7`, `Bing.CustomSearch`, `Bing.Search`, `Bing.Search.v7`, `Bing.Speech`, `Bing.SpellCheck`, `Bing.SpellCheck.v7`, `CognitiveServices`, `ComputerVision`, `ContentModerator`, `CustomSpeech`, `CustomVision.Prediction`, `CustomVision.Training`, `Emotion`, `Face`,`FormRecognizer`, `ImmersiveReader`, `LUIS`, `LUIS.Authoring`, `MetricsAdvisor`, `Personalizer`, `QnAMaker`, `Recommendations`, `SpeakerRecognition`, `Speech`, `SpeechServices`, `SpeechTranslation`, `TextAnalytics`(Language service), `TextTranslation` and `WebLM`. Changing this forces a new resource to be created. +-> **NOTE:** New Bing Search resources cannot be created as their APIs are moving from Cognitive Services Platform to new surface area under Microsoft.com. Starting from October 30, 2020, existing instances of Bing Search APIs provisioned via Cognitive Services will be continuously supported for next 3 years or till the end of respective Enterprise Agreement, whichever happens first. + -> **NOTE:** You must create your first Face, Text Analytics, or Computer Vision resources from the Azure portal to review and acknowledge the terms and conditions. In Azure Portal, the checkbox to accept terms and conditions is only displayed when a US region is selected. More information on [Prerequisites](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows#prerequisites). * `sku_name` - (Required) Specifies the SKU Name for this Cognitive Service Account. Possible values are `F0`, `F1`, `S`, `S0`, `S1`, `S2`, `S3`, `S4`, `S5`, `S6`, `P0`, `P1`, and `P2`. From 535814348163cf15f88fa70c2570f15bde092c2b Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 11 Aug 2022 18:13:59 -0700 Subject: [PATCH 070/100] v3.18.0 --- CHANGELOG.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a67870066bc8..d1f0518d9ae6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,23 @@ -## 3.18.0 (Unreleased) +## 3.18.0 (August 11, 2022) FEATURES: -* **New Resource**: `azurerm_monitor_data_collection_endpoint` [GH-17684] +* **New Resource**: `azurerm_monitor_data_collection_endpoint` ([#17684](https://github.com/hashicorp/terraform-provider-azurerm/issues/17684)) ENHANCEMENTS: -* dependencies: updating `github.com/hashicorp/go-azure-sdk` to `v0.20220809.1122626` [GH-17905] -* storage: updating to use API Version `2021-09-01` [GH-17523] -* `azurerm_express_route_circuit_peering` - support for the `ipv4_enabled` and `gateway_manager_etag` properties [GH-17338] -* `azurerm_site_recovery_replicated_vm` - support for the `target_disk_encryption` block [GH-15783] -* `azurerm_subnet` - deprecate `enforce_private_link_endpoint_network_policies` property in favour of `private_endpoint_network_policies_enabled` [GH-17464] -* `azurerm_subnet` - deprecate `enforce_private_link_service_network_policies` property in favour of `private_link_service_network_policies_enabled` [GH-17464] -* `azurerm_servicebus_subscription` - support for the `client_scoped_subscription_enabled` property and the `client_scoped_subscription` block [GH-17101] +* dependencies: updating `github.com/hashicorp/go-azure-sdk` to `v0.20220809.1122626` ([#17905](https://github.com/hashicorp/terraform-provider-azurerm/issues/17905)) +* storage: updating to use API Version `2021-09-01` ([#17523](https://github.com/hashicorp/terraform-provider-azurerm/issues/17523)) +* `azurerm_express_route_circuit_peering` - support for the `ipv4_enabled` and `gateway_manager_etag` properties ([#17338](https://github.com/hashicorp/terraform-provider-azurerm/issues/17338)) +* `azurerm_site_recovery_replicated_vm` - support for the `target_disk_encryption` block ([#15783](https://github.com/hashicorp/terraform-provider-azurerm/issues/15783)) +* `azurerm_subnet` - deprecate `enforce_private_link_endpoint_network_policies` property in favour of `private_endpoint_network_policies_enabled` ([#17464](https://github.com/hashicorp/terraform-provider-azurerm/issues/17464)) +* `azurerm_subnet` - deprecate `enforce_private_link_service_network_policies` property in favour of `private_link_service_network_policies_enabled` ([#17464](https://github.com/hashicorp/terraform-provider-azurerm/issues/17464)) +* `azurerm_servicebus_subscription` - support for the `client_scoped_subscription_enabled` property and the `client_scoped_subscription` block ([#17101](https://github.com/hashicorp/terraform-provider-azurerm/issues/17101)) BUG FIXES: -* `azurerm_backup_policy_vm` - now prevents crash when `frequency` is set to Hourly and, `hour_interval` and `hour_duration`are not set [GH-17880] -* Data Source: `azurerm_blueprint_definition` - Fix `version` property output [GH-16299] +* `azurerm_backup_policy_vm` - now prevents crash when `frequency` is set to Hourly and, `hour_interval` and `hour_duration`are not set ([#17880](https://github.com/hashicorp/terraform-provider-azurerm/issues/17880)) +* Data Source: `azurerm_blueprint_definition` - Fix `version` property output ([#16299](https://github.com/hashicorp/terraform-provider-azurerm/issues/16299)) ## 3.17.0 (August 04, 2022) From dc8900926787e6aaf8ae3e6ff22b7263bca7f464 Mon Sep 17 00:00:00 2001 From: cryptozero <32773449+cryptozero@users.noreply.github.com> Date: Fri, 12 Aug 2022 03:52:56 +0200 Subject: [PATCH 071/100] =?UTF-8?q?Add=20azurerm=5Fsubnet=5Fnetwork=5Fsecu?= =?UTF-8?q?rity=5Fgroup=5Fassociation=20to=20associate=20we=E2=80=A6=20(#1?= =?UTF-8?q?7917)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/virtual-machines/linux/load-balanced/main.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/virtual-machines/linux/load-balanced/main.tf b/examples/virtual-machines/linux/load-balanced/main.tf index b1e7bdbbe0d1..6b678c5e71cf 100644 --- a/examples/virtual-machines/linux/load-balanced/main.tf +++ b/examples/virtual-machines/linux/load-balanced/main.tf @@ -72,6 +72,11 @@ resource "azurerm_network_security_group" "webserver" { } } +resource "azurerm_subnet_network_security_group_association" "example" { + subnet_id = azurerm_subnet.internal.id + network_security_group_id = azurerm_network_security_group.webserver.id +} + resource "azurerm_lb" "example" { name = "${var.prefix}-lb" location = azurerm_resource_group.main.location From f3429b2c1a0b0cd24da66a82a1d96eab7b7812a3 Mon Sep 17 00:00:00 2001 From: Alpha Date: Fri, 12 Aug 2022 10:00:19 +0800 Subject: [PATCH 072/100] feat: update the Linux /window function app at v3 provider for doc and testcase (#16609) --- .../appservice/validate/web_app_name_test.go | 50 +++++++++++++++++++ .../docs/r/linux_function_app.html.markdown | 2 +- .../docs/r/windows_function_app.html.markdown | 2 +- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 internal/services/appservice/validate/web_app_name_test.go diff --git a/internal/services/appservice/validate/web_app_name_test.go b/internal/services/appservice/validate/web_app_name_test.go new file mode 100644 index 000000000000..1273d241c86b --- /dev/null +++ b/internal/services/appservice/validate/web_app_name_test.go @@ -0,0 +1,50 @@ +package validate_test + +import ( + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" +) + +func TestWebAppName(t *testing.T) { + cases := []struct { + Input string + Valid bool + }{ + { + Input: "", + Valid: false, + }, + { + Input: "a", + Valid: true, + }, + { + Input: "-valid", + Valid: true, + }, + { + // len is 35 + Input: "ThisIsALongAndValidNameThatWillWork", + Valid: true, + }, + { + Input: "ThisNameIsTooLongThisNameIsTooLongThisNameIsTooLongThisNameIsTooLongThisNameIsTooLongThisNameIsTooLongThisNameIsTooLongThisNameIsTooLong", + Valid: false, + }, + { + // len is 60 and should show the warning message + Input: "012345678901234567890123456789012345678901234567890123456789", + Valid: true, + }, + } + + for _, tc := range cases { + _, errs := validate.WebAppName(tc.Input, "test") + valid := len(errs) == 0 + + if valid != tc.Valid { + t.Fatalf("expected %s to be %t, got %t", tc.Input, tc.Valid, valid) + } + } +} diff --git a/website/docs/r/linux_function_app.html.markdown b/website/docs/r/linux_function_app.html.markdown index 0bf6a7d29ed5..7539c3dd0861 100644 --- a/website/docs/r/linux_function_app.html.markdown +++ b/website/docs/r/linux_function_app.html.markdown @@ -57,7 +57,7 @@ The following arguments are supported: * `location` - (Required) The Azure Region where the Linux Function App should exist. Changing this forces a new Linux Function App to be created. -* `name` - (Required) The name which should be used for this Linux Function App. Changing this forces a new Linux Function App to be created. +* `name` - (Required) The name which should be used for this Linux Function App. Changing this forces a new Linux Function App to be created. Limit the function name to 32 characters to avoid naming collisions. For more information about [Function App naming rule](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftweb) and [Host ID Collisions](https://github.com/Azure/azure-functions-host/wiki/Host-IDs#host-id-collisions) * `resource_group_name` - (Required) The name of the Resource Group where the Linux Function App should exist. Changing this forces a new Linux Function App to be created. diff --git a/website/docs/r/windows_function_app.html.markdown b/website/docs/r/windows_function_app.html.markdown index d1da0fe2f92a..2ad52917d16c 100644 --- a/website/docs/r/windows_function_app.html.markdown +++ b/website/docs/r/windows_function_app.html.markdown @@ -57,7 +57,7 @@ The following arguments are supported: * `location` - (Required) The Azure Region where the Windows Function App should exist. Changing this forces a new Windows Function App to be created. -* `name` - (Required) The name which should be used for this Windows Function App. Changing this forces a new Windows Function App to be created. +* `name` - (Required) The name which should be used for this Windows Function App. Changing this forces a new Windows Function App to be created. Limit the function name to 32 characters to avoid naming collisions. For more information about [Function App naming rule](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftweb) and [Host ID Collisions](https://github.com/Azure/azure-functions-host/wiki/Host-IDs#host-id-collisions) * `resource_group_name` - (Required) The name of the Resource Group where the Windows Function App should exist. Changing this forces a new Windows Function App to be created. From 36f2095857e8052a2db0ef006822694a9b65042b Mon Sep 17 00:00:00 2001 From: Aidan Feldman Date: Thu, 11 Aug 2022 22:01:04 -0400 Subject: [PATCH 073/100] clarify how to associate an App Service Environment v3 with a Service Plan (#17694) --- website/docs/r/app_service_environment_v3.html.markdown | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/website/docs/r/app_service_environment_v3.html.markdown b/website/docs/r/app_service_environment_v3.html.markdown index e57a29a91f9f..3de1fe15ca75 100644 --- a/website/docs/r/app_service_environment_v3.html.markdown +++ b/website/docs/r/app_service_environment_v3.html.markdown @@ -70,6 +70,15 @@ resource "azurerm_app_service_environment_v3" "example" { terraformed = "true" } } + +resource "azurerm_service_plan" "example" { + name = "example" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + os_type = "Linux" + sku_name = "P1v2" + app_service_environment_id = azurerm_app_service_environment_v3.example.id +} ``` ## Argument Reference From 796f2ec98c4aec30c9acf4eb882ec312d7e1985f Mon Sep 17 00:00:00 2001 From: shu-ying789 <96756505+shu-ying789@users.noreply.github.com> Date: Fri, 12 Aug 2022 10:01:13 +0800 Subject: [PATCH 074/100] `cdn` `iotcentral` `network` - `documents example improvement` (#17447) Co-authored-by: kt --- website/docs/r/cdn_frontdoor_endpoint.html.markdown | 1 - website/docs/r/cdn_frontdoor_rule_set.html.markdown | 1 - website/docs/r/iotcentral_application.html.markdown | 2 +- ...ation_gateway_backend_address_pool_association.html.markdown | 1 + 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/website/docs/r/cdn_frontdoor_endpoint.html.markdown b/website/docs/r/cdn_frontdoor_endpoint.html.markdown index aaf56ec25096..da34984f5daa 100644 --- a/website/docs/r/cdn_frontdoor_endpoint.html.markdown +++ b/website/docs/r/cdn_frontdoor_endpoint.html.markdown @@ -22,7 +22,6 @@ resource "azurerm_cdn_frontdoor_profile" "example" { name = "example-profile" resource_group_name = azurerm_resource_group.example.name sku_name = "Standard_AzureFrontDoor" - } resource "azurerm_cdn_frontdoor_endpoint" "example" { diff --git a/website/docs/r/cdn_frontdoor_rule_set.html.markdown b/website/docs/r/cdn_frontdoor_rule_set.html.markdown index 3477724205d7..03c47acc807b 100644 --- a/website/docs/r/cdn_frontdoor_rule_set.html.markdown +++ b/website/docs/r/cdn_frontdoor_rule_set.html.markdown @@ -22,7 +22,6 @@ resource "azurerm_cdn_frontdoor_profile" "example" { name = "example-profile" resource_group_name = azurerm_resource_group.example.name sku_name = "Standard_AzureFrontDoor" - } resource "azurerm_cdn_frontdoor_rule_set" "example" { diff --git a/website/docs/r/iotcentral_application.html.markdown b/website/docs/r/iotcentral_application.html.markdown index e33167050f77..9ee53ea5eea1 100644 --- a/website/docs/r/iotcentral_application.html.markdown +++ b/website/docs/r/iotcentral_application.html.markdown @@ -25,7 +25,7 @@ resource "azurerm_iotcentral_application" "example" { sub_domain = "example-iotcentral-app-subdomain" display_name = "example-iotcentral-app-display-name" - sku = "S1" + sku = "ST1" template = "iotc-default@1.0.0" tags = { diff --git a/website/docs/r/network_interface_application_gateway_backend_address_pool_association.html.markdown b/website/docs/r/network_interface_application_gateway_backend_address_pool_association.html.markdown index f6083fb50b34..185c7405f9cf 100644 --- a/website/docs/r/network_interface_application_gateway_backend_address_pool_association.html.markdown +++ b/website/docs/r/network_interface_application_gateway_backend_address_pool_association.html.markdown @@ -105,6 +105,7 @@ resource "azurerm_application_gateway" "network" { request_routing_rule { name = local.request_routing_rule_name rule_type = "Basic" + priority = 25 http_listener_name = local.listener_name backend_address_pool_name = local.backend_address_pool_name backend_http_settings_name = local.http_setting_name From 2b01b08b2218509a6a6894e3d17e1e59dd997ad2 Mon Sep 17 00:00:00 2001 From: Zhenhua Hu Date: Fri, 12 Aug 2022 10:28:26 +0800 Subject: [PATCH 075/100] azurerm_disk_encryption_set: fix creation issue when disk encryption set and key vault in different subscriptions (#17964) --- .../compute/disk_encryption_set_resource.go | 47 ++++++++++++------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/internal/services/compute/disk_encryption_set_resource.go b/internal/services/compute/disk_encryption_set_resource.go index 8c6adc8be552..588ce5929550 100644 --- a/internal/services/compute/disk_encryption_set_resource.go +++ b/internal/services/compute/disk_encryption_set_resource.go @@ -114,11 +114,14 @@ func resourceDiskEncryptionSetCreate(d *pluginsdk.ResourceData, meta interface{} if err != nil { return fmt.Errorf("validating Key Vault Key %q for Disk Encryption Set: %+v", keyVaultKeyId, err) } - if !keyVaultDetails.softDeleteEnabled { - return fmt.Errorf("validating Key Vault %q (Resource Group %q) for Disk Encryption Set: Soft Delete must be enabled but it isn't!", keyVaultDetails.keyVaultName, keyVaultDetails.resourceGroupName) - } - if !keyVaultDetails.purgeProtectionEnabled { - return fmt.Errorf("validating Key Vault %q (Resource Group %q) for Disk Encryption Set: Purge Protection must be enabled but it isn't!", keyVaultDetails.keyVaultName, keyVaultDetails.resourceGroupName) + + if keyVaultDetails != nil { + if !keyVaultDetails.softDeleteEnabled { + return fmt.Errorf("validating Key Vault %q (Resource Group %q) for Disk Encryption Set: Soft Delete must be enabled but it isn't!", keyVaultDetails.keyVaultName, keyVaultDetails.resourceGroupName) + } + if !keyVaultDetails.purgeProtectionEnabled { + return fmt.Errorf("validating Key Vault %q (Resource Group %q) for Disk Encryption Set: Purge Protection must be enabled but it isn't!", keyVaultDetails.keyVaultName, keyVaultDetails.resourceGroupName) + } } location := azure.NormalizeLocation(d.Get("location").(string)) @@ -136,9 +139,6 @@ func resourceDiskEncryptionSetCreate(d *pluginsdk.ResourceData, meta interface{} EncryptionSetProperties: &compute.EncryptionSetProperties{ ActiveKey: &compute.KeyForDiskEncryptionSet{ KeyURL: utils.String(keyVaultKeyId), - SourceVault: &compute.SourceVault{ - ID: utils.String(keyVaultDetails.keyVaultId), - }, }, RotationToLatestKeyVersionEnabled: utils.Bool(rotationToLatestKeyVersionEnabled), EncryptionType: compute.DiskEncryptionSetType(encryptionType), @@ -147,6 +147,12 @@ func resourceDiskEncryptionSetCreate(d *pluginsdk.ResourceData, meta interface{} Tags: tags.Expand(t), } + if keyVaultDetails != nil { + params.EncryptionSetProperties.ActiveKey.SourceVault = &compute.SourceVault{ + ID: utils.String(keyVaultDetails.keyVaultId), + } + } + future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, params) if err != nil { return fmt.Errorf("creating %s: %+v", id, err) @@ -231,20 +237,27 @@ func resourceDiskEncryptionSetUpdate(d *pluginsdk.ResourceData, meta interface{} if err != nil { return fmt.Errorf("validating Key Vault Key %q for Disk Encryption Set: %+v", keyVaultKeyId, err) } - if !keyVaultDetails.softDeleteEnabled { - return fmt.Errorf("validating Key Vault %q (Resource Group %q) for Disk Encryption Set: Soft Delete must be enabled but it isn't!", keyVaultDetails.keyVaultName, keyVaultDetails.resourceGroupName) - } - if !keyVaultDetails.purgeProtectionEnabled { - return fmt.Errorf("validating Key Vault %q (Resource Group %q) for Disk Encryption Set: Purge Protection must be enabled but it isn't!", keyVaultDetails.keyVaultName, keyVaultDetails.resourceGroupName) + + if keyVaultDetails != nil { + if !keyVaultDetails.softDeleteEnabled { + return fmt.Errorf("validating Key Vault %q (Resource Group %q) for Disk Encryption Set: Soft Delete must be enabled but it isn't!", keyVaultDetails.keyVaultName, keyVaultDetails.resourceGroupName) + } + if !keyVaultDetails.purgeProtectionEnabled { + return fmt.Errorf("validating Key Vault %q (Resource Group %q) for Disk Encryption Set: Purge Protection must be enabled but it isn't!", keyVaultDetails.keyVaultName, keyVaultDetails.resourceGroupName) + } } + update.DiskEncryptionSetUpdateProperties = &compute.DiskEncryptionSetUpdateProperties{ ActiveKey: &compute.KeyForDiskEncryptionSet{ KeyURL: utils.String(keyVaultKeyId), - SourceVault: &compute.SourceVault{ - ID: utils.String(keyVaultDetails.keyVaultId), - }, }, } + + if keyVaultDetails != nil { + update.DiskEncryptionSetUpdateProperties.ActiveKey.SourceVault = &compute.SourceVault{ + ID: utils.String(keyVaultDetails.keyVaultId), + } + } } if d.HasChange("auto_key_rotation_enabled") { @@ -335,7 +348,7 @@ func diskEncryptionSetRetrieveKeyVault(ctx context.Context, keyVaultsClient *cli return nil, fmt.Errorf("retrieving the Resource ID the Key Vault at URL %q: %s", keyVaultKeyId.KeyVaultBaseUrl, err) } if keyVaultID == nil { - return nil, fmt.Errorf("Unable to determine the Resource ID for the Key Vault at URL %q", keyVaultKeyId.KeyVaultBaseUrl) + return nil, nil } parsedKeyVaultID, err := keyVaultParse.VaultID(*keyVaultID) From 307a68a330a67f977b3f89a7fb14abdeda61aced Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 11 Aug 2022 19:30:16 -0700 Subject: [PATCH 076/100] CHANGELOG #17964 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f0518d9ae6..aceb1ae54f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 3.19.0 (Unreleased) + +BUG FIXES: + +* `azurerm_disk_encryption_set` - prevent an issue during creation when the disk encryption set and key vault are in different subscriptions [GH-17964] + ## 3.18.0 (August 11, 2022) FEATURES: From 9e06eb4560ba0de21aeb2e87d25974a98d0ff861 Mon Sep 17 00:00:00 2001 From: Tao <104055472+teowa@users.noreply.github.com> Date: Fri, 12 Aug 2022 10:33:00 +0800 Subject: [PATCH 077/100] Fix Import As Exists Error Message of`azurerm_monitor_diagnostic_setting` (#17963) --- .../services/monitor/monitor_diagnostic_setting_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/monitor/monitor_diagnostic_setting_resource.go b/internal/services/monitor/monitor_diagnostic_setting_resource.go index bf93816ac028..7a57158dc53a 100644 --- a/internal/services/monitor/monitor_diagnostic_setting_resource.go +++ b/internal/services/monitor/monitor_diagnostic_setting_resource.go @@ -195,7 +195,7 @@ func resourceMonitorDiagnosticSettingCreateUpdate(d *pluginsdk.ResourceData, met } if existing.ID != nil && *existing.ID != "" { - return tf.ImportAsExistsError("azurerm_monitor_diagnostic_setting", *existing.ID) + return tf.ImportAsExistsError("azurerm_monitor_diagnostic_setting", fmt.Sprintf("%s|%s", actualResourceId, name)) } } From 300a4f41a3297e4f37fffb7564e0301f82366373 Mon Sep 17 00:00:00 2001 From: JT <100274846+jiaweitao001@users.noreply.github.com> Date: Fri, 12 Aug 2022 10:36:30 +0800 Subject: [PATCH 078/100] `service_fabric_mananged_cluster_resource`: fix authentication block (#17960) --- .../service_fabric_managed_cluster_resource.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/services/servicefabricmanaged/service_fabric_managed_cluster_resource.go b/internal/services/servicefabricmanaged/service_fabric_managed_cluster_resource.go index c61b5cc46324..211f952581b9 100644 --- a/internal/services/servicefabricmanaged/service_fabric_managed_cluster_resource.go +++ b/internal/services/servicefabricmanaged/service_fabric_managed_cluster_resource.go @@ -679,6 +679,7 @@ func flattenClusterProperties(cluster *managedcluster.ManagedCluster) *ClusterRe model.Username = properties.AdminUserName if aad := properties.AzureActiveDirectory; aad != nil { + model.Authentication = append(model.Authentication, Authentication{}) adModel := ADAuthentication{} adModel.ClientApp = utils.NormalizeNilableString(aad.ClientApplication) adModel.ClusterApp = utils.NormalizeNilableString(aad.ClusterApplication) @@ -699,6 +700,9 @@ func flattenClusterProperties(cluster *managedcluster.ManagedCluster) *ClusterRe Thumbprint: utils.NormalizeNilableString(client.Thumbprint), } } + if len(model.Authentication) == 0 { + model.Authentication = append(model.Authentication, Authentication{}) + } model.Authentication[0].CertAuthentication = certs } From dfd483efc1716d7fb2b37d7913bff5937e54185a Mon Sep 17 00:00:00 2001 From: Dave Cheney Date: Fri, 12 Aug 2022 12:37:41 +1000 Subject: [PATCH 079/100] internal/services/cognitive: add kind = "OpenAI" (#17959) --- internal/services/cognitive/cognitive_account_resource.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/services/cognitive/cognitive_account_resource.go b/internal/services/cognitive/cognitive_account_resource.go index 1a54fe14b9ef..ad3ae85214c9 100644 --- a/internal/services/cognitive/cognitive_account_resource.go +++ b/internal/services/cognitive/cognitive_account_resource.go @@ -89,6 +89,7 @@ func resourceCognitiveAccount() *pluginsdk.Resource { "LUIS", "LUIS.Authoring", "MetricsAdvisor", + "OpenAI", "Personalizer", "QnAMaker", "Recommendations", From 4516da73d459060a9a2d138b998b5c23a09e5d4d Mon Sep 17 00:00:00 2001 From: Yichun Ma Date: Fri, 12 Aug 2022 10:38:31 +0800 Subject: [PATCH 080/100] `r\virtual_machine_extension` `r\virtual_machine_scale_set_extension`: Fix validation of `name` (#17941) --- .../compute/virtual_machine_extension_resource.go | 4 ++++ .../virtual_machine_scale_set_extension_resource.go | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/internal/services/compute/virtual_machine_extension_resource.go b/internal/services/compute/virtual_machine_extension_resource.go index 11300b08bef8..101c02955d6e 100644 --- a/internal/services/compute/virtual_machine_extension_resource.go +++ b/internal/services/compute/virtual_machine_extension_resource.go @@ -40,6 +40,10 @@ func resourceVirtualMachineExtension() *pluginsdk.Resource { Type: pluginsdk.TypeString, Required: true, ForceNew: true, + ValidateFunc: validation.All( + validation.StringIsNotEmpty, + validation.StringDoesNotContainAny("/"), + ), }, "virtual_machine_id": { diff --git a/internal/services/compute/virtual_machine_scale_set_extension_resource.go b/internal/services/compute/virtual_machine_scale_set_extension_resource.go index 21f653ade4f2..d023c04909d3 100644 --- a/internal/services/compute/virtual_machine_scale_set_extension_resource.go +++ b/internal/services/compute/virtual_machine_scale_set_extension_resource.go @@ -39,10 +39,13 @@ func resourceVirtualMachineScaleSetExtension() *pluginsdk.Resource { Schema: map[string]*pluginsdk.Schema{ "name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.All( + validation.StringIsNotEmpty, + validation.StringDoesNotContainAny("/"), + ), }, "virtual_machine_scale_set_id": { From 2e9832d54b88042317430c6f2449dadd1bb4e6b0 Mon Sep 17 00:00:00 2001 From: JT <100274846+jiaweitao001@users.noreply.github.com> Date: Fri, 12 Aug 2022 10:41:57 +0800 Subject: [PATCH 081/100] `data_protection_backup_policy_postgresql_resource`: fix provider crash if given an empty criteria block (#17904) --- ...ction_backup_policy_postgresql_resource.go | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/internal/services/dataprotection/data_protection_backup_policy_postgresql_resource.go b/internal/services/dataprotection/data_protection_backup_policy_postgresql_resource.go index 7d4a3ecf50f5..993ac61c7934 100644 --- a/internal/services/dataprotection/data_protection_backup_policy_postgresql_resource.go +++ b/internal/services/dataprotection/data_protection_backup_policy_postgresql_resource.go @@ -200,7 +200,10 @@ func resourceDataProtectionBackupPolicyPostgreSQLCreate(d *pluginsdk.ResourceDat return tf.ImportAsExistsError("azurerm_data_protection_backup_policy_postgresql", id.ID()) } - taggingCriteria := expandBackupPolicyPostgreSQLTaggingCriteriaArray(d.Get("retention_rule").([]interface{})) + taggingCriteria, err := expandBackupPolicyPostgreSQLTaggingCriteriaArray(d.Get("retention_rule").([]interface{})) + if err != nil { + return err + } policyRules := make([]dataprotection.BasicBasePolicyRule, 0) policyRules = append(policyRules, expandBackupPolicyPostgreSQLAzureBackupRuleArray(d.Get("backup_repeating_time_intervals").([]interface{}), taggingCriteria)...) policyRules = append(policyRules, expandBackupPolicyPostgreSQLDefaultAzureRetentionRule(d.Get("default_retention_duration"))) @@ -351,7 +354,7 @@ func expandBackupPolicyPostgreSQLDefaultAzureRetentionRule(input interface{}) da } } -func expandBackupPolicyPostgreSQLTaggingCriteriaArray(input []interface{}) *[]dataprotection.TaggingCriteria { +func expandBackupPolicyPostgreSQLTaggingCriteriaArray(input []interface{}) (*[]dataprotection.TaggingCriteria, error) { results := []dataprotection.TaggingCriteria{ { Criteria: nil, @@ -365,20 +368,29 @@ func expandBackupPolicyPostgreSQLTaggingCriteriaArray(input []interface{}) *[]da } for _, item := range input { v := item.(map[string]interface{}) - results = append(results, dataprotection.TaggingCriteria{ - Criteria: expandBackupPolicyPostgreSQLCriteriaArray(v["criteria"].([]interface{})), + result := dataprotection.TaggingCriteria{ IsDefault: utils.Bool(false), TaggingPriority: utils.Int64(int64(v["priority"].(int))), TagInfo: &dataprotection.RetentionTag{ ID: utils.String(v["name"].(string) + "_"), TagName: utils.String(v["name"].(string)), }, - }) + } + criteria, err := expandBackupPolicyPostgreSQLCriteriaArray(v["criteria"].([]interface{})) + if err != nil { + return nil, err + } + result.Criteria = criteria + + results = append(results, result) } - return &results + return &results, nil } -func expandBackupPolicyPostgreSQLCriteriaArray(input []interface{}) *[]dataprotection.BasicBackupCriteria { +func expandBackupPolicyPostgreSQLCriteriaArray(input []interface{}) (*[]dataprotection.BasicBackupCriteria, error) { + if len(input) == 0 || input[0] == nil { + return nil, fmt.Errorf("criteria is a required field, cannot leave blank") + } results := make([]dataprotection.BasicBackupCriteria, 0) for _, item := range input { v := item.(map[string]interface{}) @@ -429,7 +441,7 @@ func expandBackupPolicyPostgreSQLCriteriaArray(input []interface{}) *[]dataprote ObjectType: dataprotection.ObjectTypeBasicBackupCriteriaObjectTypeScheduleBasedBackupCriteria, }) } - return &results + return &results, nil } func flattenBackupPolicyPostgreSQLBackupRuleArray(input *[]dataprotection.BasicBasePolicyRule) []interface{} { From 979a8ee906f3e060bfbbdd804de1e04bfcca8883 Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 11 Aug 2022 19:42:46 -0700 Subject: [PATCH 082/100] CHANGELOG #17904 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aceb1ae54f81..561dca1ce053 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ BUG FIXES: +* `azurerm_data_protection_backup_policy_postgresql_resource` - prevent a crash when given an empty criteria block [GH-17904] * `azurerm_disk_encryption_set` - prevent an issue during creation when the disk encryption set and key vault are in different subscriptions [GH-17964] ## 3.18.0 (August 11, 2022) From e20efa892c469db16e10b20f3711237e97f32c45 Mon Sep 17 00:00:00 2001 From: Tao <104055472+teowa@users.noreply.github.com> Date: Fri, 12 Aug 2022 10:46:51 +0800 Subject: [PATCH 083/100] fix KeyVault test: `TestAccKeyVault_softDeleteRecoveryDisabled` (#17878) --- internal/services/keyvault/key_vault_resource_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/services/keyvault/key_vault_resource_test.go b/internal/services/keyvault/key_vault_resource_test.go index b12f9f93ea35..5d1821d408c9 100644 --- a/internal/services/keyvault/key_vault_resource_test.go +++ b/internal/services/keyvault/key_vault_resource_test.go @@ -983,6 +983,7 @@ func (KeyVaultResource) softDeleteAbsent(data acceptance.TestData) string { provider "azurerm" { features { key_vault { + purge_soft_delete_on_destroy = false recover_soft_deleted_key_vaults = false } } From d5cc32e1fff0a87ef5904979729cf06ff4311f1e Mon Sep 17 00:00:00 2001 From: richardfric <69456996+richardfric@users.noreply.github.com> Date: Fri, 12 Aug 2022 05:05:25 +0200 Subject: [PATCH 084/100] mssql_elastic_pool - add support for maintenance_configuration_name (#17790) --- .../mssql/mssql_elasticpool_resource.go | 32 +++++++++++++++++-- .../mssql/mssql_elasticpool_resource_test.go | 2 ++ .../docs/r/mssql_elasticpool.html.markdown | 2 ++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/internal/services/mssql/mssql_elasticpool_resource.go b/internal/services/mssql/mssql_elasticpool_resource.go index c1bf7087513a..c5ad4b0cee92 100644 --- a/internal/services/mssql/mssql_elasticpool_resource.go +++ b/internal/services/mssql/mssql_elasticpool_resource.go @@ -11,6 +11,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + maintenanceParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/maintenance/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/helper" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" @@ -114,6 +115,23 @@ func resourceMsSqlElasticPool() *pluginsdk.Resource { }, }, + "maintenance_configuration_name": { + Type: pluginsdk.TypeString, + Optional: true, + Default: "SQL_Default", + ValidateFunc: validation.StringInSlice([]string{"SQL_Default", "SQL_EastUS_MI_1", "SQL_EastUS2_MI_1", "SQL_WestUS2_MI_1", "SQL_SoutheastAsia_MI_1", "SQL_AustraliaEast_MI_1", "SQL_NorthEurope_MI_1", "SQL_SouthCentralUS_MI_1", + "SQL_UKSouth_MI_1", "SQL_WestEurope_MI_1", "SQL_EastUS_MI_2", "SQL_EastUS2_MI_2", "SQL_WestUS2_MI_2", "SQL_SoutheastAsia_MI_2", "SQL_NorthEurope_MI_2", "SQL_SouthCentralUS_MI_2", + "SQL_UKSouth_MI_2", "SQL_WestEurope_MI_2", "SQL_AustraliaSoutheast_MI_1", "SQL_BrazilSouth_MI_1", "SQL_CanadaCentral_MI_1", "SQL_CanadaEast_MI_1", "SQL_CentralUS_MI_1", "SQL_EastAsia_MI_1", + "SQL_FranceCentral_MI_1", "SQL_GermanyWestCentral_MI_1", "SQL_CentralIndia_MI_1", "SQL_JapanEast_MI_1", "SQL_JapanWest_MI_1", "SQL_NorthCentralUS_MI_1", "SQL_UKWest_MI_1", "SQL_WestUS_MI_1", + "SQL_AustraliaSoutheast_MI_2", "SQL_BrazilSouth_MI_2", "SQL_CanadaCentral_MI_2", "SQL_CanadaEast_MI_2", "SQL_CentralUS_MI_2", "SQL_EastAsia_MI_2", "SQL_FranceCentral_MI_2", "SQL_GermanyWestCentral_MI_2", + "SQL_CentralIndia_MI_2", "SQL_JapanEast_MI_2", "SQL_JapanWest_MI_2", "SQL_NorthCentralUS_MI_2", "SQL_UKWest_MI_2", "SQL_WestUS_MI_2", "SQL_KoreaCentral_MI_1", "SQL_KoreaCentral_MI_2", + "SQL_WestCentralUS_MI_1", "SQL_WestCentralUS_MI_2", "SQL_UAENorth_MI_1", "SQL_SwitzerlandWest_MI_1", "SQL_SwitzerlandNorth_MI_1", "SQL_UAENorth_MI_2", "SQL_SwitzerlandWest_MI_2", + "SQL_SwitzerlandNorth_MI_2", "SQL_FranceSouth_MI_1", "SQL_FranceSouth_MI_2", "SQL_SouthAfricaNorth_MI_1", "SQL_KoreaSouth_MI_1", "SQL_UAECentral_MI_1", "SQL_SouthAfricaNorth_MI_2", + "SQL_KoreaSouth_MI_2", "SQL_UAECentral_MI_2", "SQL_SouthIndia_MI_1", "SQL_SouthIndia_MI_2", "SQL_AustraliaCentral_MI_1", "SQL_AustraliaCentral2_MI_1", "SQL_AustraliaCentral_MI_2", + "SQL_AustraliaCentral2_MI_2", "SQL_WestIndia_MI_1", "SQL_WestIndia_MI_2", "SQL_SouthAfricaWest_MI_1", "SQL_SouthAfricaWest_MI_2", "SQL_GermanyNorth_MI_1", "SQL_GermanyNorth_MI_2", "SQL_NorwayEast_MI_1", + "SQL_BrazilSoutheast_MI_1", "SQL_NorwayWest_MI_1", "SQL_WestUS3_MI_1", "SQL_NorwayEast_MI_2", "SQL_BrazilSoutheast_MI_2", "SQL_NorwayWest_MI_2", "SQL_WestUS3_MI_2"}, false), + }, + "per_database_settings": { Type: pluginsdk.TypeList, Required: true, @@ -206,15 +224,17 @@ func resourceMsSqlElasticPoolCreateUpdate(d *pluginsdk.ResourceData, meta interf sku := expandMsSqlElasticPoolSku(d) t := d.Get("tags").(map[string]interface{}) + maintenanceConfigId := maintenanceParse.NewPublicMaintenanceConfigurationID(subscriptionId, d.Get("maintenance_configuration_name").(string)) elasticPool := sql.ElasticPool{ Name: &id.Name, Location: &location, Sku: sku, Tags: tags.Expand(t), ElasticPoolProperties: &sql.ElasticPoolProperties{ - LicenseType: sql.ElasticPoolLicenseType(d.Get("license_type").(string)), - PerDatabaseSettings: expandMsSqlElasticPoolPerDatabaseSettings(d), - ZoneRedundant: utils.Bool(d.Get("zone_redundant").(bool)), + LicenseType: sql.ElasticPoolLicenseType(d.Get("license_type").(string)), + PerDatabaseSettings: expandMsSqlElasticPoolPerDatabaseSettings(d), + ZoneRedundant: utils.Bool(d.Get("zone_redundant").(bool)), + MaintenanceConfigurationID: utils.String(maintenanceConfigId.ID()), }, } @@ -288,6 +308,12 @@ func resourceMsSqlElasticPoolRead(d *pluginsdk.ResourceData, meta interface{}) e if err := d.Set("per_database_settings", flattenMsSqlElasticPoolPerDatabaseSettings(properties.PerDatabaseSettings)); err != nil { return fmt.Errorf("setting `per_database_settings`: %+v", err) } + + maintenanceConfigId, err := maintenanceParse.PublicMaintenanceConfigurationID(*properties.MaintenanceConfigurationID) + if err != nil { + return err + } + d.Set("maintenance_configuration_name", maintenanceConfigId.Name) } return tags.FlattenAndSet(d, resp.Tags) diff --git a/internal/services/mssql/mssql_elasticpool_resource_test.go b/internal/services/mssql/mssql_elasticpool_resource_test.go index 510d768e76d1..25cd51b65962 100644 --- a/internal/services/mssql/mssql_elasticpool_resource_test.go +++ b/internal/services/mssql/mssql_elasticpool_resource_test.go @@ -264,6 +264,8 @@ resource "azurerm_mssql_elasticpool" "import" { server_name = azurerm_mssql_elasticpool.test.server_name max_size_gb = 4.8828125 + maintenance_configuration_name = "SQL_Default" + sku { name = "BasicPool" tier = "Basic" diff --git a/website/docs/r/mssql_elasticpool.html.markdown b/website/docs/r/mssql_elasticpool.html.markdown index 59cabb2be56d..5a1e6d9a1df2 100644 --- a/website/docs/r/mssql_elasticpool.html.markdown +++ b/website/docs/r/mssql_elasticpool.html.markdown @@ -65,6 +65,8 @@ The following arguments are supported: * `per_database_settings` - (Required) A `per_database_settings` block as defined below. +* `maintenance_configuration_name` - (Optional) The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include `SQL_Default`, `SQL_EastUS_MI_1`, `SQL_EastUS2_MI_1`, `SQL_WestUS2_MI_1`, `SQL_SoutheastAsia_MI_1`, `SQL_AustraliaEast_MI_1`, `SQL_NorthEurope_MI_1`, `SQL_SouthCentralUS_MI_1`, `SQL_UKSouth_MI_1`, `SQL_WestEurope_MI_1`, `SQL_EastUS_MI_2`, `SQL_EastUS2_MI_2`, `SQL_WestUS2_MI_2`, `SQL_SoutheastAsia_MI_2`, `SQL_NorthEurope_MI_2`, `SQL_SouthCentralUS_MI_2`, `SQL_UKSouth_MI_2`, `SQL_WestEurope_MI_2`, `SQL_AustraliaSoutheast_MI_1`, `SQL_BrazilSouth_MI_1`, `SQL_CanadaCentral_MI_1`, `SQL_CanadaEast_MI_1`, `SQL_CentralUS_MI_1`, `SQL_EastAsia_MI_1`, `SQL_FranceCentral_MI_1`, `SQL_GermanyWestCentral_MI_1`, `SQL_CentralIndia_MI_1`, `SQL_JapanEast_MI_1`, `SQL_JapanWest_MI_1`, `SQL_NorthCentralUS_MI_1`, `SQL_UKWest_MI_1`, `SQL_WestUS_MI_1`, `SQL_AustraliaSoutheast_MI_2`, `SQL_BrazilSouth_MI_2`, `SQL_CanadaCentral_MI_2`, `SQL_CanadaEast_MI_2`, `SQL_CentralUS_MI_2`, `SQL_EastAsia_MI_2`, `SQL_FranceCentral_MI_2`, `SQL_GermanyWestCentral_MI_2`, `SQL_CentralIndia_MI_2`, `SQL_JapanEast_MI_2`, `SQL_JapanWest_MI_2`, `SQL_NorthCentralUS_MI_2`, `SQL_UKWest_MI_2`, `SQL_WestUS_MI_2`, `SQL_KoreaCentral_MI_1`, `SQL_KoreaCentral_MI_2`, `SQL_WestCentralUS_MI_1`, `SQL_WestCentralUS_MI_2`, `SQL_UAENorth_MI_1`, `SQL_SwitzerlandWest_MI_1`, `SQL_SwitzerlandNorth_MI_1`, `SQL_UAENorth_MI_2`, `SQL_SwitzerlandWest_MI_2`, `SQL_SwitzerlandNorth_MI_2`, `SQL_FranceSouth_MI_1`, `SQL_FranceSouth_MI_2`, `SQL_SouthAfricaNorth_MI_1`, `SQL_KoreaSouth_MI_1`, `SQL_UAECentral_MI_1`, `SQL_SouthAfricaNorth_MI_2`, `SQL_KoreaSouth_MI_2`, `SQL_UAECentral_MI_2`, `SQL_SouthIndia_MI_1`, `SQL_SouthIndia_MI_2`, `SQL_AustraliaCentral_MI_1`, `SQL_AustraliaCentral2_MI_1`, `SQL_AustraliaCentral_MI_2`, `SQL_AustraliaCentral2_MI_2`, `SQL_WestIndia_MI_1`, `SQL_WestIndia_MI_2`, `SQL_SouthAfricaWest_MI_1`, `SQL_SouthAfricaWest_MI_2`, `SQL_GermanyNorth_MI_1`, `SQL_GermanyNorth_MI_2`, `SQL_NorwayEast_MI_1`, `SQL_BrazilSoutheast_MI_1`, `SQL_NorwayWest_MI_1`, `SQL_WestUS3_MI_1`, `SQL_NorwayEast_MI_2`, `SQL_BrazilSoutheast_MI_2`, `SQL_NorwayWest_MI_2`, `SQL_WestUS3_MI_2`. Defaults to `SQL_Default`. + * `max_size_gb` - (Optional) The max data size of the elastic pool in gigabytes. Conflicts with `max_size_bytes`. * `max_size_bytes` - (Optional) The max data size of the elastic pool in bytes. Conflicts with `max_size_gb`. From fa545a57af0b7fa5f61338b8a1864cc04877798a Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 11 Aug 2022 20:06:10 -0700 Subject: [PATCH 085/100] CHANGELOG #17790 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 561dca1ce053..292ad0efc064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 3.19.0 (Unreleased) +ENHANCEMENTS: + +* `azurerm_mssql_elastic_pool` - support for the `maintenance_configuration_name` property [GH-17790] + BUG FIXES: * `azurerm_data_protection_backup_policy_postgresql_resource` - prevent a crash when given an empty criteria block [GH-17904] From 5ed7d81432c5204c17ab3704aca988a8f531e4e2 Mon Sep 17 00:00:00 2001 From: Yichun Ma Date: Fri, 12 Aug 2022 11:12:44 +0800 Subject: [PATCH 086/100] `d\images`: Use fixed id (#17766) --- .../services/compute/images_data_source.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/internal/services/compute/images_data_source.go b/internal/services/compute/images_data_source.go index 89c211e6084e..9c3a022519fc 100644 --- a/internal/services/compute/images_data_source.go +++ b/internal/services/compute/images_data_source.go @@ -3,6 +3,7 @@ package compute import ( "context" "fmt" + "sort" "time" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-11-01/compute" @@ -139,7 +140,23 @@ func dataSourceImagesRead(d *pluginsdk.ResourceData, meta interface{}) error { return fmt.Errorf("no images were found that match the specified tags") } - d.SetId(time.Now().UTC().String()) + tagsId := "" + tagKeys := make([]string, 0, len(filterTags)) + for key := range filterTags { + tagKeys = append(tagKeys, key) + } + sort.Strings(tagKeys) + for _, key := range tagKeys { + value := "" + if v, ok := filterTags[key]; ok && v != nil { + value = *v + } + tagsId += fmt.Sprintf("[%s:%s]", key, value) + } + if tagsId == "" { + tagsId = "[]" + } + d.SetId(fmt.Sprintf("resourceGroups/%s/tags/%s/images", resourceGroup, tagsId)) d.Set("resource_group_name", resourceGroup) From d9c31a83f835c08ce90ceab23b29830bf3bdda2f Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 11 Aug 2022 20:13:43 -0700 Subject: [PATCH 087/100] CHANGELOG #17766 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 292ad0efc064..a9bdeb8377ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +Data Source: `azurerm_images` - now uses a logical id [GH-17766] * `azurerm_mssql_elastic_pool` - support for the `maintenance_configuration_name` property [GH-17790] BUG FIXES: From 5c3d3c71171f6de593a6363447fc08265ba36e23 Mon Sep 17 00:00:00 2001 From: Thomas Meckel <14177833+tmeckel@users.noreply.github.com> Date: Fri, 12 Aug 2022 05:19:54 +0200 Subject: [PATCH 088/100] bugfix: azurerm_application_gateway: unable to create private DNS record out of frontend_ip_configuration[*].private_ip_address (#17632) Co-authored-by: Thomas Meckel --- internal/services/network/application_gateway_resource.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/services/network/application_gateway_resource.go b/internal/services/network/application_gateway_resource.go index 47ab875139f9..e92e3dbf08af 100644 --- a/internal/services/network/application_gateway_resource.go +++ b/internal/services/network/application_gateway_resource.go @@ -325,6 +325,7 @@ func resourceApplicationGateway() *pluginsdk.Resource { "private_ip_address": { Type: pluginsdk.TypeString, Optional: true, + Computed: true, }, "public_ip_address_id": { From 6cedf008c4a64a0aa6ec3f06dbcc98da176e1679 Mon Sep 17 00:00:00 2001 From: Elena Xin <39109137+sinbai@users.noreply.github.com> Date: Fri, 12 Aug 2022 11:38:04 +0800 Subject: [PATCH 089/100] azurerm_key_vault : Support public_network_access_enabled proptery for resource azurerm_key_vault (#17552) The purpose of this PR: Support public_network_access_enabled property for azurerm_key_vault and data.azurerm_key_vault. Delete func enableSoftDelete as it is unused. Fix issue #17533. --- .../keyvault/key_vault_data_source.go | 9 +++++++ .../keyvault/key_vault_data_source_test.go | 11 -------- .../services/keyvault/key_vault_resource.go | 27 +++++++++++++++++++ .../keyvault/key_vault_resource_test.go | 4 +++ website/docs/d/key_vault.html.markdown | 2 ++ website/docs/r/key_vault.html.markdown | 2 ++ 6 files changed, 44 insertions(+), 11 deletions(-) diff --git a/internal/services/keyvault/key_vault_data_source.go b/internal/services/keyvault/key_vault_data_source.go index 349902765209..ad03262f124d 100644 --- a/internal/services/keyvault/key_vault_data_source.go +++ b/internal/services/keyvault/key_vault_data_source.go @@ -155,6 +155,11 @@ func dataSourceKeyVault() *pluginsdk.Resource { Computed: true, }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + "tags": tags.SchemaDataSource(), }, } @@ -190,6 +195,10 @@ func dataSourceKeyVaultRead(d *pluginsdk.ResourceData, meta interface{}) error { d.Set("enabled_for_template_deployment", props.EnabledForTemplateDeployment) d.Set("enable_rbac_authorization", props.EnableRbacAuthorization) d.Set("purge_protection_enabled", props.EnablePurgeProtection) + if v := props.PublicNetworkAccess; v != nil { + d.Set("public_network_access_enabled", *v == "Enabled") + } + d.Set("vault_uri", props.VaultURI) if props.VaultURI != nil { meta.(*clients.Client).KeyVault.AddToCache(id, *resp.Properties.VaultURI) diff --git a/internal/services/keyvault/key_vault_data_source_test.go b/internal/services/keyvault/key_vault_data_source_test.go index 9e6075ce6b2a..b4bb9d7a2fcf 100644 --- a/internal/services/keyvault/key_vault_data_source_test.go +++ b/internal/services/keyvault/key_vault_data_source_test.go @@ -138,14 +138,3 @@ data "azurerm_key_vault" "test" { } `, KeyVaultResource{}.networkAclsUpdated(data)) } - -func (KeyVaultDataSource) enableSoftDelete(data acceptance.TestData) string { - return fmt.Sprintf(` -%s - -data "azurerm_key_vault" "test" { - name = azurerm_key_vault.test.name - resource_group_name = azurerm_key_vault.test.resource_group_name -} -`, KeyVaultResource{}.softDelete(data)) -} diff --git a/internal/services/keyvault/key_vault_resource.go b/internal/services/keyvault/key_vault_resource.go index aeefbc837b60..758dbf1985c2 100644 --- a/internal/services/keyvault/key_vault_resource.go +++ b/internal/services/keyvault/key_vault_resource.go @@ -187,6 +187,12 @@ func resourceKeyVault() *pluginsdk.Resource { }, }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "purge_protection_enabled": { Type: pluginsdk.TypeBool, Optional: true, @@ -317,6 +323,12 @@ func resourceKeyVaultCreate(d *pluginsdk.ResourceData, meta interface{}) error { Tags: tags.Expand(t), } + if d.Get("public_network_access_enabled").(bool) { + parameters.Properties.PublicNetworkAccess = utils.String("Enabled") + } else { + parameters.Properties.PublicNetworkAccess = utils.String("Disabled") + } + if purgeProtectionEnabled := d.Get("purge_protection_enabled").(bool); purgeProtectionEnabled { parameters.Properties.EnablePurgeProtection = utils.Bool(purgeProtectionEnabled) } @@ -523,6 +535,18 @@ func resourceKeyVaultUpdate(d *pluginsdk.ResourceData, meta interface{}) error { } } + if d.HasChange("public_network_access_enabled") { + if update.Properties == nil { + update.Properties = &keyvault.VaultPatchProperties{} + } + + if d.Get("public_network_access_enabled").(bool) { + update.Properties.PublicNetworkAccess = utils.String("Enabled") + } else { + update.Properties.PublicNetworkAccess = utils.String("Disabled") + } + } + if d.HasChange("sku_name") { if update.Properties == nil { update.Properties = &keyvault.VaultPatchProperties{} @@ -638,6 +662,9 @@ func resourceKeyVaultRead(d *pluginsdk.ResourceData, meta interface{}) error { d.Set("enabled_for_template_deployment", props.EnabledForTemplateDeployment) d.Set("enable_rbac_authorization", props.EnableRbacAuthorization) d.Set("purge_protection_enabled", props.EnablePurgeProtection) + if v := props.PublicNetworkAccess; v != nil { + d.Set("public_network_access_enabled", *v == "Enabled") + } d.Set("vault_uri", props.VaultURI) // @tombuildsstuff: the API doesn't return this field if it's not configured diff --git a/internal/services/keyvault/key_vault_resource_test.go b/internal/services/keyvault/key_vault_resource_test.go index 5d1821d408c9..0757e1e64cad 100644 --- a/internal/services/keyvault/key_vault_resource_test.go +++ b/internal/services/keyvault/key_vault_resource_test.go @@ -689,6 +689,7 @@ resource "azurerm_key_vault" "test" { ] } + public_network_access_enabled = false enabled_for_deployment = true enabled_for_disk_encryption = true enabled_for_template_deployment = true @@ -723,6 +724,7 @@ resource "azurerm_key_vault" "test" { sku_name = "standard" soft_delete_retention_days = 7 + public_network_access_enabled = true enabled_for_deployment = true enabled_for_disk_encryption = true enabled_for_template_deployment = true @@ -793,6 +795,8 @@ resource "azurerm_key_vault" "test" { sku_name = "standard" soft_delete_retention_days = 7 + public_network_access_enabled = false + access_policy { tenant_id = data.azurerm_client_config.current.tenant_id object_id = data.azurerm_client_config.current.object_id diff --git a/website/docs/d/key_vault.html.markdown b/website/docs/d/key_vault.html.markdown index 82f33335386d..a467ab30ad98 100644 --- a/website/docs/d/key_vault.html.markdown +++ b/website/docs/d/key_vault.html.markdown @@ -57,6 +57,8 @@ The following attributes are exported: * `purge_protection_enabled` - Is purge protection enabled on this Key Vault? +* `public_network_access_enabled` - Is public network access enabled on this Key Vault? + * `tags` - A mapping of tags assigned to the Key Vault. A `access_policy` block supports the following: diff --git a/website/docs/r/key_vault.html.markdown b/website/docs/r/key_vault.html.markdown index 551c7a66b12b..d0d37559d196 100644 --- a/website/docs/r/key_vault.html.markdown +++ b/website/docs/r/key_vault.html.markdown @@ -98,6 +98,8 @@ The following arguments are supported: !> **Note:** Once Purge Protection has been Enabled it's not possible to Disable it. Support for [disabling purge protection is being tracked in this Azure API issue](https://github.com/Azure/azure-rest-api-specs/issues/8075). Deleting the Key Vault with Purge Protection Enabled will schedule the Key Vault to be deleted (which will happen by Azure in the configured number of days, currently 90 days - which will be configurable in Terraform in the future). +* `public_network_access_enabled` - (Optional) Whether public network access is allowed for this Key Vault. Defaults to `true`. + * `soft_delete_retention_days` - (Optional) The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` (the default) days. ~> **Note:** This field can only be configured one time and cannot be updated. From 563fc390737d66833de2e15e1d860015b7f80de7 Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 11 Aug 2022 20:38:48 -0700 Subject: [PATCH 090/100] CHANGELOG ##17552 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9bdeb8377ca..08d7a5548328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ENHANCEMENTS: -Data Source: `azurerm_images` - now uses a logical id [GH-17766] +* Data Source: `azurerm_images` - now uses a logical id [GH-17766] +* `azurerm_key_vault` - support for the `public_network_access_enabled` property [GH-17552] * `azurerm_mssql_elastic_pool` - support for the `maintenance_configuration_name` property [GH-17790] BUG FIXES: From 101bcfe9744c6af4de4853215ab8cfe187856552 Mon Sep 17 00:00:00 2001 From: Zhenhua Hu Date: Fri, 12 Aug 2022 13:04:18 +0800 Subject: [PATCH 091/100] Add example for Private Link Scope (#17873) --- .../private-link-scope/README.md | 9 +++ .../private-link-scope/main.tf | 64 +++++++++++++++++++ .../private-link-scope/variables.tf | 7 ++ 3 files changed, 80 insertions(+) create mode 100644 examples/private-endpoint/private-link-scope/README.md create mode 100644 examples/private-endpoint/private-link-scope/main.tf create mode 100644 examples/private-endpoint/private-link-scope/variables.tf diff --git a/examples/private-endpoint/private-link-scope/README.md b/examples/private-endpoint/private-link-scope/README.md new file mode 100644 index 000000000000..e5411e01a7b3 --- /dev/null +++ b/examples/private-endpoint/private-link-scope/README.md @@ -0,0 +1,9 @@ +## Example: Private Endpoint + +This example provisions a Private Endpoint which connects to a Private Link Scope within Azure. + +### Variables + +* `prefix` - (Required) The prefix used for all resources in this example. + +* `location` - (Required) The Azure Region in which all resources in this example should be created. diff --git a/examples/private-endpoint/private-link-scope/main.tf b/examples/private-endpoint/private-link-scope/main.tf new file mode 100644 index 000000000000..a3a3198658f2 --- /dev/null +++ b/examples/private-endpoint/private-link-scope/main.tf @@ -0,0 +1,64 @@ +provider "azurerm" { + features {} +} + +locals { + private_dns_zones_names = toset([ + "privatelink.agentsvc.azure-automation.net", + "privatelink.blob.core.windows.net", + "privatelink.monitor.azure.com", + "privatelink.ods.opinsights.azure.com", + "privatelink.oms.opinsights.azure.com", + ]) +} + +resource "azurerm_resource_group" "example" { + name = "${var.prefix}-resources" + location = var.location +} + +resource "azurerm_virtual_network" "example" { + name = "${var.prefix}-vnet" + address_space = ["10.0.0.0/16"] + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_subnet" "example" { + name = "${var.prefix}-subnet" + resource_group_name = azurerm_resource_group.example.name + virtual_network_name = azurerm_virtual_network.example.name + address_prefixes = ["10.0.1.0/24"] + enforce_private_link_service_network_policies = true +} + +resource "azurerm_private_dns_zone" "example" { + for_each = local.private_dns_zones_names + + name = each.value + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_monitor_private_link_scope" "example" { + name = "${var.prefix}-ampls" + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_private_endpoint" "this" { + name = "${var.prefix}-ape" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + subnet_id = azurerm_subnet.example.id + + private_dns_zone_group { + name = "default" + private_dns_zone_ids = [for _, v in azurerm_private_dns_zone.example : v.id] + } + + private_service_connection { + name = "${var.prefix}-psc" + is_manual_connection = false + private_connection_resource_id = azurerm_monitor_private_link_scope.example.id + subresource_names = ["azuremonitor"] + } +} diff --git a/examples/private-endpoint/private-link-scope/variables.tf b/examples/private-endpoint/private-link-scope/variables.tf new file mode 100644 index 000000000000..0e6145faa285 --- /dev/null +++ b/examples/private-endpoint/private-link-scope/variables.tf @@ -0,0 +1,7 @@ +variable "prefix" { + description = "The Prefix used for all resources in this example" +} + +variable "location" { + description = "The Azure Region in which all resources in this example should be created." +} From b45ebe10afbf222278e1868f880017389f63e236 Mon Sep 17 00:00:00 2001 From: Paddy Morgan Date: Fri, 12 Aug 2022 17:32:43 +0100 Subject: [PATCH 092/100] Fix grammar for `waf_configuration.enabled` (#17978) --- website/docs/r/application_gateway.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/application_gateway.html.markdown b/website/docs/r/application_gateway.html.markdown index edb1ef1a7ce9..8692b3d7e2d1 100644 --- a/website/docs/r/application_gateway.html.markdown +++ b/website/docs/r/application_gateway.html.markdown @@ -525,7 +525,7 @@ When using a `policy_type` of `Custom` the following fields are supported: A `waf_configuration` block supports the following: -* `enabled` - (Required) Is the Web Application Firewall be enabled? +* `enabled` - (Required) Is the Web Application Firewall enabled? * `firewall_mode` - (Required) The Web Application Firewall Mode. Possible values are `Detection` and `Prevention`. From b5a1ddd081f53ddc643f859c1f155bf9651dde2a Mon Sep 17 00:00:00 2001 From: Lars Maes Date: Fri, 12 Aug 2022 18:38:20 +0200 Subject: [PATCH 093/100] Revert "Update naming validation to allow length to be 1 - 128 (#17965)" (#17977) --- .../services/policy/assignment_management_group_resource.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/services/policy/assignment_management_group_resource.go b/internal/services/policy/assignment_management_group_resource.go index 34ca520973d6..6480b40972c5 100644 --- a/internal/services/policy/assignment_management_group_resource.go +++ b/internal/services/policy/assignment_management_group_resource.go @@ -28,8 +28,8 @@ func (r ManagementGroupAssignmentResource) Arguments() map[string]*pluginsdk.Sch ForceNew: true, ValidateFunc: validation.All( validation.StringIsNotWhiteSpace, - // The policy assignment name length must not exceed '128' characters. - validation.StringLenBetween(1, 128), + // The policy assignment name length must not exceed '24' characters. + validation.StringLenBetween(3, 24), validation.StringDoesNotContainAny("/"), ), }, From baedea9c7bdaa2218428aba615c8ee6211da5ea3 Mon Sep 17 00:00:00 2001 From: stephybun Date: Fri, 12 Aug 2022 19:08:46 +0200 Subject: [PATCH 094/100] swap to go-azure-sdk (#17984) --- .../services/costmanagement/client/client.go | 6 +- .../costmanagement/export_base_resource.go | 178 +- .../export_resource_group_resource_test.go | 9 +- .../export_subscription_resource_test.go | 9 +- .../2020-06-01/costmanagement/CHANGELOG.md | 2 - .../mgmt/2020-06-01/costmanagement/_meta.json | 11 - .../mgmt/2020-06-01/costmanagement/alerts.go | 374 ---- .../mgmt/2020-06-01/costmanagement/client.go | 41 - .../2020-06-01/costmanagement/dimensions.go | 254 --- .../mgmt/2020-06-01/costmanagement/enums.go | 546 ----- .../mgmt/2020-06-01/costmanagement/exports.go | 581 ------ .../2020-06-01/costmanagement/forecast.go | 274 --- .../mgmt/2020-06-01/costmanagement/models.go | 1773 ----------------- .../2020-06-01/costmanagement/operations.go | 140 -- .../mgmt/2020-06-01/costmanagement/query.go | 267 --- .../mgmt/2020-06-01/costmanagement/version.go | 19 - .../mgmt/2020-06-01/costmanagement/views.go | 832 -------- .../2021-10-01/exports/README.md | 121 ++ .../2021-10-01/exports/client.go | 18 + .../2021-10-01/exports/constants.go | 260 +++ .../2021-10-01/exports/id_scopedexport.go | 110 + .../exports/method_createorupdate_autorest.go | 69 + .../exports/method_delete_autorest.go | 66 + .../exports/method_execute_autorest.go | 67 + .../2021-10-01/exports/method_get_autorest.go | 97 + .../method_getexecutionhistory_autorest.go | 69 + .../exports/method_list_autorest.go | 99 + .../exports/model_commonexportproperties.go | 31 + .../2021-10-01/exports/model_errordetails.go | 9 + .../2021-10-01/exports/model_export.go | 12 + .../2021-10-01/exports/model_exportdataset.go | 9 + .../model_exportdatasetconfiguration.go | 8 + .../exports/model_exportdefinition.go | 11 + .../model_exportdeliverydestination.go | 12 + .../exports/model_exportdeliveryinfo.go | 8 + .../exports/model_exportexecution.go | 12 + .../model_exportexecutionlistresult.go | 8 + .../model_exportexecutionproperties.go | 58 + .../exports/model_exportlistresult.go | 8 + .../exports/model_exportproperties.go | 32 + .../exports/model_exportrecurrenceperiod.go | 36 + .../exports/model_exportschedule.go | 10 + .../exports/model_exporttimeperiod.go | 33 + .../2021-10-01/exports/version.go | 12 + vendor/modules.txt | 2 +- 45 files changed, 1391 insertions(+), 5212 deletions(-) delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/CHANGELOG.md delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/_meta.json delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/alerts.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/client.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/dimensions.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/enums.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/exports.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/forecast.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/models.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/operations.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/query.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/version.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/views.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_delete_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_execute_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_get_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_list_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_commonexportproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_errordetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_export.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdataset.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdatasetconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdefinition.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliverydestination.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliveryinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecution.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionlistresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportlistresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportrecurrenceperiod.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportschedule.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exporttimeperiod.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/version.go diff --git a/internal/services/costmanagement/client/client.go b/internal/services/costmanagement/client/client.go index 7aad7f59b174..a72e8e4735eb 100644 --- a/internal/services/costmanagement/client/client.go +++ b/internal/services/costmanagement/client/client.go @@ -1,16 +1,16 @@ package client import ( - "github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement" + "github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { - ExportClient *costmanagement.ExportsClient + ExportClient *exports.ExportsClient } func NewClient(o *common.ClientOptions) *Client { - ExportClient := costmanagement.NewExportsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + ExportClient := exports.NewExportsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&ExportClient.Client, o.ResourceManagerAuthorizer) return &Client{ diff --git a/internal/services/costmanagement/export_base_resource.go b/internal/services/costmanagement/export_base_resource.go index cb8ea970ab31..5595512d9900 100644 --- a/internal/services/costmanagement/export_base_resource.go +++ b/internal/services/costmanagement/export_base_resource.go @@ -5,11 +5,10 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement" - "github.com/Azure/go-autorest/autorest/date" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/costmanagement/parse" storageParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse" storageValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -31,10 +30,10 @@ func (br costManagementExportBaseResource) arguments(fields map[string]*pluginsd Type: pluginsdk.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - string(costmanagement.RecurrenceTypeDaily), - string(costmanagement.RecurrenceTypeWeekly), - string(costmanagement.RecurrenceTypeMonthly), - string(costmanagement.RecurrenceTypeAnnually), + string(exports.RecurrenceTypeDaily), + string(exports.RecurrenceTypeWeekly), + string(exports.RecurrenceTypeMonthly), + string(exports.RecurrenceTypeAnnually), }, false), }, @@ -82,9 +81,9 @@ func (br costManagementExportBaseResource) arguments(fields map[string]*pluginsd Type: pluginsdk.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - string(costmanagement.ExportTypeActualCost), - string(costmanagement.ExportTypeAmortizedCost), - string(costmanagement.ExportTypeUsage), + string(exports.ExportTypeActualCost), + string(exports.ExportTypeAmortizedCost), + string(exports.ExportTypeUsage), }, false), }, @@ -92,12 +91,12 @@ func (br costManagementExportBaseResource) arguments(fields map[string]*pluginsd Type: pluginsdk.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - string(costmanagement.Custom), - string(costmanagement.BillingMonthToDate), - string(costmanagement.TheLastBillingMonth), - string(costmanagement.TheLastMonth), - string(costmanagement.WeekToDate), - string(costmanagement.MonthToDate), + string(exports.TimeframeTypeCustom), + string(exports.TimeframeTypeBillingMonthToDate), + string(exports.TimeframeTypeTheLastBillingMonth), + string(exports.TimeframeTypeTheLastMonth), + string(exports.TimeframeTypeWeekToDate), + string(exports.TimeframeTypeMonthToDate), }, false), }, }, @@ -121,15 +120,16 @@ func (br costManagementExportBaseResource) createFunc(resourceName, scopeFieldNa Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.CostManagement.ExportClient - id := parse.NewCostManagementExportId(metadata.ResourceData.Get(scopeFieldName).(string), metadata.ResourceData.Get("name").(string)) - existing, err := client.Get(ctx, id.Scope, id.Name, "") + id := exports.NewScopedExportID(metadata.ResourceData.Get(scopeFieldName).(string), metadata.ResourceData.Get("name").(string)) + var opts exports.GetOperationOptions + existing, err := client.Get(ctx, id, opts) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError(resourceName, id.ID()) } @@ -149,46 +149,48 @@ func (br costManagementExportBaseResource) readFunc(scopeFieldName string) sdk.R Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.CostManagement.ExportClient - id, err := parse.CostManagementExportID(metadata.ResourceData.Id()) + id, err := exports.ParseScopedExportID(metadata.ResourceData.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.Scope, id.Name, "") + var opts exports.GetOperationOptions + resp, err := client.Get(ctx, *id, opts) if err != nil { - if !utils.ResponseWasNotFound(resp.Response) { + if !response.WasNotFound(resp.HttpResponse) { return metadata.MarkAsGone(id) } return fmt.Errorf("reading %s: %+v", *id, err) } - metadata.ResourceData.Set("name", id.Name) + metadata.ResourceData.Set("name", id.ExportName) //lintignore:R001 metadata.ResourceData.Set(scopeFieldName, id.Scope) - if schedule := resp.Schedule; schedule != nil { - if recurrencePeriod := schedule.RecurrencePeriod; recurrencePeriod != nil { - metadata.ResourceData.Set("recurrence_period_start_date", recurrencePeriod.From.Format(time.RFC3339)) - metadata.ResourceData.Set("recurrence_period_end_date", recurrencePeriod.To.Format(time.RFC3339)) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + if schedule := props.Schedule; schedule != nil { + if recurrencePeriod := schedule.RecurrencePeriod; recurrencePeriod != nil { + metadata.ResourceData.Set("recurrence_period_start_date", recurrencePeriod.From) + metadata.ResourceData.Set("recurrence_period_end_date", recurrencePeriod.To) + } + status := *schedule.Status == exports.StatusTypeActive + + metadata.ResourceData.Set("active", status) + metadata.ResourceData.Set("recurrence_type", schedule.Recurrence) + } + + exportDeliveryInfo, err := flattenExportDataStorageLocation(&props.DeliveryInfo) + if err != nil { + return fmt.Errorf("flattening `export_data_storage_location`: %+v", err) + } + if err := metadata.ResourceData.Set("export_data_storage_location", exportDeliveryInfo); err != nil { + return fmt.Errorf("setting `export_data_storage_location`: %+v", err) + } + if err := metadata.ResourceData.Set("export_data_options", flattenExportDefinition(&props.Definition)); err != nil { + return fmt.Errorf("setting `export_data_options`: %+v", err) + } } - - status := schedule.Status == costmanagement.Active - - metadata.ResourceData.Set("active", status) - metadata.ResourceData.Set("recurrence_type", schedule.Recurrence) - } - - exportDeliveryInfo, err := flattenExportDataStorageLocation(resp.DeliveryInfo) - if err != nil { - return fmt.Errorf("flattening `export_data_storage_location`: %+v", err) - } - - if err := metadata.ResourceData.Set("export_data_storage_location", exportDeliveryInfo); err != nil { - return fmt.Errorf("setting `export_data_storage_location`: %+v", err) - } - - if err := metadata.ResourceData.Set("export_data_options", flattenExportDefinition(resp.Definition)); err != nil { - return fmt.Errorf("setting `export_data_options`: %+v", err) } return nil @@ -202,12 +204,12 @@ func (br costManagementExportBaseResource) deleteFunc() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.CostManagement.ExportClient - id, err := parse.CostManagementExportID(metadata.ResourceData.Id()) + id, err := exports.ParseScopedExportID(metadata.ResourceData.Id()) if err != nil { return err } - if _, err = client.Delete(ctx, id.Scope, id.Name); err != nil { + if _, err = client.Delete(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", *id, err) } @@ -222,20 +224,25 @@ func (br costManagementExportBaseResource) updateFunc() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { client := metadata.Client.CostManagement.ExportClient - id, err := parse.CostManagementExportID(metadata.ResourceData.Id()) + id, err := exports.ParseScopedExportID(metadata.ResourceData.Id()) if err != nil { return err } // Update operation requires latest eTag to be set in the request. - resp, err := client.Get(ctx, id.Scope, id.Name, "") + var opts exports.GetOperationOptions + resp, err := client.Get(ctx, *id, opts) if err != nil { return fmt.Errorf("reading %s: %+v", *id, err) } - if resp.ETag == nil { - return fmt.Errorf("add %s: etag was nil", *id) + + if model := resp.Model; model != nil { + if model.ETag == nil { + return fmt.Errorf("add %s: etag was nil", *id) + } } - if err := createOrUpdateCostManagementExport(ctx, client, metadata, *id, resp.ETag); err != nil { + + if err := createOrUpdateCostManagementExport(ctx, client, metadata, *id, resp.Model.ETag); err != nil { return fmt.Errorf("updating %s: %+v", *id, err) } @@ -244,13 +251,10 @@ func (br costManagementExportBaseResource) updateFunc() sdk.ResourceFunc { } } -func createOrUpdateCostManagementExport(ctx context.Context, client *costmanagement.ExportsClient, metadata sdk.ResourceMetaData, id parse.CostManagementExportId, etag *string) error { - from, _ := time.Parse(time.RFC3339, metadata.ResourceData.Get("recurrence_period_start_date").(string)) - to, _ := time.Parse(time.RFC3339, metadata.ResourceData.Get("recurrence_period_end_date").(string)) - - status := costmanagement.Active +func createOrUpdateCostManagementExport(ctx context.Context, client *exports.ExportsClient, metadata sdk.ResourceMetaData, id exports.ScopedExportId, etag *string) error { + status := exports.StatusTypeActive if v := metadata.ResourceData.Get("active"); !v.(bool) { - status = costmanagement.Inactive + status = exports.StatusTypeInactive } deliveryInfo, err := expandExportDataStorageLocation(metadata.ResourceData.Get("export_data_storage_location").([]interface{})) @@ -258,29 +262,31 @@ func createOrUpdateCostManagementExport(ctx context.Context, client *costmanagem return fmt.Errorf("expanding `export_data_storage_location`: %+v", err) } - props := costmanagement.Export{ + format := exports.FormatTypeCsv + recurrenceType := exports.RecurrenceType(metadata.ResourceData.Get("recurrence_type").(string)) + props := exports.Export{ ETag: etag, - ExportProperties: &costmanagement.ExportProperties{ - Schedule: &costmanagement.ExportSchedule{ - Recurrence: costmanagement.RecurrenceType(metadata.ResourceData.Get("recurrence_type").(string)), - RecurrencePeriod: &costmanagement.ExportRecurrencePeriod{ - From: &date.Time{Time: from}, - To: &date.Time{Time: to}, + Properties: &exports.ExportProperties{ + Schedule: &exports.ExportSchedule{ + Recurrence: &recurrenceType, + RecurrencePeriod: &exports.ExportRecurrencePeriod{ + From: metadata.ResourceData.Get("recurrence_period_start_date").(string), + To: utils.String(metadata.ResourceData.Get("recurrence_period_end_date").(string)), }, - Status: status, + Status: &status, }, - DeliveryInfo: deliveryInfo, - Format: costmanagement.Csv, - Definition: expandExportDefinition(metadata.ResourceData.Get("export_data_options").([]interface{})), + DeliveryInfo: *deliveryInfo, + Format: &format, + Definition: *expandExportDefinition(metadata.ResourceData.Get("export_data_options").([]interface{})), }, } - _, err = client.CreateOrUpdate(ctx, id.Scope, id.Name, props) + _, err = client.CreateOrUpdate(ctx, id, props) return err } -func expandExportDataStorageLocation(input []interface{}) (*costmanagement.ExportDeliveryInfo, error) { +func expandExportDataStorageLocation(input []interface{}) (*exports.ExportDeliveryInfo, error) { if len(input) == 0 || input[0] == nil { return nil, nil } @@ -293,10 +299,10 @@ func expandExportDataStorageLocation(input []interface{}) (*costmanagement.Expor storageId := storageParse.NewStorageAccountID(containerId.SubscriptionId, containerId.ResourceGroup, containerId.StorageAccountName) - deliveryInfo := &costmanagement.ExportDeliveryInfo{ - Destination: &costmanagement.ExportDeliveryDestination{ - ResourceID: utils.String(storageId.ID()), - Container: utils.String(containerId.ContainerName), + deliveryInfo := &exports.ExportDeliveryInfo{ + Destination: exports.ExportDeliveryDestination{ + ResourceId: utils.String(storageId.ID()), + Container: containerId.ContainerName, RootFolderPath: utils.String(attrs["root_folder_path"].(string)), }, } @@ -304,22 +310,22 @@ func expandExportDataStorageLocation(input []interface{}) (*costmanagement.Expor return deliveryInfo, nil } -func expandExportDefinition(input []interface{}) *costmanagement.ExportDefinition { +func expandExportDefinition(input []interface{}) *exports.ExportDefinition { if len(input) == 0 || input[0] == nil { return nil } attrs := input[0].(map[string]interface{}) - definitionInfo := &costmanagement.ExportDefinition{ - Type: costmanagement.ExportType(attrs["type"].(string)), - Timeframe: costmanagement.TimeframeType(attrs["time_frame"].(string)), + definitionInfo := &exports.ExportDefinition{ + Type: exports.ExportType(attrs["type"].(string)), + Timeframe: exports.TimeframeType(attrs["time_frame"].(string)), } return definitionInfo } -func flattenExportDataStorageLocation(input *costmanagement.ExportDeliveryInfo) ([]interface{}, error) { - if input == nil || input.Destination == nil { +func flattenExportDataStorageLocation(input *exports.ExportDeliveryInfo) ([]interface{}, error) { + if input == nil { return []interface{}{}, nil } @@ -327,7 +333,7 @@ func flattenExportDataStorageLocation(input *costmanagement.ExportDeliveryInfo) var err error var storageAccountId *storageParse.StorageAccountId - if v := destination.ResourceID; v != nil { + if v := destination.ResourceId; v != nil { storageAccountId, err = storageParse.StorageAccountID(*v) if err != nil { return nil, err @@ -335,8 +341,8 @@ func flattenExportDataStorageLocation(input *costmanagement.ExportDeliveryInfo) } containerId := "" - if v := destination.Container; v != nil && storageAccountId != nil { - containerId = storageParse.NewStorageContainerResourceManagerID(storageAccountId.SubscriptionId, storageAccountId.ResourceGroup, storageAccountId.Name, "default", *v).ID() + if v := destination.Container; v != "" && storageAccountId != nil { + containerId = storageParse.NewStorageContainerResourceManagerID(storageAccountId.SubscriptionId, storageAccountId.ResourceGroup, storageAccountId.Name, "default", v).ID() } rootFolderPath := "" @@ -352,7 +358,7 @@ func flattenExportDataStorageLocation(input *costmanagement.ExportDeliveryInfo) }, nil } -func flattenExportDefinition(input *costmanagement.ExportDefinition) []interface{} { +func flattenExportDefinition(input *exports.ExportDefinition) []interface{} { if input == nil { return []interface{}{} } diff --git a/internal/services/costmanagement/export_resource_group_resource_test.go b/internal/services/costmanagement/export_resource_group_resource_test.go index ef412cef48f6..650a40b50852 100644 --- a/internal/services/costmanagement/export_resource_group_resource_test.go +++ b/internal/services/costmanagement/export_resource_group_resource_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" + "github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/costmanagement/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -79,17 +79,18 @@ func TestAccResourceGroupCostManagementExport_requiresImport(t *testing.T) { } func (t ResourceGroupCostManagementExport) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.CostManagementExportID(state.ID) + id, err := exports.ParseScopedExportID(state.ID) if err != nil { return nil, err } - resp, err := clients.CostManagement.ExportClient.Get(ctx, id.Scope, id.Name, "") + var opts exports.GetOperationOptions + resp, err := clients.CostManagement.ExportClient.Get(ctx, *id, opts) if err != nil { return nil, fmt.Errorf("retrieving (%s): %+v", *id, err) } - return utils.Bool(resp.ExportProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (ResourceGroupCostManagementExport) basic(data acceptance.TestData) string { diff --git a/internal/services/costmanagement/export_subscription_resource_test.go b/internal/services/costmanagement/export_subscription_resource_test.go index f4cd5e6460ca..905ab865b551 100644 --- a/internal/services/costmanagement/export_subscription_resource_test.go +++ b/internal/services/costmanagement/export_subscription_resource_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" + "github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/costmanagement/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -79,17 +79,18 @@ func TestAccSubscriptionCostManagementExport_requiresImport(t *testing.T) { } func (t SubscriptionCostManagementExport) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.CostManagementExportID(state.ID) + id, err := exports.ParseScopedExportID(state.ID) if err != nil { return nil, err } - resp, err := clients.CostManagement.ExportClient.Get(ctx, id.Scope, id.Name, "") + var opts exports.GetOperationOptions + resp, err := clients.CostManagement.ExportClient.Get(ctx, *id, opts) if err != nil { return nil, fmt.Errorf("retrieving (%s): %+v", *id, err) } - return utils.Bool(resp.ExportProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (SubscriptionCostManagementExport) basic(data acceptance.TestData) string { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/_meta.json deleted file mode 100644 index 9d744e74962b..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "e0f8b9ab0f5fe5e71b7429ebfea8a33c19ec9d8d", - "readme": "/_/azure-rest-api-specs/specification/cost-management/resource-manager/readme.md", - "tag": "package-2020-06", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/cost-management/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/alerts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/alerts.go deleted file mode 100644 index 38e55cab4324..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/alerts.go +++ /dev/null @@ -1,374 +0,0 @@ -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// AlertsClient is the client for the Alerts methods of the Costmanagement service. -type AlertsClient struct { - BaseClient -} - -// NewAlertsClient creates an instance of the AlertsClient client. -func NewAlertsClient(subscriptionID string) AlertsClient { - return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient { - return AlertsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Dismiss dismisses the specified alert -// Parameters: -// scope - the scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// alertID - alert ID -// parameters - parameters supplied to the Dismiss Alert operation. -func (client AlertsClient) Dismiss(ctx context.Context, scope string, alertID string, parameters DismissAlertPayload) (result Alert, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.Dismiss") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DismissPreparer(ctx, scope, alertID, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "Dismiss", nil, "Failure preparing request") - return - } - - resp, err := client.DismissSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "Dismiss", resp, "Failure sending request") - return - } - - result, err = client.DismissResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "Dismiss", resp, "Failure responding to request") - return - } - - return -} - -// DismissPreparer prepares the Dismiss request. -func (client AlertsClient) DismissPreparer(ctx context.Context, scope string, alertID string, parameters DismissAlertPayload) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "alertId": alertID, - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DismissSender sends the Dismiss request. The method will close the -// http.Response Body if it receives an error. -func (client AlertsClient) DismissSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// DismissResponder handles the response to the Dismiss request. The method always -// closes the http.Response Body. -func (client AlertsClient) DismissResponder(resp *http.Response) (result Alert, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets the alert for the scope by alert ID. -// Parameters: -// scope - the scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// alertID - alert ID -func (client AlertsClient) Get(ctx context.Context, scope string, alertID string) (result Alert, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, scope, alertID) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client AlertsClient) GetPreparer(ctx context.Context, scope string, alertID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "alertId": alertID, - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client AlertsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client AlertsClient) GetResponder(resp *http.Response) (result Alert, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists the alerts for scope defined. -// Parameters: -// scope - the scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -func (client AlertsClient) List(ctx context.Context, scope string) (result AlertsResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, scope) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client AlertsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/alerts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client AlertsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client AlertsClient) ListResponder(resp *http.Response) (result AlertsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListExternal lists the Alerts for external cloud provider type defined. -// Parameters: -// externalCloudProviderType - the external cloud provider type associated with dimension/query operations. -// This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated -// account. -// externalCloudProviderID - this can be '{externalSubscriptionId}' for linked account or -// '{externalBillingAccountId}' for consolidated account used with dimension/query operations. -func (client AlertsClient) ListExternal(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string) (result AlertsResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListExternal") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListExternalPreparer(ctx, externalCloudProviderType, externalCloudProviderID) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "ListExternal", nil, "Failure preparing request") - return - } - - resp, err := client.ListExternalSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "ListExternal", resp, "Failure sending request") - return - } - - result, err = client.ListExternalResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.AlertsClient", "ListExternal", resp, "Failure responding to request") - return - } - - return -} - -// ListExternalPreparer prepares the ListExternal request. -func (client AlertsClient) ListExternalPreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "externalCloudProviderId": autorest.Encode("path", externalCloudProviderID), - "externalCloudProviderType": autorest.Encode("path", externalCloudProviderType), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListExternalSender sends the ListExternal request. The method will close the -// http.Response Body if it receives an error. -func (client AlertsClient) ListExternalSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListExternalResponder handles the response to the ListExternal request. The method always -// closes the http.Response Body. -func (client AlertsClient) ListExternalResponder(resp *http.Response) (result AlertsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/client.go deleted file mode 100644 index b51618e01067..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/client.go +++ /dev/null @@ -1,41 +0,0 @@ -// Package costmanagement implements the Azure ARM Costmanagement service API version 2020-06-01. -// -// -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Costmanagement - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Costmanagement. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/dimensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/dimensions.go deleted file mode 100644 index 3d08677933fc..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/dimensions.go +++ /dev/null @@ -1,254 +0,0 @@ -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DimensionsClient is the client for the Dimensions methods of the Costmanagement service. -type DimensionsClient struct { - BaseClient -} - -// NewDimensionsClient creates an instance of the DimensionsClient client. -func NewDimensionsClient(subscriptionID string) DimensionsClient { - return NewDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDimensionsClientWithBaseURI(baseURI string, subscriptionID string) DimensionsClient { - return DimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ByExternalCloudProviderType lists the dimensions by the external cloud provider type. -// Parameters: -// externalCloudProviderType - the external cloud provider type associated with dimension/query operations. -// This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated -// account. -// externalCloudProviderID - this can be '{externalSubscriptionId}' for linked account or -// '{externalBillingAccountId}' for consolidated account used with dimension/query operations. -// filter - may be used to filter dimensions by properties/category, properties/usageStart, -// properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. -// expand - may be used to expand the properties/data within a dimension category. By default, data is not -// included when listing dimensions. -// skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response -// contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that -// specifies a starting point to use for subsequent calls. -// top - may be used to limit the number of results to the most recent N dimension data. -func (client DimensionsClient) ByExternalCloudProviderType(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, filter string, expand string, skiptoken string, top *int32) (result DimensionsListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DimensionsClient.ByExternalCloudProviderType") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: top, - Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("costmanagement.DimensionsClient", "ByExternalCloudProviderType", err.Error()) - } - - req, err := client.ByExternalCloudProviderTypePreparer(ctx, externalCloudProviderType, externalCloudProviderID, filter, expand, skiptoken, top) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.DimensionsClient", "ByExternalCloudProviderType", nil, "Failure preparing request") - return - } - - resp, err := client.ByExternalCloudProviderTypeSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.DimensionsClient", "ByExternalCloudProviderType", resp, "Failure sending request") - return - } - - result, err = client.ByExternalCloudProviderTypeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.DimensionsClient", "ByExternalCloudProviderType", resp, "Failure responding to request") - return - } - - return -} - -// ByExternalCloudProviderTypePreparer prepares the ByExternalCloudProviderType request. -func (client DimensionsClient) ByExternalCloudProviderTypePreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, filter string, expand string, skiptoken string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "externalCloudProviderId": autorest.Encode("path", externalCloudProviderID), - "externalCloudProviderType": autorest.Encode("path", externalCloudProviderType), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - if len(skiptoken) > 0 { - queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ByExternalCloudProviderTypeSender sends the ByExternalCloudProviderType request. The method will close the -// http.Response Body if it receives an error. -func (client DimensionsClient) ByExternalCloudProviderTypeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ByExternalCloudProviderTypeResponder handles the response to the ByExternalCloudProviderType request. The method always -// closes the http.Response Body. -func (client DimensionsClient) ByExternalCloudProviderTypeResponder(resp *http.Response) (result DimensionsListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists the dimensions by the defined scope. -// Parameters: -// scope - the scope associated with dimension operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// filter - may be used to filter dimensions by properties/category, properties/usageStart, -// properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. -// expand - may be used to expand the properties/data within a dimension category. By default, data is not -// included when listing dimensions. -// skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response -// contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that -// specifies a starting point to use for subsequent calls. -// top - may be used to limit the number of results to the most recent N dimension data. -func (client DimensionsClient) List(ctx context.Context, scope string, filter string, expand string, skiptoken string, top *int32) (result DimensionsListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DimensionsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: top, - Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("costmanagement.DimensionsClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx, scope, filter, expand, skiptoken, top) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.DimensionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.DimensionsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.DimensionsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client DimensionsClient) ListPreparer(ctx context.Context, scope string, filter string, expand string, skiptoken string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - if len(skiptoken) > 0 { - queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/dimensions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client DimensionsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client DimensionsClient) ListResponder(resp *http.Response) (result DimensionsListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/enums.go deleted file mode 100644 index 605588d2729e..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/enums.go +++ /dev/null @@ -1,546 +0,0 @@ -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// AccumulatedType enumerates the values for accumulated type. -type AccumulatedType string - -const ( - // False ... - False AccumulatedType = "false" - // True ... - True AccumulatedType = "true" -) - -// PossibleAccumulatedTypeValues returns an array of possible values for the AccumulatedType const type. -func PossibleAccumulatedTypeValues() []AccumulatedType { - return []AccumulatedType{False, True} -} - -// AlertCategory enumerates the values for alert category. -type AlertCategory string - -const ( - // Billing ... - Billing AlertCategory = "Billing" - // Cost ... - Cost AlertCategory = "Cost" - // System ... - System AlertCategory = "System" - // Usage ... - Usage AlertCategory = "Usage" -) - -// PossibleAlertCategoryValues returns an array of possible values for the AlertCategory const type. -func PossibleAlertCategoryValues() []AlertCategory { - return []AlertCategory{Billing, Cost, System, Usage} -} - -// AlertCriteria enumerates the values for alert criteria. -type AlertCriteria string - -const ( - // CostThresholdExceeded ... - CostThresholdExceeded AlertCriteria = "CostThresholdExceeded" - // CreditThresholdApproaching ... - CreditThresholdApproaching AlertCriteria = "CreditThresholdApproaching" - // CreditThresholdReached ... - CreditThresholdReached AlertCriteria = "CreditThresholdReached" - // CrossCloudCollectionError ... - CrossCloudCollectionError AlertCriteria = "CrossCloudCollectionError" - // CrossCloudNewDataAvailable ... - CrossCloudNewDataAvailable AlertCriteria = "CrossCloudNewDataAvailable" - // ForecastCostThresholdExceeded ... - ForecastCostThresholdExceeded AlertCriteria = "ForecastCostThresholdExceeded" - // ForecastUsageThresholdExceeded ... - ForecastUsageThresholdExceeded AlertCriteria = "ForecastUsageThresholdExceeded" - // GeneralThresholdError ... - GeneralThresholdError AlertCriteria = "GeneralThresholdError" - // InvoiceDueDateApproaching ... - InvoiceDueDateApproaching AlertCriteria = "InvoiceDueDateApproaching" - // InvoiceDueDateReached ... - InvoiceDueDateReached AlertCriteria = "InvoiceDueDateReached" - // MultiCurrency ... - MultiCurrency AlertCriteria = "MultiCurrency" - // QuotaThresholdApproaching ... - QuotaThresholdApproaching AlertCriteria = "QuotaThresholdApproaching" - // QuotaThresholdReached ... - QuotaThresholdReached AlertCriteria = "QuotaThresholdReached" - // UsageThresholdExceeded ... - UsageThresholdExceeded AlertCriteria = "UsageThresholdExceeded" -) - -// PossibleAlertCriteriaValues returns an array of possible values for the AlertCriteria const type. -func PossibleAlertCriteriaValues() []AlertCriteria { - return []AlertCriteria{CostThresholdExceeded, CreditThresholdApproaching, CreditThresholdReached, CrossCloudCollectionError, CrossCloudNewDataAvailable, ForecastCostThresholdExceeded, ForecastUsageThresholdExceeded, GeneralThresholdError, InvoiceDueDateApproaching, InvoiceDueDateReached, MultiCurrency, QuotaThresholdApproaching, QuotaThresholdReached, UsageThresholdExceeded} -} - -// AlertOperator enumerates the values for alert operator. -type AlertOperator string - -const ( - // EqualTo ... - EqualTo AlertOperator = "EqualTo" - // GreaterThan ... - GreaterThan AlertOperator = "GreaterThan" - // GreaterThanOrEqualTo ... - GreaterThanOrEqualTo AlertOperator = "GreaterThanOrEqualTo" - // LessThan ... - LessThan AlertOperator = "LessThan" - // LessThanOrEqualTo ... - LessThanOrEqualTo AlertOperator = "LessThanOrEqualTo" - // None ... - None AlertOperator = "None" -) - -// PossibleAlertOperatorValues returns an array of possible values for the AlertOperator const type. -func PossibleAlertOperatorValues() []AlertOperator { - return []AlertOperator{EqualTo, GreaterThan, GreaterThanOrEqualTo, LessThan, LessThanOrEqualTo, None} -} - -// AlertSource enumerates the values for alert source. -type AlertSource string - -const ( - // Preset ... - Preset AlertSource = "Preset" - // User ... - User AlertSource = "User" -) - -// PossibleAlertSourceValues returns an array of possible values for the AlertSource const type. -func PossibleAlertSourceValues() []AlertSource { - return []AlertSource{Preset, User} -} - -// AlertStatus enumerates the values for alert status. -type AlertStatus string - -const ( - // AlertStatusActive ... - AlertStatusActive AlertStatus = "Active" - // AlertStatusDismissed ... - AlertStatusDismissed AlertStatus = "Dismissed" - // AlertStatusNone ... - AlertStatusNone AlertStatus = "None" - // AlertStatusOverridden ... - AlertStatusOverridden AlertStatus = "Overridden" - // AlertStatusResolved ... - AlertStatusResolved AlertStatus = "Resolved" -) - -// PossibleAlertStatusValues returns an array of possible values for the AlertStatus const type. -func PossibleAlertStatusValues() []AlertStatus { - return []AlertStatus{AlertStatusActive, AlertStatusDismissed, AlertStatusNone, AlertStatusOverridden, AlertStatusResolved} -} - -// AlertTimeGrainType enumerates the values for alert time grain type. -type AlertTimeGrainType string - -const ( - // AlertTimeGrainTypeAnnually ... - AlertTimeGrainTypeAnnually AlertTimeGrainType = "Annually" - // AlertTimeGrainTypeBillingAnnual ... - AlertTimeGrainTypeBillingAnnual AlertTimeGrainType = "BillingAnnual" - // AlertTimeGrainTypeBillingMonth ... - AlertTimeGrainTypeBillingMonth AlertTimeGrainType = "BillingMonth" - // AlertTimeGrainTypeBillingQuarter ... - AlertTimeGrainTypeBillingQuarter AlertTimeGrainType = "BillingQuarter" - // AlertTimeGrainTypeMonthly ... - AlertTimeGrainTypeMonthly AlertTimeGrainType = "Monthly" - // AlertTimeGrainTypeNone ... - AlertTimeGrainTypeNone AlertTimeGrainType = "None" - // AlertTimeGrainTypeQuarterly ... - AlertTimeGrainTypeQuarterly AlertTimeGrainType = "Quarterly" -) - -// PossibleAlertTimeGrainTypeValues returns an array of possible values for the AlertTimeGrainType const type. -func PossibleAlertTimeGrainTypeValues() []AlertTimeGrainType { - return []AlertTimeGrainType{AlertTimeGrainTypeAnnually, AlertTimeGrainTypeBillingAnnual, AlertTimeGrainTypeBillingMonth, AlertTimeGrainTypeBillingQuarter, AlertTimeGrainTypeMonthly, AlertTimeGrainTypeNone, AlertTimeGrainTypeQuarterly} -} - -// AlertType enumerates the values for alert type. -type AlertType string - -const ( - // Budget ... - Budget AlertType = "Budget" - // BudgetForecast ... - BudgetForecast AlertType = "BudgetForecast" - // Credit ... - Credit AlertType = "Credit" - // General ... - General AlertType = "General" - // Invoice ... - Invoice AlertType = "Invoice" - // Quota ... - Quota AlertType = "Quota" - // XCloud ... - XCloud AlertType = "xCloud" -) - -// PossibleAlertTypeValues returns an array of possible values for the AlertType const type. -func PossibleAlertTypeValues() []AlertType { - return []AlertType{Budget, BudgetForecast, Credit, General, Invoice, Quota, XCloud} -} - -// ChartType enumerates the values for chart type. -type ChartType string - -const ( - // Area ... - Area ChartType = "Area" - // GroupedColumn ... - GroupedColumn ChartType = "GroupedColumn" - // Line ... - Line ChartType = "Line" - // StackedColumn ... - StackedColumn ChartType = "StackedColumn" - // Table ... - Table ChartType = "Table" -) - -// PossibleChartTypeValues returns an array of possible values for the ChartType const type. -func PossibleChartTypeValues() []ChartType { - return []ChartType{Area, GroupedColumn, Line, StackedColumn, Table} -} - -// Direction enumerates the values for direction. -type Direction string - -const ( - // Ascending ... - Ascending Direction = "Ascending" - // Descending ... - Descending Direction = "Descending" -) - -// PossibleDirectionValues returns an array of possible values for the Direction const type. -func PossibleDirectionValues() []Direction { - return []Direction{Ascending, Descending} -} - -// ExecutionStatus enumerates the values for execution status. -type ExecutionStatus string - -const ( - // Completed ... - Completed ExecutionStatus = "Completed" - // DataNotAvailable ... - DataNotAvailable ExecutionStatus = "DataNotAvailable" - // Failed ... - Failed ExecutionStatus = "Failed" - // InProgress ... - InProgress ExecutionStatus = "InProgress" - // NewDataNotAvailable ... - NewDataNotAvailable ExecutionStatus = "NewDataNotAvailable" - // Queued ... - Queued ExecutionStatus = "Queued" - // Timeout ... - Timeout ExecutionStatus = "Timeout" -) - -// PossibleExecutionStatusValues returns an array of possible values for the ExecutionStatus const type. -func PossibleExecutionStatusValues() []ExecutionStatus { - return []ExecutionStatus{Completed, DataNotAvailable, Failed, InProgress, NewDataNotAvailable, Queued, Timeout} -} - -// ExecutionType enumerates the values for execution type. -type ExecutionType string - -const ( - // OnDemand ... - OnDemand ExecutionType = "OnDemand" - // Scheduled ... - Scheduled ExecutionType = "Scheduled" -) - -// PossibleExecutionTypeValues returns an array of possible values for the ExecutionType const type. -func PossibleExecutionTypeValues() []ExecutionType { - return []ExecutionType{OnDemand, Scheduled} -} - -// ExportType enumerates the values for export type. -type ExportType string - -const ( - // ExportTypeActualCost ... - ExportTypeActualCost ExportType = "ActualCost" - // ExportTypeAmortizedCost ... - ExportTypeAmortizedCost ExportType = "AmortizedCost" - // ExportTypeUsage ... - ExportTypeUsage ExportType = "Usage" -) - -// PossibleExportTypeValues returns an array of possible values for the ExportType const type. -func PossibleExportTypeValues() []ExportType { - return []ExportType{ExportTypeActualCost, ExportTypeAmortizedCost, ExportTypeUsage} -} - -// ExternalCloudProviderType enumerates the values for external cloud provider type. -type ExternalCloudProviderType string - -const ( - // ExternalBillingAccounts ... - ExternalBillingAccounts ExternalCloudProviderType = "externalBillingAccounts" - // ExternalSubscriptions ... - ExternalSubscriptions ExternalCloudProviderType = "externalSubscriptions" -) - -// PossibleExternalCloudProviderTypeValues returns an array of possible values for the ExternalCloudProviderType const type. -func PossibleExternalCloudProviderTypeValues() []ExternalCloudProviderType { - return []ExternalCloudProviderType{ExternalBillingAccounts, ExternalSubscriptions} -} - -// ForecastTimeframeType enumerates the values for forecast timeframe type. -type ForecastTimeframeType string - -const ( - // BillingMonthToDate ... - BillingMonthToDate ForecastTimeframeType = "BillingMonthToDate" - // Custom ... - Custom ForecastTimeframeType = "Custom" - // MonthToDate ... - MonthToDate ForecastTimeframeType = "MonthToDate" - // TheLastBillingMonth ... - TheLastBillingMonth ForecastTimeframeType = "TheLastBillingMonth" - // TheLastMonth ... - TheLastMonth ForecastTimeframeType = "TheLastMonth" - // WeekToDate ... - WeekToDate ForecastTimeframeType = "WeekToDate" -) - -// PossibleForecastTimeframeTypeValues returns an array of possible values for the ForecastTimeframeType const type. -func PossibleForecastTimeframeTypeValues() []ForecastTimeframeType { - return []ForecastTimeframeType{BillingMonthToDate, Custom, MonthToDate, TheLastBillingMonth, TheLastMonth, WeekToDate} -} - -// ForecastType enumerates the values for forecast type. -type ForecastType string - -const ( - // ForecastTypeActualCost ... - ForecastTypeActualCost ForecastType = "ActualCost" - // ForecastTypeAmortizedCost ... - ForecastTypeAmortizedCost ForecastType = "AmortizedCost" - // ForecastTypeUsage ... - ForecastTypeUsage ForecastType = "Usage" -) - -// PossibleForecastTypeValues returns an array of possible values for the ForecastType const type. -func PossibleForecastTypeValues() []ForecastType { - return []ForecastType{ForecastTypeActualCost, ForecastTypeAmortizedCost, ForecastTypeUsage} -} - -// FormatType enumerates the values for format type. -type FormatType string - -const ( - // Csv ... - Csv FormatType = "Csv" -) - -// PossibleFormatTypeValues returns an array of possible values for the FormatType const type. -func PossibleFormatTypeValues() []FormatType { - return []FormatType{Csv} -} - -// GranularityType enumerates the values for granularity type. -type GranularityType string - -const ( - // Daily ... - Daily GranularityType = "Daily" -) - -// PossibleGranularityTypeValues returns an array of possible values for the GranularityType const type. -func PossibleGranularityTypeValues() []GranularityType { - return []GranularityType{Daily} -} - -// KpiTypeType enumerates the values for kpi type type. -type KpiTypeType string - -const ( - // KpiTypeTypeBudget ... - KpiTypeTypeBudget KpiTypeType = "Budget" - // KpiTypeTypeForecast ... - KpiTypeTypeForecast KpiTypeType = "Forecast" -) - -// PossibleKpiTypeTypeValues returns an array of possible values for the KpiTypeType const type. -func PossibleKpiTypeTypeValues() []KpiTypeType { - return []KpiTypeType{KpiTypeTypeBudget, KpiTypeTypeForecast} -} - -// MetricType enumerates the values for metric type. -type MetricType string - -const ( - // ActualCost ... - ActualCost MetricType = "ActualCost" - // AHUB ... - AHUB MetricType = "AHUB" - // AmortizedCost ... - AmortizedCost MetricType = "AmortizedCost" -) - -// PossibleMetricTypeValues returns an array of possible values for the MetricType const type. -func PossibleMetricTypeValues() []MetricType { - return []MetricType{ActualCost, AHUB, AmortizedCost} -} - -// OperatorType enumerates the values for operator type. -type OperatorType string - -const ( - // Contains ... - Contains OperatorType = "Contains" - // In ... - In OperatorType = "In" -) - -// PossibleOperatorTypeValues returns an array of possible values for the OperatorType const type. -func PossibleOperatorTypeValues() []OperatorType { - return []OperatorType{Contains, In} -} - -// PivotTypeType enumerates the values for pivot type type. -type PivotTypeType string - -const ( - // PivotTypeTypeDimension ... - PivotTypeTypeDimension PivotTypeType = "Dimension" - // PivotTypeTypeTagKey ... - PivotTypeTypeTagKey PivotTypeType = "TagKey" -) - -// PossiblePivotTypeTypeValues returns an array of possible values for the PivotTypeType const type. -func PossiblePivotTypeTypeValues() []PivotTypeType { - return []PivotTypeType{PivotTypeTypeDimension, PivotTypeTypeTagKey} -} - -// QueryColumnType enumerates the values for query column type. -type QueryColumnType string - -const ( - // QueryColumnTypeDimension ... - QueryColumnTypeDimension QueryColumnType = "Dimension" - // QueryColumnTypeTag ... - QueryColumnTypeTag QueryColumnType = "Tag" -) - -// PossibleQueryColumnTypeValues returns an array of possible values for the QueryColumnType const type. -func PossibleQueryColumnTypeValues() []QueryColumnType { - return []QueryColumnType{QueryColumnTypeDimension, QueryColumnTypeTag} -} - -// RecurrenceType enumerates the values for recurrence type. -type RecurrenceType string - -const ( - // RecurrenceTypeAnnually ... - RecurrenceTypeAnnually RecurrenceType = "Annually" - // RecurrenceTypeDaily ... - RecurrenceTypeDaily RecurrenceType = "Daily" - // RecurrenceTypeMonthly ... - RecurrenceTypeMonthly RecurrenceType = "Monthly" - // RecurrenceTypeWeekly ... - RecurrenceTypeWeekly RecurrenceType = "Weekly" -) - -// PossibleRecurrenceTypeValues returns an array of possible values for the RecurrenceType const type. -func PossibleRecurrenceTypeValues() []RecurrenceType { - return []RecurrenceType{RecurrenceTypeAnnually, RecurrenceTypeDaily, RecurrenceTypeMonthly, RecurrenceTypeWeekly} -} - -// ReportConfigColumnType enumerates the values for report config column type. -type ReportConfigColumnType string - -const ( - // ReportConfigColumnTypeDimension ... - ReportConfigColumnTypeDimension ReportConfigColumnType = "Dimension" - // ReportConfigColumnTypeTag ... - ReportConfigColumnTypeTag ReportConfigColumnType = "Tag" -) - -// PossibleReportConfigColumnTypeValues returns an array of possible values for the ReportConfigColumnType const type. -func PossibleReportConfigColumnTypeValues() []ReportConfigColumnType { - return []ReportConfigColumnType{ReportConfigColumnTypeDimension, ReportConfigColumnTypeTag} -} - -// ReportGranularityType enumerates the values for report granularity type. -type ReportGranularityType string - -const ( - // ReportGranularityTypeDaily ... - ReportGranularityTypeDaily ReportGranularityType = "Daily" - // ReportGranularityTypeMonthly ... - ReportGranularityTypeMonthly ReportGranularityType = "Monthly" -) - -// PossibleReportGranularityTypeValues returns an array of possible values for the ReportGranularityType const type. -func PossibleReportGranularityTypeValues() []ReportGranularityType { - return []ReportGranularityType{ReportGranularityTypeDaily, ReportGranularityTypeMonthly} -} - -// ReportTimeframeType enumerates the values for report timeframe type. -type ReportTimeframeType string - -const ( - // ReportTimeframeTypeCustom ... - ReportTimeframeTypeCustom ReportTimeframeType = "Custom" - // ReportTimeframeTypeMonthToDate ... - ReportTimeframeTypeMonthToDate ReportTimeframeType = "MonthToDate" - // ReportTimeframeTypeWeekToDate ... - ReportTimeframeTypeWeekToDate ReportTimeframeType = "WeekToDate" - // ReportTimeframeTypeYearToDate ... - ReportTimeframeTypeYearToDate ReportTimeframeType = "YearToDate" -) - -// PossibleReportTimeframeTypeValues returns an array of possible values for the ReportTimeframeType const type. -func PossibleReportTimeframeTypeValues() []ReportTimeframeType { - return []ReportTimeframeType{ReportTimeframeTypeCustom, ReportTimeframeTypeMonthToDate, ReportTimeframeTypeWeekToDate, ReportTimeframeTypeYearToDate} -} - -// StatusType enumerates the values for status type. -type StatusType string - -const ( - // Active ... - Active StatusType = "Active" - // Inactive ... - Inactive StatusType = "Inactive" -) - -// PossibleStatusTypeValues returns an array of possible values for the StatusType const type. -func PossibleStatusTypeValues() []StatusType { - return []StatusType{Active, Inactive} -} - -// TimeframeType enumerates the values for timeframe type. -type TimeframeType string - -const ( - // TimeframeTypeBillingMonthToDate ... - TimeframeTypeBillingMonthToDate TimeframeType = "BillingMonthToDate" - // TimeframeTypeCustom ... - TimeframeTypeCustom TimeframeType = "Custom" - // TimeframeTypeMonthToDate ... - TimeframeTypeMonthToDate TimeframeType = "MonthToDate" - // TimeframeTypeTheLastBillingMonth ... - TimeframeTypeTheLastBillingMonth TimeframeType = "TheLastBillingMonth" - // TimeframeTypeTheLastMonth ... - TimeframeTypeTheLastMonth TimeframeType = "TheLastMonth" - // TimeframeTypeWeekToDate ... - TimeframeTypeWeekToDate TimeframeType = "WeekToDate" -) - -// PossibleTimeframeTypeValues returns an array of possible values for the TimeframeType const type. -func PossibleTimeframeTypeValues() []TimeframeType { - return []TimeframeType{TimeframeTypeBillingMonthToDate, TimeframeTypeCustom, TimeframeTypeMonthToDate, TimeframeTypeTheLastBillingMonth, TimeframeTypeTheLastMonth, TimeframeTypeWeekToDate} -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/exports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/exports.go deleted file mode 100644 index 10febf8574d7..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/exports.go +++ /dev/null @@ -1,581 +0,0 @@ -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExportsClient is the client for the Exports methods of the Costmanagement service. -type ExportsClient struct { - BaseClient -} - -// NewExportsClient creates an instance of the ExportsClient client. -func NewExportsClient(subscriptionID string) ExportsClient { - return NewExportsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExportsClientWithBaseURI creates an instance of the ExportsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewExportsClientWithBaseURI(baseURI string, subscriptionID string) ExportsClient { - return ExportsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate the operation to create or update a export. Update operation requires latest eTag to be set in the -// request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. -// Parameters: -// scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// exportName - export Name. -// parameters - parameters supplied to the CreateOrUpdate Export operation. -func (client ExportsClient) CreateOrUpdate(ctx context.Context, scope string, exportName string, parameters Export) (result Export, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExportsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExportProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExportProperties.Schedule", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExportProperties.Schedule.RecurrencePeriod", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExportProperties.Schedule.RecurrencePeriod.From", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}}); err != nil { - return result, validation.NewError("costmanagement.ExportsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, scope, exportName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExportsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, exportName string, parameters Export) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "exportName": autorest.Encode("path", exportName), - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ExportsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExportsClient) CreateOrUpdateResponder(resp *http.Response) (result Export, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete the operation to delete a export. -// Parameters: -// scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// exportName - export Name. -func (client ExportsClient) Delete(ctx context.Context, scope string, exportName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExportsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, scope, exportName) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ExportsClient) DeletePreparer(ctx context.Context, scope string, exportName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "exportName": autorest.Encode("path", exportName), - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ExportsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ExportsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Execute the operation to execute an export. -// Parameters: -// scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// exportName - export Name. -func (client ExportsClient) Execute(ctx context.Context, scope string, exportName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExportsClient.Execute") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ExecutePreparer(ctx, scope, exportName) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "Execute", nil, "Failure preparing request") - return - } - - resp, err := client.ExecuteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "Execute", resp, "Failure sending request") - return - } - - result, err = client.ExecuteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "Execute", resp, "Failure responding to request") - return - } - - return -} - -// ExecutePreparer prepares the Execute request. -func (client ExportsClient) ExecutePreparer(ctx context.Context, scope string, exportName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "exportName": autorest.Encode("path", exportName), - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ExecuteSender sends the Execute request. The method will close the -// http.Response Body if it receives an error. -func (client ExportsClient) ExecuteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ExecuteResponder handles the response to the Execute request. The method always -// closes the http.Response Body. -func (client ExportsClient) ExecuteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get the operation to get the export for the defined scope by export name. -// Parameters: -// scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// exportName - export Name. -// expand - may be used to expand the properties within an export. Currently only 'runHistory' is supported and -// will return information for the last 10 executions of the export. -func (client ExportsClient) Get(ctx context.Context, scope string, exportName string, expand string) (result Export, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExportsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, scope, exportName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExportsClient) GetPreparer(ctx context.Context, scope string, exportName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "exportName": autorest.Encode("path", exportName), - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ExportsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ExportsClient) GetResponder(resp *http.Response) (result Export, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetExecutionHistory the operation to get the execution history of an export for the defined scope and export name. -// Parameters: -// scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// exportName - export Name. -func (client ExportsClient) GetExecutionHistory(ctx context.Context, scope string, exportName string) (result ExportExecutionListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExportsClient.GetExecutionHistory") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetExecutionHistoryPreparer(ctx, scope, exportName) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "GetExecutionHistory", nil, "Failure preparing request") - return - } - - resp, err := client.GetExecutionHistorySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "GetExecutionHistory", resp, "Failure sending request") - return - } - - result, err = client.GetExecutionHistoryResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "GetExecutionHistory", resp, "Failure responding to request") - return - } - - return -} - -// GetExecutionHistoryPreparer prepares the GetExecutionHistory request. -func (client ExportsClient) GetExecutionHistoryPreparer(ctx context.Context, scope string, exportName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "exportName": autorest.Encode("path", exportName), - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetExecutionHistorySender sends the GetExecutionHistory request. The method will close the -// http.Response Body if it receives an error. -func (client ExportsClient) GetExecutionHistorySender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetExecutionHistoryResponder handles the response to the GetExecutionHistory request. The method always -// closes the http.Response Body. -func (client ExportsClient) GetExecutionHistoryResponder(resp *http.Response) (result ExportExecutionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List the operation to list all exports at the given scope. -// Parameters: -// scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// expand - may be used to expand the properties within an export. Currently only 'runHistory' is supported and -// will return information for the last execution of each export. -func (client ExportsClient) List(ctx context.Context, scope string, expand string) (result ExportListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExportsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, scope, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ExportsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ExportsClient) ListPreparer(ctx context.Context, scope string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/exports", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client ExportsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client ExportsClient) ListResponder(resp *http.Response) (result ExportListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/forecast.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/forecast.go deleted file mode 100644 index fac797fa2654..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/forecast.go +++ /dev/null @@ -1,274 +0,0 @@ -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ForecastClient is the client for the Forecast methods of the Costmanagement service. -type ForecastClient struct { - BaseClient -} - -// NewForecastClient creates an instance of the ForecastClient client. -func NewForecastClient(subscriptionID string) ForecastClient { - return NewForecastClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewForecastClientWithBaseURI creates an instance of the ForecastClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewForecastClientWithBaseURI(baseURI string, subscriptionID string) ForecastClient { - return ForecastClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ExternalCloudProviderUsage lists the forecast charges for external cloud provider type defined. -// Parameters: -// externalCloudProviderType - the external cloud provider type associated with dimension/query operations. -// This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated -// account. -// externalCloudProviderID - this can be '{externalSubscriptionId}' for linked account or -// '{externalBillingAccountId}' for consolidated account used with dimension/query operations. -// parameters - parameters supplied to the CreateOrUpdate Forecast Config operation. -// filter - may be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or -// properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support -// 'ne', 'or', or 'not'. -func (client ForecastClient) ExternalCloudProviderUsage(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters ForecastDefinition, filter string) (result QueryResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ForecastClient.ExternalCloudProviderUsage") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TimePeriod", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.TimePeriod.From", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TimePeriod.To", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.Dataset", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.And", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.And", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter.Or", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Or", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter.Not", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Dimension.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension.Operator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Dimension.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - {Target: "parameters.Dataset.Filter.Tag", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Tag.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Tag.Operator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Tag.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Tag.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("costmanagement.ForecastClient", "ExternalCloudProviderUsage", err.Error()) - } - - req, err := client.ExternalCloudProviderUsagePreparer(ctx, externalCloudProviderType, externalCloudProviderID, parameters, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ForecastClient", "ExternalCloudProviderUsage", nil, "Failure preparing request") - return - } - - resp, err := client.ExternalCloudProviderUsageSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ForecastClient", "ExternalCloudProviderUsage", resp, "Failure sending request") - return - } - - result, err = client.ExternalCloudProviderUsageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ForecastClient", "ExternalCloudProviderUsage", resp, "Failure responding to request") - return - } - - return -} - -// ExternalCloudProviderUsagePreparer prepares the ExternalCloudProviderUsage request. -func (client ForecastClient) ExternalCloudProviderUsagePreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters ForecastDefinition, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "externalCloudProviderId": autorest.Encode("path", externalCloudProviderID), - "externalCloudProviderType": autorest.Encode("path", externalCloudProviderType), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ExternalCloudProviderUsageSender sends the ExternalCloudProviderUsage request. The method will close the -// http.Response Body if it receives an error. -func (client ForecastClient) ExternalCloudProviderUsageSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ExternalCloudProviderUsageResponder handles the response to the ExternalCloudProviderUsage request. The method always -// closes the http.Response Body. -func (client ForecastClient) ExternalCloudProviderUsageResponder(resp *http.Response) (result QueryResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Usage lists the forecast charges for scope defined. -// Parameters: -// scope - the scope associated with forecast operations. This includes '/subscriptions/{subscriptionId}/' for -// subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// parameters - parameters supplied to the CreateOrUpdate Forecast Config operation. -// filter - may be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or -// properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support -// 'ne', 'or', or 'not'. -func (client ForecastClient) Usage(ctx context.Context, scope string, parameters ForecastDefinition, filter string) (result QueryResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ForecastClient.Usage") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TimePeriod", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.TimePeriod.From", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TimePeriod.To", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.Dataset", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.And", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.And", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter.Or", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Or", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter.Not", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Dimension.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension.Operator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Dimension.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - {Target: "parameters.Dataset.Filter.Tag", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Tag.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Tag.Operator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Tag.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Tag.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("costmanagement.ForecastClient", "Usage", err.Error()) - } - - req, err := client.UsagePreparer(ctx, scope, parameters, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ForecastClient", "Usage", nil, "Failure preparing request") - return - } - - resp, err := client.UsageSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ForecastClient", "Usage", resp, "Failure sending request") - return - } - - result, err = client.UsageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ForecastClient", "Usage", resp, "Failure responding to request") - return - } - - return -} - -// UsagePreparer prepares the Usage request. -func (client ForecastClient) UsagePreparer(ctx context.Context, scope string, parameters ForecastDefinition, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/forecast", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UsageSender sends the Usage request. The method will close the -// http.Response Body if it receives an error. -func (client ForecastClient) UsageSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// UsageResponder handles the response to the Usage request. The method always -// closes the http.Response Body. -func (client ForecastClient) UsageResponder(resp *http.Response) (result QueryResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/models.go deleted file mode 100644 index c7d565ccb065..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/models.go +++ /dev/null @@ -1,1773 +0,0 @@ -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "github.com/shopspring/decimal" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement" - -// Alert an individual alert. -type Alert struct { - autorest.Response `json:"-"` - *AlertProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Tags - READ-ONLY; Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Alert. -func (a Alert) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if a.AlertProperties != nil { - objectMap["properties"] = a.AlertProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Alert struct. -func (a *Alert) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var alertProperties AlertProperties - err = json.Unmarshal(*v, &alertProperties) - if err != nil { - return err - } - a.AlertProperties = &alertProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - a.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - a.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - a.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - a.Tags = tags - } - } - } - - return nil -} - -// AlertProperties ... -type AlertProperties struct { - // Definition - defines the type of alert - Definition *AlertPropertiesDefinition `json:"definition,omitempty"` - // Description - Alert description - Description *string `json:"description,omitempty"` - // Source - Source of alert. Possible values include: 'Preset', 'User' - Source AlertSource `json:"source,omitempty"` - // Details - Alert details - Details *AlertPropertiesDetails `json:"details,omitempty"` - // CostEntityID - related budget - CostEntityID *string `json:"costEntityId,omitempty"` - // Status - alert status. Possible values include: 'AlertStatusNone', 'AlertStatusActive', 'AlertStatusOverridden', 'AlertStatusResolved', 'AlertStatusDismissed' - Status AlertStatus `json:"status,omitempty"` - // CreationTime - dateTime in which alert was created - CreationTime *string `json:"creationTime,omitempty"` - // CloseTime - dateTime in which alert was closed - CloseTime *string `json:"closeTime,omitempty"` - // ModificationTime - dateTime in which alert was last modified - ModificationTime *string `json:"modificationTime,omitempty"` - StatusModificationUserName *string `json:"statusModificationUserName,omitempty"` - // StatusModificationTime - dateTime in which the alert status was last modified - StatusModificationTime *string `json:"statusModificationTime,omitempty"` -} - -// AlertPropertiesDefinition defines the type of alert -type AlertPropertiesDefinition struct { - // Type - type of alert. Possible values include: 'Budget', 'Invoice', 'Credit', 'Quota', 'General', 'XCloud', 'BudgetForecast' - Type AlertType `json:"type,omitempty"` - // Category - Alert category. Possible values include: 'Cost', 'Usage', 'Billing', 'System' - Category AlertCategory `json:"category,omitempty"` - // Criteria - Criteria that triggered alert. Possible values include: 'CostThresholdExceeded', 'UsageThresholdExceeded', 'CreditThresholdApproaching', 'CreditThresholdReached', 'QuotaThresholdApproaching', 'QuotaThresholdReached', 'MultiCurrency', 'ForecastCostThresholdExceeded', 'ForecastUsageThresholdExceeded', 'InvoiceDueDateApproaching', 'InvoiceDueDateReached', 'CrossCloudNewDataAvailable', 'CrossCloudCollectionError', 'GeneralThresholdError' - Criteria AlertCriteria `json:"criteria,omitempty"` -} - -// AlertPropertiesDetails alert details -type AlertPropertiesDetails struct { - // TimeGrainType - Type of timegrain cadence. Possible values include: 'AlertTimeGrainTypeNone', 'AlertTimeGrainTypeMonthly', 'AlertTimeGrainTypeQuarterly', 'AlertTimeGrainTypeAnnually', 'AlertTimeGrainTypeBillingMonth', 'AlertTimeGrainTypeBillingQuarter', 'AlertTimeGrainTypeBillingAnnual' - TimeGrainType AlertTimeGrainType `json:"timeGrainType,omitempty"` - // PeriodStartDate - datetime of periodStartDate - PeriodStartDate *string `json:"periodStartDate,omitempty"` - // TriggeredBy - notificationId that triggered this alert - TriggeredBy *string `json:"triggeredBy,omitempty"` - // ResourceGroupFilter - array of resourceGroups to filter by - ResourceGroupFilter *[]interface{} `json:"resourceGroupFilter,omitempty"` - // ResourceFilter - array of resources to filter by - ResourceFilter *[]interface{} `json:"resourceFilter,omitempty"` - // MeterFilter - array of meters to filter by - MeterFilter *[]interface{} `json:"meterFilter,omitempty"` - // TagFilter - tags to filter by - TagFilter interface{} `json:"tagFilter,omitempty"` - // Threshold - notification threshold percentage as a decimal which activated this alert - Threshold *decimal.Decimal `json:"threshold,omitempty"` - // Operator - operator used to compare currentSpend with amount. Possible values include: 'None', 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo', 'LessThan', 'LessThanOrEqualTo' - Operator AlertOperator `json:"operator,omitempty"` - // Amount - budget threshold amount - Amount *decimal.Decimal `json:"amount,omitempty"` - // Unit - unit of currency being used - Unit *string `json:"unit,omitempty"` - // CurrentSpend - current spend - CurrentSpend *decimal.Decimal `json:"currentSpend,omitempty"` - // ContactEmails - list of emails to contact - ContactEmails *[]string `json:"contactEmails,omitempty"` - // ContactGroups - list of action groups to broadcast to - ContactGroups *[]string `json:"contactGroups,omitempty"` - // ContactRoles - list of contact roles - ContactRoles *[]string `json:"contactRoles,omitempty"` - // OverridingAlert - overriding alert - OverridingAlert *string `json:"overridingAlert,omitempty"` -} - -// AlertsResult result of alerts. -type AlertsResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of alerts. - Value *[]Alert `json:"value,omitempty"` - // NextLink - READ-ONLY; URL to get the next set of alerts results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for AlertsResult. -func (ar AlertsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// CommonExportProperties the common properties of the export. -type CommonExportProperties struct { - // Format - The format of the export being delivered. Currently only 'Csv' is supported. Possible values include: 'Csv' - Format FormatType `json:"format,omitempty"` - // DeliveryInfo - Has delivery information for the export. - DeliveryInfo *ExportDeliveryInfo `json:"deliveryInfo,omitempty"` - // Definition - Has the definition for the export. - Definition *ExportDefinition `json:"definition,omitempty"` - // RunHistory - If requested, has the most recent execution history for the export. - RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"` - // NextRunTimeEstimate - READ-ONLY; If the export has an active schedule, provides an estimate of the next execution time. - NextRunTimeEstimate *date.Time `json:"nextRunTimeEstimate,omitempty"` -} - -// MarshalJSON is the custom marshaler for CommonExportProperties. -func (cep CommonExportProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cep.Format != "" { - objectMap["format"] = cep.Format - } - if cep.DeliveryInfo != nil { - objectMap["deliveryInfo"] = cep.DeliveryInfo - } - if cep.Definition != nil { - objectMap["definition"] = cep.Definition - } - if cep.RunHistory != nil { - objectMap["runHistory"] = cep.RunHistory - } - return json.Marshal(objectMap) -} - -// Dimension ... -type Dimension struct { - *DimensionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Tags - READ-ONLY; Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Dimension. -func (d Dimension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if d.DimensionProperties != nil { - objectMap["properties"] = d.DimensionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Dimension struct. -func (d *Dimension) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var dimensionProperties DimensionProperties - err = json.Unmarshal(*v, &dimensionProperties) - if err != nil { - return err - } - d.DimensionProperties = &dimensionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - d.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - d.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - d.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - d.Tags = tags - } - } - } - - return nil -} - -// DimensionProperties ... -type DimensionProperties struct { - // Description - READ-ONLY; Dimension description. - Description *string `json:"description,omitempty"` - // FilterEnabled - READ-ONLY; Filter enabled. - FilterEnabled *bool `json:"filterEnabled,omitempty"` - // GroupingEnabled - READ-ONLY; Grouping enabled. - GroupingEnabled *bool `json:"groupingEnabled,omitempty"` - Data *[]string `json:"data,omitempty"` - // Total - READ-ONLY; Total number of data for the dimension. - Total *int32 `json:"total,omitempty"` - // Category - READ-ONLY; Dimension category. - Category *string `json:"category,omitempty"` - // UsageStart - READ-ONLY; Usage start. - UsageStart *date.Time `json:"usageStart,omitempty"` - // UsageEnd - READ-ONLY; Usage end. - UsageEnd *date.Time `json:"usageEnd,omitempty"` - // NextLink - READ-ONLY; The link (url) to the next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for DimensionProperties. -func (dp DimensionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dp.Data != nil { - objectMap["data"] = dp.Data - } - return json.Marshal(objectMap) -} - -// DimensionsListResult result of listing dimensions. It contains a list of available dimensions. -type DimensionsListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of dimensions. - Value *[]Dimension `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for DimensionsListResult. -func (dlr DimensionsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DismissAlertPayload the request payload to update an alert -type DismissAlertPayload struct { - *AlertProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for DismissAlertPayload. -func (dap DismissAlertPayload) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dap.AlertProperties != nil { - objectMap["properties"] = dap.AlertProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DismissAlertPayload struct. -func (dap *DismissAlertPayload) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var alertProperties AlertProperties - err = json.Unmarshal(*v, &alertProperties) - if err != nil { - return err - } - dap.AlertProperties = &alertProperties - } - } - } - - return nil -} - -// ErrorDetails the details of the error. -type ErrorDetails struct { - // Code - READ-ONLY; Error code. - Code *string `json:"code,omitempty"` - // Message - READ-ONLY; Error message indicating why the operation failed. - Message *string `json:"message,omitempty"` -} - -// MarshalJSON is the custom marshaler for ErrorDetails. -func (ed ErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ErrorResponse error response indicates that the service is not able to process the incoming request. The -// reason is provided in the error message. -// -// Some Error responses: -// -// * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the -// "x-ms-ratelimit-microsoft.consumption-retry-after" header. -// -// * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time -// specified in the "Retry-After" header. -type ErrorResponse struct { - // Error - The details of the error. - Error *ErrorDetails `json:"error,omitempty"` -} - -// Export an export resource. -type Export struct { - autorest.Response `json:"-"` - *ExportProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. - ETag *string `json:"eTag,omitempty"` -} - -// MarshalJSON is the custom marshaler for Export. -func (e Export) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if e.ExportProperties != nil { - objectMap["properties"] = e.ExportProperties - } - if e.ETag != nil { - objectMap["eTag"] = e.ETag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Export struct. -func (e *Export) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var exportProperties ExportProperties - err = json.Unmarshal(*v, &exportProperties) - if err != nil { - return err - } - e.ExportProperties = &exportProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - e.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - e.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - e.Type = &typeVar - } - case "eTag": - if v != nil { - var eTag string - err = json.Unmarshal(*v, &eTag) - if err != nil { - return err - } - e.ETag = &eTag - } - } - } - - return nil -} - -// ExportDataset the definition for data in the export. -type ExportDataset struct { - // Granularity - The granularity of rows in the export. Currently only 'Daily' is supported. Possible values include: 'Daily' - Granularity GranularityType `json:"granularity,omitempty"` - // Configuration - The export dataset configuration. - Configuration *ExportDatasetConfiguration `json:"configuration,omitempty"` -} - -// ExportDatasetConfiguration the export dataset configuration. Allows columns to be selected for the -// export. If not provided then the export will include all available columns. -type ExportDatasetConfiguration struct { - // Columns - Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples). - Columns *[]string `json:"columns,omitempty"` -} - -// ExportDefinition the definition of an export. -type ExportDefinition struct { - // Type - The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations. Possible values include: 'ExportTypeUsage', 'ExportTypeActualCost', 'ExportTypeAmortizedCost' - Type ExportType `json:"type,omitempty"` - // Timeframe - The time frame for pulling data for the export. If custom, then a specific time period must be provided. Possible values include: 'TimeframeTypeMonthToDate', 'TimeframeTypeBillingMonthToDate', 'TimeframeTypeTheLastMonth', 'TimeframeTypeTheLastBillingMonth', 'TimeframeTypeWeekToDate', 'TimeframeTypeCustom' - Timeframe TimeframeType `json:"timeframe,omitempty"` - // TimePeriod - Has time period for pulling data for the export. - TimePeriod *ExportTimePeriod `json:"timePeriod,omitempty"` - // DataSet - The definition for data in the export. - DataSet *ExportDataset `json:"dataSet,omitempty"` -} - -// ExportDeliveryDestination the destination information for the delivery of the export. To allow access to -// a storage account, you must register the account's subscription with the Microsoft.CostManagementExports -// resource provider. This is required once per subscription. When creating an export in the Azure portal, -// it is done automatically, however API users need to register the subscription. For more information see -// https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services . -type ExportDeliveryDestination struct { - // ResourceID - The resource id of the storage account where exports will be delivered. - ResourceID *string `json:"resourceId,omitempty"` - // Container - The name of the container where exports will be uploaded. - Container *string `json:"container,omitempty"` - // RootFolderPath - The name of the directory where exports will be uploaded. - RootFolderPath *string `json:"rootFolderPath,omitempty"` -} - -// ExportDeliveryInfo the delivery information associated with a export. -type ExportDeliveryInfo struct { - // Destination - Has destination for the export being delivered. - Destination *ExportDeliveryDestination `json:"destination,omitempty"` -} - -// ExportExecution an export execution. -type ExportExecution struct { - *ExportExecutionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. - ETag *string `json:"eTag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExportExecution. -func (ee ExportExecution) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ee.ExportExecutionProperties != nil { - objectMap["properties"] = ee.ExportExecutionProperties - } - if ee.ETag != nil { - objectMap["eTag"] = ee.ETag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExportExecution struct. -func (ee *ExportExecution) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var exportExecutionProperties ExportExecutionProperties - err = json.Unmarshal(*v, &exportExecutionProperties) - if err != nil { - return err - } - ee.ExportExecutionProperties = &exportExecutionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ee.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ee.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ee.Type = &typeVar - } - case "eTag": - if v != nil { - var eTag string - err = json.Unmarshal(*v, &eTag) - if err != nil { - return err - } - ee.ETag = &eTag - } - } - } - - return nil -} - -// ExportExecutionListResult result of listing the execution history of an export. -type ExportExecutionListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; A list of export executions. - Value *[]ExportExecution `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExportExecutionListResult. -func (eelr ExportExecutionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ExportExecutionProperties the properties of the export execution. -type ExportExecutionProperties struct { - // ExecutionType - The type of the export execution. Possible values include: 'OnDemand', 'Scheduled' - ExecutionType ExecutionType `json:"executionType,omitempty"` - // Status - The last known status of the export execution. Possible values include: 'Queued', 'InProgress', 'Completed', 'Failed', 'Timeout', 'NewDataNotAvailable', 'DataNotAvailable' - Status ExecutionStatus `json:"status,omitempty"` - // SubmittedBy - The identifier for the entity that executed the export. For OnDemand executions it is the user email. For scheduled executions it is 'System'. - SubmittedBy *string `json:"submittedBy,omitempty"` - // SubmittedTime - The time when export was queued to be executed. - SubmittedTime *date.Time `json:"submittedTime,omitempty"` - // ProcessingStartTime - The time when export was picked up to be executed. - ProcessingStartTime *date.Time `json:"processingStartTime,omitempty"` - // ProcessingEndTime - The time when the export execution finished. - ProcessingEndTime *date.Time `json:"processingEndTime,omitempty"` - // FileName - The name of the exported file. - FileName *string `json:"fileName,omitempty"` - // RunSettings - The export settings that were in effect for this execution. - RunSettings *CommonExportProperties `json:"runSettings,omitempty"` - // Error - The details of any error. - Error *ErrorDetails `json:"error,omitempty"` -} - -// ExportListResult result of listing exports. It contains a list of available exports in the scope -// provided. -type ExportListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of exports. - Value *[]Export `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExportListResult. -func (elr ExportListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ExportProperties the properties of the export. -type ExportProperties struct { - // Schedule - Has schedule information for the export. - Schedule *ExportSchedule `json:"schedule,omitempty"` - // Format - The format of the export being delivered. Currently only 'Csv' is supported. Possible values include: 'Csv' - Format FormatType `json:"format,omitempty"` - // DeliveryInfo - Has delivery information for the export. - DeliveryInfo *ExportDeliveryInfo `json:"deliveryInfo,omitempty"` - // Definition - Has the definition for the export. - Definition *ExportDefinition `json:"definition,omitempty"` - // RunHistory - If requested, has the most recent execution history for the export. - RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"` - // NextRunTimeEstimate - READ-ONLY; If the export has an active schedule, provides an estimate of the next execution time. - NextRunTimeEstimate *date.Time `json:"nextRunTimeEstimate,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExportProperties. -func (ep ExportProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ep.Schedule != nil { - objectMap["schedule"] = ep.Schedule - } - if ep.Format != "" { - objectMap["format"] = ep.Format - } - if ep.DeliveryInfo != nil { - objectMap["deliveryInfo"] = ep.DeliveryInfo - } - if ep.Definition != nil { - objectMap["definition"] = ep.Definition - } - if ep.RunHistory != nil { - objectMap["runHistory"] = ep.RunHistory - } - return json.Marshal(objectMap) -} - -// ExportRecurrencePeriod the start and end date for recurrence schedule. -type ExportRecurrencePeriod struct { - // From - The start date of recurrence. - From *date.Time `json:"from,omitempty"` - // To - The end date of recurrence. - To *date.Time `json:"to,omitempty"` -} - -// ExportSchedule the schedule associated with the export. -type ExportSchedule struct { - // Status - The status of the export's schedule. If 'Inactive', the export's schedule is paused. Possible values include: 'Active', 'Inactive' - Status StatusType `json:"status,omitempty"` - // Recurrence - The schedule recurrence. Possible values include: 'RecurrenceTypeDaily', 'RecurrenceTypeWeekly', 'RecurrenceTypeMonthly', 'RecurrenceTypeAnnually' - Recurrence RecurrenceType `json:"recurrence,omitempty"` - // RecurrencePeriod - Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. - RecurrencePeriod *ExportRecurrencePeriod `json:"recurrencePeriod,omitempty"` -} - -// ExportTimePeriod the date range for data in the export. This should only be specified with timeFrame set -// to 'Custom'. The maximum date range is 3 months. -type ExportTimePeriod struct { - // From - The start date for export data. - From *date.Time `json:"from,omitempty"` - // To - The end date for export data. - To *date.Time `json:"to,omitempty"` -} - -// ForecastDataset the definition of data present in the forecast. -type ForecastDataset struct { - // Granularity - The granularity of rows in the forecast. Possible values include: 'Daily' - Granularity GranularityType `json:"granularity,omitempty"` - // Configuration - Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - Configuration *QueryDatasetConfiguration `json:"configuration,omitempty"` - // Aggregation - Dictionary of aggregation expression to use in the forecast. The key of each item in the dictionary is the alias for the aggregated column. forecast can have up to 2 aggregation clauses. - Aggregation map[string]*QueryAggregation `json:"aggregation"` - // Filter - Has filter expression to use in the forecast. - Filter *QueryFilter `json:"filter,omitempty"` -} - -// MarshalJSON is the custom marshaler for ForecastDataset. -func (fd ForecastDataset) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fd.Granularity != "" { - objectMap["granularity"] = fd.Granularity - } - if fd.Configuration != nil { - objectMap["configuration"] = fd.Configuration - } - if fd.Aggregation != nil { - objectMap["aggregation"] = fd.Aggregation - } - if fd.Filter != nil { - objectMap["filter"] = fd.Filter - } - return json.Marshal(objectMap) -} - -// ForecastDefinition the definition of a forecast. -type ForecastDefinition struct { - // Type - The type of the forecast. Possible values include: 'ForecastTypeUsage', 'ForecastTypeActualCost', 'ForecastTypeAmortizedCost' - Type ForecastType `json:"type,omitempty"` - // Timeframe - The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. Possible values include: 'MonthToDate', 'BillingMonthToDate', 'TheLastMonth', 'TheLastBillingMonth', 'WeekToDate', 'Custom' - Timeframe ForecastTimeframeType `json:"timeframe,omitempty"` - // TimePeriod - Has time period for pulling data for the forecast. - TimePeriod *QueryTimePeriod `json:"timePeriod,omitempty"` - // Dataset - Has definition for data in this forecast. - Dataset *ForecastDataset `json:"dataset,omitempty"` - // IncludeActualCost - a boolean determining if actualCost will be included - IncludeActualCost *bool `json:"includeActualCost,omitempty"` - // IncludeFreshPartialCost - a boolean determining if FreshPartialCost will be included - IncludeFreshPartialCost *bool `json:"includeFreshPartialCost,omitempty"` -} - -// KpiProperties each KPI must contain a 'type' and 'enabled' key. -type KpiProperties struct { - // Type - KPI type (Forecast, Budget). Possible values include: 'KpiTypeTypeForecast', 'KpiTypeTypeBudget' - Type KpiTypeType `json:"type,omitempty"` - // ID - ID of resource related to metric (budget). - ID *string `json:"id,omitempty"` - // Enabled - show the KPI in the UI? - Enabled *bool `json:"enabled,omitempty"` -} - -// Operation a Cost management REST API operation. -type Operation struct { - // Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}. - Name *string `json:"name,omitempty"` - // Display - The object that represents the operation. - Display *OperationDisplay `json:"display,omitempty"` -} - -// MarshalJSON is the custom marshaler for Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if o.Display != nil { - objectMap["display"] = o.Display - } - return json.Marshal(objectMap) -} - -// OperationDisplay the object that represents the operation. -type OperationDisplay struct { - // Provider - READ-ONLY; Service provider: Microsoft.CostManagement. - Provider *string `json:"provider,omitempty"` - // Resource - READ-ONLY; Resource on which the operation is performed: Dimensions, Query. - Resource *string `json:"resource,omitempty"` - // Operation - READ-ONLY; Operation type: Read, write, delete, etc. - Operation *string `json:"operation,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationDisplay. -func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationListResult result of listing cost management operations. It contains a list of operations and a -// URL link to get the next set of results. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of cost management operations supported by the Microsoft.CostManagement resource provider. - Value *[]Operation `json:"value,omitempty"` - // NextLink - READ-ONLY; URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationListResult. -func (olr OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationListResultIterator provides access to a complete listing of Operation values. -type OperationListResultIterator struct { - i int - page OperationListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *OperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OperationListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter OperationListResultIterator) Response() OperationListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter OperationListResultIterator) Value() Operation { - if !iter.page.NotDone() { - return Operation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the OperationListResultIterator type. -func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { - return OperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (olr OperationListResult) IsEmpty() bool { - return olr.Value == nil || len(*olr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (olr OperationListResult) hasNextLink() bool { - return olr.NextLink != nil && len(*olr.NextLink) != 0 -} - -// operationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if !olr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(olr.NextLink))) -} - -// OperationListResultPage contains a page of Operation values. -type OperationListResultPage struct { - fn func(context.Context, OperationListResult) (OperationListResult, error) - olr OperationListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.olr) - if err != nil { - return err - } - page.olr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *OperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OperationListResultPage) NotDone() bool { - return !page.olr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page OperationListResultPage) Response() OperationListResult { - return page.olr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page OperationListResultPage) Values() []Operation { - if page.olr.IsEmpty() { - return nil - } - return *page.olr.Value -} - -// Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{ - fn: getNextPage, - olr: cur, - } -} - -// PivotProperties each pivot must contain a 'type' and 'name'. -type PivotProperties struct { - // Type - Data type to show in view. Possible values include: 'PivotTypeTypeDimension', 'PivotTypeTypeTagKey' - Type PivotTypeType `json:"type,omitempty"` - // Name - Data field to show in view. - Name *string `json:"name,omitempty"` -} - -// ProxyResource the Resource model definition. -type ProxyResource struct { - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. - ETag *string `json:"eTag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProxyResource. -func (pr ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pr.ETag != nil { - objectMap["eTag"] = pr.ETag - } - return json.Marshal(objectMap) -} - -// QueryAggregation the aggregation expression to be used in the query. -type QueryAggregation struct { - // Name - The name of the column to aggregate. - Name *string `json:"name,omitempty"` - // Function - The name of the aggregation function to use. - Function *string `json:"function,omitempty"` -} - -// QueryColumn ... -type QueryColumn struct { - // Name - The name of column. - Name *string `json:"name,omitempty"` - // Type - The type of column. - Type *string `json:"type,omitempty"` -} - -// QueryComparisonExpression the comparison expression to be used in the query. -type QueryComparisonExpression struct { - // Name - The name of the column to use in comparison. - Name *string `json:"name,omitempty"` - // Operator - The operator to use for comparison. - Operator *string `json:"operator,omitempty"` - // Values - Array of values to use for comparison - Values *[]string `json:"values,omitempty"` -} - -// QueryDataset the definition of data present in the query. -type QueryDataset struct { - // Granularity - The granularity of rows in the query. Possible values include: 'Daily' - Granularity GranularityType `json:"granularity,omitempty"` - // Configuration - Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. - Configuration *QueryDatasetConfiguration `json:"configuration,omitempty"` - // Aggregation - Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. - Aggregation map[string]*QueryAggregation `json:"aggregation"` - // Grouping - Array of group by expression to use in the query. Query can have up to 2 group by clauses. - Grouping *[]QueryGrouping `json:"grouping,omitempty"` - // Filter - Has filter expression to use in the query. - Filter *QueryFilter `json:"filter,omitempty"` -} - -// MarshalJSON is the custom marshaler for QueryDataset. -func (qd QueryDataset) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if qd.Granularity != "" { - objectMap["granularity"] = qd.Granularity - } - if qd.Configuration != nil { - objectMap["configuration"] = qd.Configuration - } - if qd.Aggregation != nil { - objectMap["aggregation"] = qd.Aggregation - } - if qd.Grouping != nil { - objectMap["grouping"] = qd.Grouping - } - if qd.Filter != nil { - objectMap["filter"] = qd.Filter - } - return json.Marshal(objectMap) -} - -// QueryDatasetConfiguration the configuration of dataset in the query. -type QueryDatasetConfiguration struct { - // Columns - Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns. - Columns *[]string `json:"columns,omitempty"` -} - -// QueryDefinition the definition of a query. -type QueryDefinition struct { - // Type - The type of the query. Possible values include: 'ExportTypeUsage', 'ExportTypeActualCost', 'ExportTypeAmortizedCost' - Type ExportType `json:"type,omitempty"` - // Timeframe - The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: 'TimeframeTypeMonthToDate', 'TimeframeTypeBillingMonthToDate', 'TimeframeTypeTheLastMonth', 'TimeframeTypeTheLastBillingMonth', 'TimeframeTypeWeekToDate', 'TimeframeTypeCustom' - Timeframe TimeframeType `json:"timeframe,omitempty"` - // TimePeriod - Has time period for pulling data for the query. - TimePeriod *QueryTimePeriod `json:"timePeriod,omitempty"` - // Dataset - Has definition for data in this query. - Dataset *QueryDataset `json:"dataset,omitempty"` -} - -// QueryFilter the filter expression to be used in the export. -type QueryFilter struct { - // And - The logical "AND" expression. Must have at least 2 items. - And *[]QueryFilter `json:"and,omitempty"` - // Or - The logical "OR" expression. Must have at least 2 items. - Or *[]QueryFilter `json:"or,omitempty"` - // Not - The logical "NOT" expression. - Not *QueryFilter `json:"not,omitempty"` - // Dimension - Has comparison expression for a dimension - Dimension *QueryComparisonExpression `json:"dimension,omitempty"` - // Tag - Has comparison expression for a tag - Tag *QueryComparisonExpression `json:"tag,omitempty"` -} - -// QueryGrouping the group by expression to be used in the query. -type QueryGrouping struct { - // Type - Has type of the column to group. Possible values include: 'QueryColumnTypeTag', 'QueryColumnTypeDimension' - Type QueryColumnType `json:"type,omitempty"` - // Name - The name of the column to group. - Name *string `json:"name,omitempty"` -} - -// QueryProperties ... -type QueryProperties struct { - // NextLink - The link (url) to the next page of results. - NextLink *string `json:"nextLink,omitempty"` - // Columns - Array of columns - Columns *[]QueryColumn `json:"columns,omitempty"` - // Rows - Array of rows - Rows *[][]interface{} `json:"rows,omitempty"` -} - -// QueryResult result of query. It contains all columns listed under groupings and aggregation. -type QueryResult struct { - autorest.Response `json:"-"` - *QueryProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Tags - READ-ONLY; Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for QueryResult. -func (qr QueryResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if qr.QueryProperties != nil { - objectMap["properties"] = qr.QueryProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for QueryResult struct. -func (qr *QueryResult) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var queryProperties QueryProperties - err = json.Unmarshal(*v, &queryProperties) - if err != nil { - return err - } - qr.QueryProperties = &queryProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - qr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - qr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - qr.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - qr.Tags = tags - } - } - } - - return nil -} - -// QueryTimePeriod the start and end date for pulling data for the query. -type QueryTimePeriod struct { - // From - The start date to pull data from. - From *date.Time `json:"from,omitempty"` - // To - The end date to pull data to. - To *date.Time `json:"to,omitempty"` -} - -// ReportConfigAggregation the aggregation expression to be used in the report. -type ReportConfigAggregation struct { - // Name - The name of the column to aggregate. - Name *string `json:"name,omitempty"` - // Function - The name of the aggregation function to use. - Function *string `json:"function,omitempty"` -} - -// ReportConfigComparisonExpression the comparison expression to be used in the report. -type ReportConfigComparisonExpression struct { - // Name - The name of the column to use in comparison. - Name *string `json:"name,omitempty"` - // Operator - The operator to use for comparison. Possible values include: 'In', 'Contains' - Operator OperatorType `json:"operator,omitempty"` - // Values - Array of values to use for comparison - Values *[]string `json:"values,omitempty"` -} - -// ReportConfigDataset the definition of data present in the report. -type ReportConfigDataset struct { - // Granularity - The granularity of rows in the report. Possible values include: 'ReportGranularityTypeDaily', 'ReportGranularityTypeMonthly' - Granularity ReportGranularityType `json:"granularity,omitempty"` - // Configuration - Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided. - Configuration *ReportConfigDatasetConfiguration `json:"configuration,omitempty"` - // Aggregation - Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses. - Aggregation map[string]*ReportConfigAggregation `json:"aggregation"` - // Grouping - Array of group by expression to use in the report. Report can have up to 2 group by clauses. - Grouping *[]ReportConfigGrouping `json:"grouping,omitempty"` - // Sorting - Array of order by expression to use in the report. - Sorting *[]ReportConfigSorting `json:"sorting,omitempty"` - // Filter - Has filter expression to use in the report. - Filter *ReportConfigFilter `json:"filter,omitempty"` -} - -// MarshalJSON is the custom marshaler for ReportConfigDataset. -func (rcd ReportConfigDataset) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rcd.Granularity != "" { - objectMap["granularity"] = rcd.Granularity - } - if rcd.Configuration != nil { - objectMap["configuration"] = rcd.Configuration - } - if rcd.Aggregation != nil { - objectMap["aggregation"] = rcd.Aggregation - } - if rcd.Grouping != nil { - objectMap["grouping"] = rcd.Grouping - } - if rcd.Sorting != nil { - objectMap["sorting"] = rcd.Sorting - } - if rcd.Filter != nil { - objectMap["filter"] = rcd.Filter - } - return json.Marshal(objectMap) -} - -// ReportConfigDatasetConfiguration the configuration of dataset in the report. -type ReportConfigDatasetConfiguration struct { - // Columns - Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns. - Columns *[]string `json:"columns,omitempty"` -} - -// ReportConfigDefinition the definition of a report config. -type ReportConfigDefinition struct { - // Type - The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates. - Type *string `json:"type,omitempty"` - // Timeframe - The time frame for pulling data for the report. If custom, then a specific time period must be provided. Possible values include: 'ReportTimeframeTypeWeekToDate', 'ReportTimeframeTypeMonthToDate', 'ReportTimeframeTypeYearToDate', 'ReportTimeframeTypeCustom' - Timeframe ReportTimeframeType `json:"timeframe,omitempty"` - // TimePeriod - Has time period for pulling data for the report. - TimePeriod *ReportConfigTimePeriod `json:"timePeriod,omitempty"` - // Dataset - Has definition for data in this report config. - Dataset *ReportConfigDataset `json:"dataset,omitempty"` -} - -// ReportConfigFilter the filter expression to be used in the report. -type ReportConfigFilter struct { - // And - The logical "AND" expression. Must have at least 2 items. - And *[]ReportConfigFilter `json:"and,omitempty"` - // Or - The logical "OR" expression. Must have at least 2 items. - Or *[]ReportConfigFilter `json:"or,omitempty"` - // Not - The logical "NOT" expression. - Not *ReportConfigFilter `json:"not,omitempty"` - // Dimension - Has comparison expression for a dimension - Dimension *ReportConfigComparisonExpression `json:"dimension,omitempty"` - // Tag - Has comparison expression for a tag - Tag *ReportConfigComparisonExpression `json:"tag,omitempty"` -} - -// ReportConfigGrouping the group by expression to be used in the report. -type ReportConfigGrouping struct { - // Type - Has type of the column to group. Possible values include: 'ReportConfigColumnTypeTag', 'ReportConfigColumnTypeDimension' - Type ReportConfigColumnType `json:"type,omitempty"` - // Name - The name of the column to group. This version supports subscription lowest possible grain. - Name *string `json:"name,omitempty"` -} - -// ReportConfigSorting the order by expression to be used in the report. -type ReportConfigSorting struct { - // Direction - Direction of sort. Possible values include: 'Ascending', 'Descending' - Direction Direction `json:"direction,omitempty"` - // Name - The name of the column to sort. - Name *string `json:"name,omitempty"` -} - -// ReportConfigTimePeriod the start and end date for pulling data for the report. -type ReportConfigTimePeriod struct { - // From - The start date to pull data from. - From *date.Time `json:"from,omitempty"` - // To - The end date to pull data to. - To *date.Time `json:"to,omitempty"` -} - -// Resource the Resource model definition. -type Resource struct { - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Tags - READ-ONLY; Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// View states and configurations of Cost Analysis. -type View struct { - autorest.Response `json:"-"` - *ViewProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. - ETag *string `json:"eTag,omitempty"` -} - -// MarshalJSON is the custom marshaler for View. -func (vVar View) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vVar.ViewProperties != nil { - objectMap["properties"] = vVar.ViewProperties - } - if vVar.ETag != nil { - objectMap["eTag"] = vVar.ETag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for View struct. -func (vVar *View) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var viewProperties ViewProperties - err = json.Unmarshal(*v, &viewProperties) - if err != nil { - return err - } - vVar.ViewProperties = &viewProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vVar.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vVar.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vVar.Type = &typeVar - } - case "eTag": - if v != nil { - var eTag string - err = json.Unmarshal(*v, &eTag) - if err != nil { - return err - } - vVar.ETag = &eTag - } - } - } - - return nil -} - -// ViewListResult result of listing views. It contains a list of available views. -type ViewListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of views. - Value *[]View `json:"value,omitempty"` - // NextLink - READ-ONLY; The link (url) to the next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ViewListResult. -func (vlr ViewListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ViewListResultIterator provides access to a complete listing of View values. -type ViewListResultIterator struct { - i int - page ViewListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ViewListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ViewListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ViewListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ViewListResultIterator) Response() ViewListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ViewListResultIterator) Value() View { - if !iter.page.NotDone() { - return View{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ViewListResultIterator type. -func NewViewListResultIterator(page ViewListResultPage) ViewListResultIterator { - return ViewListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (vlr ViewListResult) IsEmpty() bool { - return vlr.Value == nil || len(*vlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (vlr ViewListResult) hasNextLink() bool { - return vlr.NextLink != nil && len(*vlr.NextLink) != 0 -} - -// viewListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (vlr ViewListResult) viewListResultPreparer(ctx context.Context) (*http.Request, error) { - if !vlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vlr.NextLink))) -} - -// ViewListResultPage contains a page of View values. -type ViewListResultPage struct { - fn func(context.Context, ViewListResult) (ViewListResult, error) - vlr ViewListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ViewListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.vlr) - if err != nil { - return err - } - page.vlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ViewListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ViewListResultPage) NotDone() bool { - return !page.vlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ViewListResultPage) Response() ViewListResult { - return page.vlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ViewListResultPage) Values() []View { - if page.vlr.IsEmpty() { - return nil - } - return *page.vlr.Value -} - -// Creates a new instance of the ViewListResultPage type. -func NewViewListResultPage(cur ViewListResult, getNextPage func(context.Context, ViewListResult) (ViewListResult, error)) ViewListResultPage { - return ViewListResultPage{ - fn: getNextPage, - vlr: cur, - } -} - -// ViewProperties the properties of the view. -type ViewProperties struct { - // DisplayName - User input name of the view. Required. - DisplayName *string `json:"displayName,omitempty"` - // Scope - Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope. - Scope *string `json:"scope,omitempty"` - // CreatedOn - READ-ONLY; Date the user created this view. - CreatedOn *date.Time `json:"createdOn,omitempty"` - // ModifiedOn - READ-ONLY; Date when the user last modified this view. - ModifiedOn *date.Time `json:"modifiedOn,omitempty"` - // ReportConfigDefinition - Query body configuration. Required. - *ReportConfigDefinition `json:"query,omitempty"` - // Chart - Chart type of the main view in Cost Analysis. Required. Possible values include: 'Area', 'Line', 'StackedColumn', 'GroupedColumn', 'Table' - Chart ChartType `json:"chart,omitempty"` - // Accumulated - Show costs accumulated over time. Possible values include: 'True', 'False' - Accumulated AccumulatedType `json:"accumulated,omitempty"` - // Metric - Metric to use when displaying costs. Possible values include: 'ActualCost', 'AmortizedCost', 'AHUB' - Metric MetricType `json:"metric,omitempty"` - // Kpis - List of KPIs to show in Cost Analysis UI. - Kpis *[]KpiProperties `json:"kpis,omitempty"` - // Pivots - Configuration of 3 sub-views in the Cost Analysis UI. - Pivots *[]PivotProperties `json:"pivots,omitempty"` -} - -// MarshalJSON is the custom marshaler for ViewProperties. -func (vp ViewProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vp.DisplayName != nil { - objectMap["displayName"] = vp.DisplayName - } - if vp.Scope != nil { - objectMap["scope"] = vp.Scope - } - if vp.ReportConfigDefinition != nil { - objectMap["query"] = vp.ReportConfigDefinition - } - if vp.Chart != "" { - objectMap["chart"] = vp.Chart - } - if vp.Accumulated != "" { - objectMap["accumulated"] = vp.Accumulated - } - if vp.Metric != "" { - objectMap["metric"] = vp.Metric - } - if vp.Kpis != nil { - objectMap["kpis"] = vp.Kpis - } - if vp.Pivots != nil { - objectMap["pivots"] = vp.Pivots - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ViewProperties struct. -func (vp *ViewProperties) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "displayName": - if v != nil { - var displayName string - err = json.Unmarshal(*v, &displayName) - if err != nil { - return err - } - vp.DisplayName = &displayName - } - case "scope": - if v != nil { - var scope string - err = json.Unmarshal(*v, &scope) - if err != nil { - return err - } - vp.Scope = &scope - } - case "createdOn": - if v != nil { - var createdOn date.Time - err = json.Unmarshal(*v, &createdOn) - if err != nil { - return err - } - vp.CreatedOn = &createdOn - } - case "modifiedOn": - if v != nil { - var modifiedOn date.Time - err = json.Unmarshal(*v, &modifiedOn) - if err != nil { - return err - } - vp.ModifiedOn = &modifiedOn - } - case "query": - if v != nil { - var reportConfigDefinition ReportConfigDefinition - err = json.Unmarshal(*v, &reportConfigDefinition) - if err != nil { - return err - } - vp.ReportConfigDefinition = &reportConfigDefinition - } - case "chart": - if v != nil { - var chart ChartType - err = json.Unmarshal(*v, &chart) - if err != nil { - return err - } - vp.Chart = chart - } - case "accumulated": - if v != nil { - var accumulated AccumulatedType - err = json.Unmarshal(*v, &accumulated) - if err != nil { - return err - } - vp.Accumulated = accumulated - } - case "metric": - if v != nil { - var metric MetricType - err = json.Unmarshal(*v, &metric) - if err != nil { - return err - } - vp.Metric = metric - } - case "kpis": - if v != nil { - var kpis []KpiProperties - err = json.Unmarshal(*v, &kpis) - if err != nil { - return err - } - vp.Kpis = &kpis - } - case "pivots": - if v != nil { - var pivots []PivotProperties - err = json.Unmarshal(*v, &pivots) - if err != nil { - return err - } - vp.Pivots = &pivots - } - } - } - - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/operations.go deleted file mode 100644 index c70a4aac3fdc..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/operations.go +++ /dev/null @@ -1,140 +0,0 @@ -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the client for the Operations methods of the Costmanagement service. -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List lists all of the available cost management REST API operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.olr.Response.Response != nil { - sc = result.olr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.olr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.OperationsClient", "List", resp, "Failure sending request") - return - } - - result.olr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.OperationsClient", "List", resp, "Failure responding to request") - return - } - if result.olr.hasNextLink() && result.olr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.CostManagement/operations"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { - req, err := lastResults.operationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "costmanagement.OperationsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "costmanagement.OperationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.OperationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/query.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/query.go deleted file mode 100644 index 0b92b9093f7e..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/query.go +++ /dev/null @@ -1,267 +0,0 @@ -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// QueryClient is the client for the Query methods of the Costmanagement service. -type QueryClient struct { - BaseClient -} - -// NewQueryClient creates an instance of the QueryClient client. -func NewQueryClient(subscriptionID string) QueryClient { - return NewQueryClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewQueryClientWithBaseURI creates an instance of the QueryClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewQueryClientWithBaseURI(baseURI string, subscriptionID string) QueryClient { - return QueryClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Usage query the usage data for scope defined. -// Parameters: -// scope - the scope associated with query and export operations. This includes -// '/subscriptions/{subscriptionId}/' for subscription scope, -// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for -// Management Group scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// billingProfile scope, -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and -// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. -// parameters - parameters supplied to the CreateOrUpdate Query Config operation. -func (client QueryClient) Usage(ctx context.Context, scope string, parameters QueryDefinition) (result QueryResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueryClient.Usage") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TimePeriod", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.TimePeriod.From", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TimePeriod.To", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.Dataset", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Grouping", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Grouping", Name: validation.MaxItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.And", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.And", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter.Or", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Or", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter.Not", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Dimension.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension.Operator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Dimension.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - {Target: "parameters.Dataset.Filter.Tag", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Tag.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Tag.Operator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Tag.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Tag.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("costmanagement.QueryClient", "Usage", err.Error()) - } - - req, err := client.UsagePreparer(ctx, scope, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.QueryClient", "Usage", nil, "Failure preparing request") - return - } - - resp, err := client.UsageSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.QueryClient", "Usage", resp, "Failure sending request") - return - } - - result, err = client.UsageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.QueryClient", "Usage", resp, "Failure responding to request") - return - } - - return -} - -// UsagePreparer prepares the Usage request. -func (client QueryClient) UsagePreparer(ctx context.Context, scope string, parameters QueryDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/query", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UsageSender sends the Usage request. The method will close the -// http.Response Body if it receives an error. -func (client QueryClient) UsageSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// UsageResponder handles the response to the Usage request. The method always -// closes the http.Response Body. -func (client QueryClient) UsageResponder(resp *http.Response) (result QueryResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UsageByExternalCloudProviderType query the usage data for external cloud provider type defined. -// Parameters: -// externalCloudProviderType - the external cloud provider type associated with dimension/query operations. -// This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated -// account. -// externalCloudProviderID - this can be '{externalSubscriptionId}' for linked account or -// '{externalBillingAccountId}' for consolidated account used with dimension/query operations. -// parameters - parameters supplied to the CreateOrUpdate Query Config operation. -func (client QueryClient) UsageByExternalCloudProviderType(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters QueryDefinition) (result QueryResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueryClient.UsageByExternalCloudProviderType") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TimePeriod", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.TimePeriod.From", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TimePeriod.To", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.Dataset", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Grouping", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Grouping", Name: validation.MaxItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.And", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.And", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter.Or", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Or", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.Dataset.Filter.Not", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Dimension.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension.Operator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Dimension.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Dimension.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - {Target: "parameters.Dataset.Filter.Tag", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Tag.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Tag.Operator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Dataset.Filter.Tag.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Dataset.Filter.Tag.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("costmanagement.QueryClient", "UsageByExternalCloudProviderType", err.Error()) - } - - req, err := client.UsageByExternalCloudProviderTypePreparer(ctx, externalCloudProviderType, externalCloudProviderID, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.QueryClient", "UsageByExternalCloudProviderType", nil, "Failure preparing request") - return - } - - resp, err := client.UsageByExternalCloudProviderTypeSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.QueryClient", "UsageByExternalCloudProviderType", resp, "Failure sending request") - return - } - - result, err = client.UsageByExternalCloudProviderTypeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.QueryClient", "UsageByExternalCloudProviderType", resp, "Failure responding to request") - return - } - - return -} - -// UsageByExternalCloudProviderTypePreparer prepares the UsageByExternalCloudProviderType request. -func (client QueryClient) UsageByExternalCloudProviderTypePreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters QueryDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "externalCloudProviderId": autorest.Encode("path", externalCloudProviderID), - "externalCloudProviderType": autorest.Encode("path", externalCloudProviderType), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UsageByExternalCloudProviderTypeSender sends the UsageByExternalCloudProviderType request. The method will close the -// http.Response Body if it receives an error. -func (client QueryClient) UsageByExternalCloudProviderTypeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// UsageByExternalCloudProviderTypeResponder handles the response to the UsageByExternalCloudProviderType request. The method always -// closes the http.Response Body. -func (client QueryClient) UsageByExternalCloudProviderTypeResponder(resp *http.Response) (result QueryResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/version.go deleted file mode 100644 index 73ddda88b113..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package costmanagement - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " costmanagement/2020-06-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/views.go b/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/views.go deleted file mode 100644 index 0d02fc01e558..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement/views.go +++ /dev/null @@ -1,832 +0,0 @@ -package costmanagement - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ViewsClient is the client for the Views methods of the Costmanagement service. -type ViewsClient struct { - BaseClient -} - -// NewViewsClient creates an instance of the ViewsClient client. -func NewViewsClient(subscriptionID string) ViewsClient { - return NewViewsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewViewsClientWithBaseURI creates an instance of the ViewsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewViewsClientWithBaseURI(baseURI string, subscriptionID string) ViewsClient { - return ViewsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate the operation to create or update a view. Update operation requires latest eTag to be set in the -// request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. -// Parameters: -// viewName - view name -// parameters - parameters supplied to the CreateOrUpdate View operation. -func (client ViewsClient) CreateOrUpdate(ctx context.Context, viewName string, parameters View) (result View, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ViewProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Type", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.TimePeriod", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.TimePeriod.From", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.TimePeriod.To", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Grouping", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Grouping", Name: validation.MaxItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.And", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.And", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Or", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Or", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Not", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Dimension", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Dimension.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Dimension.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Dimension.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Tag", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Tag.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Tag.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Tag.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("costmanagement.ViewsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, viewName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ViewsClient) CreateOrUpdatePreparer(ctx context.Context, viewName string, parameters View) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "viewName": autorest.Encode("path", viewName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.CostManagement/views/{viewName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ViewsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ViewsClient) CreateOrUpdateResponder(resp *http.Response) (result View, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdateByScope the operation to create or update a view. Update operation requires latest eTag to be set in -// the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. -// Parameters: -// scope - the scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for -// subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// BillingProfile scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for -// InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management -// Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for -// External Billing Account scope and -// 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External -// Subscription scope. -// viewName - view name -// parameters - parameters supplied to the CreateOrUpdate View operation. -func (client ViewsClient) CreateOrUpdateByScope(ctx context.Context, scope string, viewName string, parameters View) (result View, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.CreateOrUpdateByScope") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ViewProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Type", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.TimePeriod", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.TimePeriod.From", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.TimePeriod.To", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Grouping", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Grouping", Name: validation.MaxItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.And", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.And", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Or", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Or", Name: validation.MinItems, Rule: 2, Chain: nil}}}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Not", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Dimension", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Dimension.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Dimension.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Dimension.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Tag", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Tag.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Tag.Values", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ViewProperties.ReportConfigDefinition.Dataset.Filter.Tag.Values", Name: validation.MinItems, Rule: 1, Chain: nil}}}, - }}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("costmanagement.ViewsClient", "CreateOrUpdateByScope", err.Error()) - } - - req, err := client.CreateOrUpdateByScopePreparer(ctx, scope, viewName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "CreateOrUpdateByScope", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateByScopeSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "CreateOrUpdateByScope", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateByScopeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "CreateOrUpdateByScope", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdateByScopePreparer prepares the CreateOrUpdateByScope request. -func (client ViewsClient) CreateOrUpdateByScopePreparer(ctx context.Context, scope string, viewName string, parameters View) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": autorest.Encode("path", scope), - "viewName": autorest.Encode("path", viewName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/views/{viewName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateByScopeSender sends the CreateOrUpdateByScope request. The method will close the -// http.Response Body if it receives an error. -func (client ViewsClient) CreateOrUpdateByScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// CreateOrUpdateByScopeResponder handles the response to the CreateOrUpdateByScope request. The method always -// closes the http.Response Body. -func (client ViewsClient) CreateOrUpdateByScopeResponder(resp *http.Response) (result View, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete the operation to delete a view. -// Parameters: -// viewName - view name -func (client ViewsClient) Delete(ctx context.Context, viewName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, viewName) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ViewsClient) DeletePreparer(ctx context.Context, viewName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "viewName": autorest.Encode("path", viewName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.CostManagement/views/{viewName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ViewsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ViewsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// DeleteByScope the operation to delete a view. -// Parameters: -// scope - the scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for -// subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// BillingProfile scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for -// InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management -// Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for -// External Billing Account scope and -// 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External -// Subscription scope. -// viewName - view name -func (client ViewsClient) DeleteByScope(ctx context.Context, scope string, viewName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.DeleteByScope") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeleteByScopePreparer(ctx, scope, viewName) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "DeleteByScope", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteByScopeSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "DeleteByScope", resp, "Failure sending request") - return - } - - result, err = client.DeleteByScopeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "DeleteByScope", resp, "Failure responding to request") - return - } - - return -} - -// DeleteByScopePreparer prepares the DeleteByScope request. -func (client ViewsClient) DeleteByScopePreparer(ctx context.Context, scope string, viewName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": autorest.Encode("path", scope), - "viewName": autorest.Encode("path", viewName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/views/{viewName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteByScopeSender sends the DeleteByScope request. The method will close the -// http.Response Body if it receives an error. -func (client ViewsClient) DeleteByScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// DeleteByScopeResponder handles the response to the DeleteByScope request. The method always -// closes the http.Response Body. -func (client ViewsClient) DeleteByScopeResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the view by view name. -// Parameters: -// viewName - view name -func (client ViewsClient) Get(ctx context.Context, viewName string) (result View, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, viewName) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ViewsClient) GetPreparer(ctx context.Context, viewName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "viewName": autorest.Encode("path", viewName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.CostManagement/views/{viewName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ViewsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ViewsClient) GetResponder(resp *http.Response) (result View, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetByScope gets the view for the defined scope by view name. -// Parameters: -// scope - the scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for -// subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// BillingProfile scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for -// InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management -// Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for -// External Billing Account scope and -// 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External -// Subscription scope. -// viewName - view name -func (client ViewsClient) GetByScope(ctx context.Context, scope string, viewName string) (result View, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.GetByScope") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetByScopePreparer(ctx, scope, viewName) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "GetByScope", nil, "Failure preparing request") - return - } - - resp, err := client.GetByScopeSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "GetByScope", resp, "Failure sending request") - return - } - - result, err = client.GetByScopeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "GetByScope", resp, "Failure responding to request") - return - } - - return -} - -// GetByScopePreparer prepares the GetByScope request. -func (client ViewsClient) GetByScopePreparer(ctx context.Context, scope string, viewName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": autorest.Encode("path", scope), - "viewName": autorest.Encode("path", viewName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/views/{viewName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetByScopeSender sends the GetByScope request. The method will close the -// http.Response Body if it receives an error. -func (client ViewsClient) GetByScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetByScopeResponder handles the response to the GetByScope request. The method always -// closes the http.Response Body. -func (client ViewsClient) GetByScopeResponder(resp *http.Response) (result View, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists all views by tenant and object. -func (client ViewsClient) List(ctx context.Context) (result ViewListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.List") - defer func() { - sc := -1 - if result.vlr.Response.Response != nil { - sc = result.vlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "List", resp, "Failure sending request") - return - } - - result.vlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "List", resp, "Failure responding to request") - return - } - if result.vlr.hasNextLink() && result.vlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ViewsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.CostManagement/views"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client ViewsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client ViewsClient) ListResponder(resp *http.Response) (result ViewListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client ViewsClient) listNextResults(ctx context.Context, lastResults ViewListResult) (result ViewListResult, err error) { - req, err := lastResults.viewListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ViewsClient) ListComplete(ctx context.Context) (result ViewListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} - -// ListByScope lists all views at the given scope. -// Parameters: -// scope - the scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for -// subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup -// scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department -// scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' -// for EnrollmentAccount scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for -// BillingProfile scope, -// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for -// InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management -// Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for -// External Billing Account scope and -// 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External -// Subscription scope. -func (client ViewsClient) ListByScope(ctx context.Context, scope string) (result ViewListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.ListByScope") - defer func() { - sc := -1 - if result.vlr.Response.Response != nil { - sc = result.vlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByScopeNextResults - req, err := client.ListByScopePreparer(ctx, scope) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "ListByScope", nil, "Failure preparing request") - return - } - - resp, err := client.ListByScopeSender(req) - if err != nil { - result.vlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "ListByScope", resp, "Failure sending request") - return - } - - result.vlr, err = client.ListByScopeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "ListByScope", resp, "Failure responding to request") - return - } - if result.vlr.hasNextLink() && result.vlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByScopePreparer prepares the ListByScope request. -func (client ViewsClient) ListByScopePreparer(ctx context.Context, scope string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": autorest.Encode("path", scope), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.CostManagement/views", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByScopeSender sends the ListByScope request. The method will close the -// http.Response Body if it receives an error. -func (client ViewsClient) ListByScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListByScopeResponder handles the response to the ListByScope request. The method always -// closes the http.Response Body. -func (client ViewsClient) ListByScopeResponder(resp *http.Response) (result ViewListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByScopeNextResults retrieves the next set of results, if any. -func (client ViewsClient) listByScopeNextResults(ctx context.Context, lastResults ViewListResult) (result ViewListResult, err error) { - req, err := lastResults.viewListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "listByScopeNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByScopeSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "listByScopeNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByScopeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "costmanagement.ViewsClient", "listByScopeNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByScopeComplete enumerates all values, automatically crossing page boundaries as required. -func (client ViewsClient) ListByScopeComplete(ctx context.Context, scope string) (result ViewListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ViewsClient.ListByScope") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByScope(ctx, scope) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/README.md new file mode 100644 index 000000000000..fa0670fe30c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/README.md @@ -0,0 +1,121 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports` Documentation + +The `exports` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-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/costmanagement/2021-10-01/exports" +``` + + +### Client Initialization + +```go +client := exports.NewExportsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ExportsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := exports.NewScopedExportID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "exportValue") + +payload := exports.Export{ + // ... +} + + +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: `ExportsClient.Delete` + +```go +ctx := context.TODO() +id := exports.NewScopedExportID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "exportValue") + +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: `ExportsClient.Execute` + +```go +ctx := context.TODO() +id := exports.NewScopedExportID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "exportValue") + +read, err := client.Execute(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ExportsClient.Get` + +```go +ctx := context.TODO() +id := exports.NewScopedExportID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "exportValue") + +read, err := client.Get(ctx, id, exports.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ExportsClient.GetExecutionHistory` + +```go +ctx := context.TODO() +id := exports.NewScopedExportID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "exportValue") + +read, err := client.GetExecutionHistory(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ExportsClient.List` + +```go +ctx := context.TODO() +id := exports.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +read, err := client.List(ctx, id, exports.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/client.go new file mode 100644 index 000000000000..512e25c313c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/client.go @@ -0,0 +1,18 @@ +package exports + +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 ExportsClient struct { + Client autorest.Client + baseUri string +} + +func NewExportsClientWithBaseURI(endpoint string) ExportsClient { + return ExportsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/constants.go new file mode 100644 index 000000000000..98fefa2ae1d7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/constants.go @@ -0,0 +1,260 @@ +package exports + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecutionStatus string + +const ( + ExecutionStatusCompleted ExecutionStatus = "Completed" + ExecutionStatusDataNotAvailable ExecutionStatus = "DataNotAvailable" + ExecutionStatusFailed ExecutionStatus = "Failed" + ExecutionStatusInProgress ExecutionStatus = "InProgress" + ExecutionStatusNewDataNotAvailable ExecutionStatus = "NewDataNotAvailable" + ExecutionStatusQueued ExecutionStatus = "Queued" + ExecutionStatusTimeout ExecutionStatus = "Timeout" +) + +func PossibleValuesForExecutionStatus() []string { + return []string{ + string(ExecutionStatusCompleted), + string(ExecutionStatusDataNotAvailable), + string(ExecutionStatusFailed), + string(ExecutionStatusInProgress), + string(ExecutionStatusNewDataNotAvailable), + string(ExecutionStatusQueued), + string(ExecutionStatusTimeout), + } +} + +func parseExecutionStatus(input string) (*ExecutionStatus, error) { + vals := map[string]ExecutionStatus{ + "completed": ExecutionStatusCompleted, + "datanotavailable": ExecutionStatusDataNotAvailable, + "failed": ExecutionStatusFailed, + "inprogress": ExecutionStatusInProgress, + "newdatanotavailable": ExecutionStatusNewDataNotAvailable, + "queued": ExecutionStatusQueued, + "timeout": ExecutionStatusTimeout, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExecutionStatus(input) + return &out, nil +} + +type ExecutionType string + +const ( + ExecutionTypeOnDemand ExecutionType = "OnDemand" + ExecutionTypeScheduled ExecutionType = "Scheduled" +) + +func PossibleValuesForExecutionType() []string { + return []string{ + string(ExecutionTypeOnDemand), + string(ExecutionTypeScheduled), + } +} + +func parseExecutionType(input string) (*ExecutionType, error) { + vals := map[string]ExecutionType{ + "ondemand": ExecutionTypeOnDemand, + "scheduled": ExecutionTypeScheduled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExecutionType(input) + return &out, nil +} + +type ExportType string + +const ( + ExportTypeActualCost ExportType = "ActualCost" + ExportTypeAmortizedCost ExportType = "AmortizedCost" + ExportTypeUsage ExportType = "Usage" +) + +func PossibleValuesForExportType() []string { + return []string{ + string(ExportTypeActualCost), + string(ExportTypeAmortizedCost), + string(ExportTypeUsage), + } +} + +func parseExportType(input string) (*ExportType, error) { + vals := map[string]ExportType{ + "actualcost": ExportTypeActualCost, + "amortizedcost": ExportTypeAmortizedCost, + "usage": ExportTypeUsage, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExportType(input) + return &out, nil +} + +type FormatType string + +const ( + FormatTypeCsv FormatType = "Csv" +) + +func PossibleValuesForFormatType() []string { + return []string{ + string(FormatTypeCsv), + } +} + +func parseFormatType(input string) (*FormatType, error) { + vals := map[string]FormatType{ + "csv": FormatTypeCsv, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FormatType(input) + return &out, nil +} + +type GranularityType string + +const ( + GranularityTypeDaily GranularityType = "Daily" +) + +func PossibleValuesForGranularityType() []string { + return []string{ + string(GranularityTypeDaily), + } +} + +func parseGranularityType(input string) (*GranularityType, error) { + vals := map[string]GranularityType{ + "daily": GranularityTypeDaily, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GranularityType(input) + return &out, nil +} + +type RecurrenceType string + +const ( + RecurrenceTypeAnnually RecurrenceType = "Annually" + RecurrenceTypeDaily RecurrenceType = "Daily" + RecurrenceTypeMonthly RecurrenceType = "Monthly" + RecurrenceTypeWeekly RecurrenceType = "Weekly" +) + +func PossibleValuesForRecurrenceType() []string { + return []string{ + string(RecurrenceTypeAnnually), + string(RecurrenceTypeDaily), + string(RecurrenceTypeMonthly), + string(RecurrenceTypeWeekly), + } +} + +func parseRecurrenceType(input string) (*RecurrenceType, error) { + vals := map[string]RecurrenceType{ + "annually": RecurrenceTypeAnnually, + "daily": RecurrenceTypeDaily, + "monthly": RecurrenceTypeMonthly, + "weekly": RecurrenceTypeWeekly, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RecurrenceType(input) + return &out, nil +} + +type StatusType string + +const ( + StatusTypeActive StatusType = "Active" + StatusTypeInactive StatusType = "Inactive" +) + +func PossibleValuesForStatusType() []string { + return []string{ + string(StatusTypeActive), + string(StatusTypeInactive), + } +} + +func parseStatusType(input string) (*StatusType, error) { + vals := map[string]StatusType{ + "active": StatusTypeActive, + "inactive": StatusTypeInactive, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusType(input) + return &out, nil +} + +type TimeframeType string + +const ( + TimeframeTypeBillingMonthToDate TimeframeType = "BillingMonthToDate" + TimeframeTypeCustom TimeframeType = "Custom" + TimeframeTypeMonthToDate TimeframeType = "MonthToDate" + TimeframeTypeTheLastBillingMonth TimeframeType = "TheLastBillingMonth" + TimeframeTypeTheLastMonth TimeframeType = "TheLastMonth" + TimeframeTypeWeekToDate TimeframeType = "WeekToDate" +) + +func PossibleValuesForTimeframeType() []string { + return []string{ + string(TimeframeTypeBillingMonthToDate), + string(TimeframeTypeCustom), + string(TimeframeTypeMonthToDate), + string(TimeframeTypeTheLastBillingMonth), + string(TimeframeTypeTheLastMonth), + string(TimeframeTypeWeekToDate), + } +} + +func parseTimeframeType(input string) (*TimeframeType, error) { + vals := map[string]TimeframeType{ + "billingmonthtodate": TimeframeTypeBillingMonthToDate, + "custom": TimeframeTypeCustom, + "monthtodate": TimeframeTypeMonthToDate, + "thelastbillingmonth": TimeframeTypeTheLastBillingMonth, + "thelastmonth": TimeframeTypeTheLastMonth, + "weektodate": TimeframeTypeWeekToDate, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TimeframeType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go new file mode 100644 index 000000000000..6c5f4a1dfb0d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go @@ -0,0 +1,110 @@ +package exports + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = ScopedExportId{} + +// ScopedExportId is a struct representing the Resource ID for a Scoped Export +type ScopedExportId struct { + Scope string + ExportName string +} + +// NewScopedExportID returns a new ScopedExportId struct +func NewScopedExportID(scope string, exportName string) ScopedExportId { + return ScopedExportId{ + Scope: scope, + ExportName: exportName, + } +} + +// ParseScopedExportID parses 'input' into a ScopedExportId +func ParseScopedExportID(input string) (*ScopedExportId, error) { + parser := resourceids.NewParserFromResourceIdType(ScopedExportId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ScopedExportId{} + + if id.Scope, ok = parsed.Parsed["scope"]; !ok { + return nil, fmt.Errorf("the segment 'scope' was not found in the resource id %q", input) + } + + if id.ExportName, ok = parsed.Parsed["exportName"]; !ok { + return nil, fmt.Errorf("the segment 'exportName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseScopedExportIDInsensitively parses 'input' case-insensitively into a ScopedExportId +// note: this method should only be used for API response data and not user input +func ParseScopedExportIDInsensitively(input string) (*ScopedExportId, error) { + parser := resourceids.NewParserFromResourceIdType(ScopedExportId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ScopedExportId{} + + if id.Scope, ok = parsed.Parsed["scope"]; !ok { + return nil, fmt.Errorf("the segment 'scope' was not found in the resource id %q", input) + } + + if id.ExportName, ok = parsed.Parsed["exportName"]; !ok { + return nil, fmt.Errorf("the segment 'exportName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateScopedExportID checks that 'input' can be parsed as a Scoped Export ID +func ValidateScopedExportID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseScopedExportID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Scoped Export ID +func (id ScopedExportId) ID() string { + fmtString := "/%s/providers/Microsoft.CostManagement/exports/%s" + return fmt.Sprintf(fmtString, strings.TrimPrefix(id.Scope, "/"), id.ExportName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Scoped Export ID +func (id ScopedExportId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.ScopeSegment("scope", "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCostManagement", "Microsoft.CostManagement", "Microsoft.CostManagement"), + resourceids.StaticSegment("staticExports", "exports", "exports"), + resourceids.UserSpecifiedSegment("exportName", "exportValue"), + } +} + +// String returns a human-readable description of this Scoped Export ID +func (id ScopedExportId) String() string { + components := []string{ + fmt.Sprintf("Scope: %q", id.Scope), + fmt.Sprintf("Export Name: %q", id.ExportName), + } + return fmt.Sprintf("Scoped Export (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate_autorest.go new file mode 100644 index 000000000000..86eb1416ecdc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package exports + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *Export +} + +// CreateOrUpdate ... +func (c ExportsClient) CreateOrUpdate(ctx context.Context, id ScopedExportId, input Export) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c ExportsClient) preparerForCreateOrUpdate(ctx context.Context, id ScopedExportId, input Export) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c ExportsClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_delete_autorest.go new file mode 100644 index 000000000000..60ee5b3426b9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_delete_autorest.go @@ -0,0 +1,66 @@ +package exports + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 ExportsClient) Delete(ctx context.Context, id ScopedExportId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c ExportsClient) preparerForDelete(ctx context.Context, id ScopedExportId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c ExportsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_execute_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_execute_autorest.go new file mode 100644 index 000000000000..4468e0c911d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_execute_autorest.go @@ -0,0 +1,67 @@ +package exports + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecuteOperationResponse struct { + HttpResponse *http.Response +} + +// Execute ... +func (c ExportsClient) Execute(ctx context.Context, id ScopedExportId) (result ExecuteOperationResponse, err error) { + req, err := c.preparerForExecute(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "Execute", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "Execute", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForExecute(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "Execute", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForExecute prepares the Execute request. +func (c ExportsClient) preparerForExecute(ctx context.Context, id ScopedExportId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/run", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForExecute handles the response to the Execute request. The method always +// closes the http.Response Body. +func (c ExportsClient) responderForExecute(resp *http.Response) (result ExecuteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_get_autorest.go new file mode 100644 index 000000000000..a65445b22a7a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_get_autorest.go @@ -0,0 +1,97 @@ +package exports + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *Export +} + +type GetOperationOptions struct { + Expand *string +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o GetOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Expand != nil { + out["$expand"] = *o.Expand + } + + return out +} + +// Get ... +func (c ExportsClient) Get(ctx context.Context, id ScopedExportId, options GetOperationOptions) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c ExportsClient) preparerForGet(ctx context.Context, id ScopedExportId, options GetOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c ExportsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory_autorest.go new file mode 100644 index 000000000000..bfb71da0ce89 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory_autorest.go @@ -0,0 +1,69 @@ +package exports + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetExecutionHistoryOperationResponse struct { + HttpResponse *http.Response + Model *ExportExecutionListResult +} + +// GetExecutionHistory ... +func (c ExportsClient) GetExecutionHistory(ctx context.Context, id ScopedExportId) (result GetExecutionHistoryOperationResponse, err error) { + req, err := c.preparerForGetExecutionHistory(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "GetExecutionHistory", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "GetExecutionHistory", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGetExecutionHistory(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "GetExecutionHistory", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGetExecutionHistory prepares the GetExecutionHistory request. +func (c ExportsClient) preparerForGetExecutionHistory(ctx context.Context, id ScopedExportId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/runHistory", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGetExecutionHistory handles the response to the GetExecutionHistory request. The method always +// closes the http.Response Body. +func (c ExportsClient) responderForGetExecutionHistory(resp *http.Response) (result GetExecutionHistoryOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_list_autorest.go new file mode 100644 index 000000000000..d9b422de4fcc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_list_autorest.go @@ -0,0 +1,99 @@ +package exports + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// 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 *ExportListResult +} + +type ListOperationOptions struct { + Expand *string +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Expand != nil { + out["$expand"] = *o.Expand + } + + return out +} + +// List ... +func (c ExportsClient) List(ctx context.Context, id commonids.ScopeId, options ListOperationOptions) (result ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "exports.ExportsClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForList prepares the List request. +func (c ExportsClient) preparerForList(ctx context.Context, id commonids.ScopeId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.CostManagement/exports", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c ExportsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_commonexportproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_commonexportproperties.go new file mode 100644 index 000000000000..814103b70a7d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_commonexportproperties.go @@ -0,0 +1,31 @@ +package exports + +import ( + "time" + + "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 CommonExportProperties struct { + Definition ExportDefinition `json:"definition"` + DeliveryInfo ExportDeliveryInfo `json:"deliveryInfo"` + Format *FormatType `json:"format,omitempty"` + NextRunTimeEstimate *string `json:"nextRunTimeEstimate,omitempty"` + PartitionData *bool `json:"partitionData,omitempty"` + RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"` +} + +func (o *CommonExportProperties) GetNextRunTimeEstimateAsTime() (*time.Time, error) { + if o.NextRunTimeEstimate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NextRunTimeEstimate, "2006-01-02T15:04:05Z07:00") +} + +func (o *CommonExportProperties) SetNextRunTimeEstimateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NextRunTimeEstimate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_errordetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_errordetails.go new file mode 100644 index 000000000000..def5fc753e17 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_errordetails.go @@ -0,0 +1,9 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetails struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_export.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_export.go new file mode 100644 index 000000000000..ea296361983c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_export.go @@ -0,0 +1,12 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Export struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ExportProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdataset.go new file mode 100644 index 000000000000..c4a8d5acdf87 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdataset.go @@ -0,0 +1,9 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportDataset struct { + Configuration *ExportDatasetConfiguration `json:"configuration,omitempty"` + Granularity *GranularityType `json:"granularity,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdatasetconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdatasetconfiguration.go new file mode 100644 index 000000000000..9acc4e43e924 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdatasetconfiguration.go @@ -0,0 +1,8 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportDatasetConfiguration struct { + Columns *[]string `json:"columns,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdefinition.go new file mode 100644 index 000000000000..d128ed638e62 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdefinition.go @@ -0,0 +1,11 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportDefinition struct { + DataSet *ExportDataset `json:"dataSet,omitempty"` + TimePeriod *ExportTimePeriod `json:"timePeriod,omitempty"` + Timeframe TimeframeType `json:"timeframe"` + Type ExportType `json:"type"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliverydestination.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliverydestination.go new file mode 100644 index 000000000000..56cff46854a7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliverydestination.go @@ -0,0 +1,12 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportDeliveryDestination struct { + Container string `json:"container"` + ResourceId *string `json:"resourceId,omitempty"` + RootFolderPath *string `json:"rootFolderPath,omitempty"` + SasToken *string `json:"sasToken,omitempty"` + StorageAccount *string `json:"storageAccount,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliveryinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliveryinfo.go new file mode 100644 index 000000000000..204ca440e9fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliveryinfo.go @@ -0,0 +1,8 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportDeliveryInfo struct { + Destination ExportDeliveryDestination `json:"destination"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecution.go new file mode 100644 index 000000000000..5cddc2df1e6b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecution.go @@ -0,0 +1,12 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportExecution struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ExportExecutionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionlistresult.go new file mode 100644 index 000000000000..a07b784ea303 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionlistresult.go @@ -0,0 +1,8 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportExecutionListResult struct { + Value *[]ExportExecution `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionproperties.go new file mode 100644 index 000000000000..c29e900fc3dc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionproperties.go @@ -0,0 +1,58 @@ +package exports + +import ( + "time" + + "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 ExportExecutionProperties struct { + Error *ErrorDetails `json:"error,omitempty"` + ExecutionType *ExecutionType `json:"executionType,omitempty"` + FileName *string `json:"fileName,omitempty"` + ProcessingEndTime *string `json:"processingEndTime,omitempty"` + ProcessingStartTime *string `json:"processingStartTime,omitempty"` + RunSettings *CommonExportProperties `json:"runSettings,omitempty"` + Status *ExecutionStatus `json:"status,omitempty"` + SubmittedBy *string `json:"submittedBy,omitempty"` + SubmittedTime *string `json:"submittedTime,omitempty"` +} + +func (o *ExportExecutionProperties) GetProcessingEndTimeAsTime() (*time.Time, error) { + if o.ProcessingEndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ProcessingEndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportExecutionProperties) SetProcessingEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ProcessingEndTime = &formatted +} + +func (o *ExportExecutionProperties) GetProcessingStartTimeAsTime() (*time.Time, error) { + if o.ProcessingStartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ProcessingStartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportExecutionProperties) SetProcessingStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ProcessingStartTime = &formatted +} + +func (o *ExportExecutionProperties) GetSubmittedTimeAsTime() (*time.Time, error) { + if o.SubmittedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.SubmittedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportExecutionProperties) SetSubmittedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.SubmittedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportlistresult.go new file mode 100644 index 000000000000..6e50ebcc2836 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportlistresult.go @@ -0,0 +1,8 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportListResult struct { + Value *[]Export `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportproperties.go new file mode 100644 index 000000000000..13dbc84cd87d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportproperties.go @@ -0,0 +1,32 @@ +package exports + +import ( + "time" + + "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 ExportProperties struct { + Definition ExportDefinition `json:"definition"` + DeliveryInfo ExportDeliveryInfo `json:"deliveryInfo"` + Format *FormatType `json:"format,omitempty"` + NextRunTimeEstimate *string `json:"nextRunTimeEstimate,omitempty"` + PartitionData *bool `json:"partitionData,omitempty"` + RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"` + Schedule *ExportSchedule `json:"schedule,omitempty"` +} + +func (o *ExportProperties) GetNextRunTimeEstimateAsTime() (*time.Time, error) { + if o.NextRunTimeEstimate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NextRunTimeEstimate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportProperties) SetNextRunTimeEstimateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NextRunTimeEstimate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportrecurrenceperiod.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportrecurrenceperiod.go new file mode 100644 index 000000000000..b78c9ceddfee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportrecurrenceperiod.go @@ -0,0 +1,36 @@ +package exports + +import ( + "time" + + "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 ExportRecurrencePeriod struct { + From string `json:"from"` + To *string `json:"to,omitempty"` +} + +func (o *ExportRecurrencePeriod) GetFromAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.From, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportRecurrencePeriod) SetFromAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.From = formatted +} + +func (o *ExportRecurrencePeriod) GetToAsTime() (*time.Time, error) { + if o.To == nil { + return nil, nil + } + return dates.ParseAsFormat(o.To, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportRecurrencePeriod) SetToAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.To = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportschedule.go new file mode 100644 index 000000000000..d9a1f5757c78 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportschedule.go @@ -0,0 +1,10 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportSchedule struct { + Recurrence *RecurrenceType `json:"recurrence,omitempty"` + RecurrencePeriod *ExportRecurrencePeriod `json:"recurrencePeriod,omitempty"` + Status *StatusType `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exporttimeperiod.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exporttimeperiod.go new file mode 100644 index 000000000000..82751bd3d6a7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exporttimeperiod.go @@ -0,0 +1,33 @@ +package exports + +import ( + "time" + + "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 ExportTimePeriod struct { + From string `json:"from"` + To string `json:"to"` +} + +func (o *ExportTimePeriod) GetFromAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.From, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportTimePeriod) SetFromAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.From = formatted +} + +func (o *ExportTimePeriod) GetToAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.To, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportTimePeriod) SetToAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.To = formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/version.go new file mode 100644 index 000000000000..96be6d93da3f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/version.go @@ -0,0 +1,12 @@ +package exports + +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-10-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/exports/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index bd079ce292b2..acd4583f2050 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -13,7 +13,6 @@ github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-11-01/compute github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2019-10-01/consumption github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2019-08-01/containerservice github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2021-10-15/documentdb -github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2020-06-01/costmanagement github.com/Azure/azure-sdk-for-go/services/databoxedge/mgmt/2020-12-01/databoxedge github.com/Azure/azure-sdk-for-go/services/datadog/mgmt/2021-03-01/datadog github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2018-06-01/datafactory @@ -209,6 +208,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityp github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2021-03-01/containerinstance +github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2021-04-01-preview/workspaces github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application From c0ad7835c4a70e70410511f295767b343e90cb73 Mon Sep 17 00:00:00 2001 From: stephybun Date: Fri, 12 Aug 2022 19:09:01 +0200 Subject: [PATCH 095/100] `mariadb` - switch to `go-azure-sdk` (#17939) * rebase * remove unused parse and validation functions * vendor * bump server create timeout to 90 minutes --- internal/services/mariadb/client/client.go | 26 +- .../mariadb/mariadb_configuration_resource.go | 70 +- .../mariadb_configuration_resource_test.go | 64 +- .../mariadb/mariadb_database_resource.go | 68 +- .../mariadb/mariadb_database_resource_test.go | 8 +- .../mariadb/mariadb_firewall_rule_resource.go | 58 +- .../mariadb_firewall_rule_resource_test.go | 8 +- .../mariadb/mariadb_server_data_source.go | 65 +- .../mariadb/mariadb_server_resource.go | 272 +- .../mariadb/mariadb_server_resource_test.go | 10 +- .../mariadb_virtual_network_rule_resource.go | 73 +- ...iadb_virtual_network_rule_resource_test.go | 8 +- .../mariadb/parse/maria_db_configuration.go | 75 - .../parse/maria_db_configuration_test.go | 128 - .../mariadb/parse/maria_db_database.go | 75 - .../mariadb/parse/maria_db_database_test.go | 128 - .../mariadb/parse/maria_db_firewall_rule.go | 75 - .../parse/maria_db_firewall_rule_test.go | 128 - .../parse/maria_db_virtual_network_rule.go | 75 - .../maria_db_virtual_network_rule_test.go | 128 - internal/services/mariadb/parse/server.go | 69 - .../services/mariadb/parse/server_test.go | 112 - internal/services/mariadb/resourceids.go | 7 - .../validate/maria_db_configuration_id.go | 23 - .../maria_db_configuration_id_test.go | 88 - .../mariadb/validate/maria_db_database_id.go | 23 - .../validate/maria_db_database_id_test.go | 88 - .../validate/maria_db_firewall_rule_id.go | 23 - .../maria_db_firewall_rule_id_test.go | 88 - .../maria_db_virtual_network_rule_id.go | 23 - .../maria_db_virtual_network_rule_id_test.go | 88 - .../services/mariadb/validate/server_id.go | 23 - .../mariadb/validate/server_id_test.go | 76 - .../network/private_endpoint_resource.go | 6 +- .../mgmt/2018-06-01/mariadb/CHANGELOG.md | 2 - .../mgmt/2018-06-01/mariadb/_meta.json | 11 - .../mgmt/2018-06-01/mariadb/advisors.go | 250 - .../mariadb/checknameavailability.go | 118 - .../mariadb/mgmt/2018-06-01/mariadb/client.go | 140 - .../mgmt/2018-06-01/mariadb/configurations.go | 302 -- .../mgmt/2018-06-01/mariadb/databases.go | 392 -- .../mariadb/mgmt/2018-06-01/mariadb/enums.go | 245 - .../mgmt/2018-06-01/mariadb/firewallrules.go | 399 -- .../mariadb/locationbasedperformancetier.go | 115 - ...ecommendedactionsessionsoperationstatus.go | 118 - ...ionbasedrecommendedactionsessionsresult.go | 160 - .../mgmt/2018-06-01/mariadb/logfiles.go | 120 - .../mariadb/mgmt/2018-06-01/mariadb/models.go | 4337 ----------------- .../mgmt/2018-06-01/mariadb/operations.go | 100 - .../mariadb/privateendpointconnections.go | 532 -- .../mariadb/privatelinkresources.go | 251 - .../mgmt/2018-06-01/mariadb/querytexts.go | 254 - .../2018-06-01/mariadb/recommendedactions.go | 259 - .../mgmt/2018-06-01/mariadb/replicas.go | 120 - .../mgmt/2018-06-01/mariadb/servers.go | 649 --- .../mariadb/serversecurityalertpolicies.go | 215 - .../2018-06-01/mariadb/topquerystatistics.go | 263 - .../mgmt/2018-06-01/mariadb/version.go | 19 - .../2018-06-01/mariadb/virtualnetworkrules.go | 438 -- .../mgmt/2018-06-01/mariadb/waitstatistics.go | 259 - .../2018-06-01/configurations/README.md | 69 + .../2018-06-01/configurations/client.go | 18 + .../configurations/id_configuration.go | 137 + .../2018-06-01/configurations/id_server.go | 124 + .../method_createorupdate_autorest.go | 79 + .../configurations/method_get_autorest.go | 68 + .../method_listbyserver_autorest.go | 69 + .../configurations/model_configuration.go | 11 + .../model_configurationlistresult.go | 8 + .../model_configurationproperties.go | 13 + .../2018-06-01/configurations/version.go | 12 + .../mariadb/2018-06-01/databases/README.md | 81 + .../mariadb/2018-06-01/databases/client.go | 18 + .../2018-06-01/databases/id_database.go | 137 + .../mariadb/2018-06-01/databases/id_server.go | 124 + .../method_createorupdate_autorest.go | 79 + .../databases/method_delete_autorest.go | 78 + .../databases/method_get_autorest.go | 68 + .../databases/method_listbyserver_autorest.go | 69 + .../2018-06-01/databases/model_database.go | 11 + .../databases/model_databaselistresult.go | 8 + .../databases/model_databaseproperties.go | 9 + .../mariadb/2018-06-01/databases/version.go | 12 + .../2018-06-01/firewallrules/README.md | 81 + .../2018-06-01/firewallrules/client.go | 18 + .../firewallrules/id_firewallrule.go | 137 + .../2018-06-01/firewallrules/id_server.go | 124 + .../method_createorupdate_autorest.go | 79 + .../firewallrules/method_delete_autorest.go | 78 + .../firewallrules/method_get_autorest.go | 68 + .../method_listbyserver_autorest.go | 69 + .../firewallrules/model_firewallrule.go | 11 + .../model_firewallrulelistresult.go | 8 + .../model_firewallruleproperties.go | 9 + .../2018-06-01/firewallrules/version.go | 12 + .../mariadb/2018-06-01/servers/README.md | 114 + .../mariadb/2018-06-01/servers/client.go | 18 + .../mariadb/2018-06-01/servers/constants.go | 372 ++ .../mariadb/2018-06-01/servers/id_server.go | 124 + .../servers/method_create_autorest.go | 79 + .../servers/method_delete_autorest.go | 78 + .../2018-06-01/servers/method_get_autorest.go | 68 + .../servers/method_list_autorest.go | 70 + .../method_listbyresourcegroup_autorest.go | 70 + .../servers/method_update_autorest.go | 79 + .../servers/model_privateendpointproperty.go | 8 + .../2018-06-01/servers/model_server.go | 14 + .../servers/model_serverforcreate.go | 44 + .../servers/model_serverlistresult.go | 8 + .../model_serverprivateendpointconnection.go | 9 + ...rverprivateendpointconnectionproperties.go | 10 + ...ivatelinkserviceconnectionstateproperty.go | 10 + .../servers/model_serverproperties.go | 38 + .../model_serverpropertiesforcreate.go | 72 + .../model_serverpropertiesfordefaultcreate.go | 47 + .../model_serverpropertiesforgeorestore.go | 46 + .../model_serverpropertiesforreplica.go | 46 + .../model_serverpropertiesforrestore.go | 47 + .../servers/model_serverupdateparameters.go | 10 + .../model_serverupdateparametersproperties.go | 14 + .../mariadb/2018-06-01/servers/model_sku.go | 12 + .../servers/model_storageprofile.go | 11 + .../mariadb/2018-06-01/servers/version.go | 12 + .../2018-06-01/virtualnetworkrules/README.md | 82 + .../2018-06-01/virtualnetworkrules/client.go | 18 + .../virtualnetworkrules/constants.go | 43 + .../virtualnetworkrules/id_server.go | 124 + .../id_virtualnetworkrule.go | 137 + .../method_createorupdate_autorest.go | 79 + .../method_delete_autorest.go | 78 + .../method_get_autorest.go | 68 + .../method_listbyserver_autorest.go | 186 + .../model_virtualnetworkrule.go | 11 + .../model_virtualnetworkruleproperties.go | 10 + .../virtualnetworkrules/predicates.go | 24 + .../2018-06-01/virtualnetworkrules/version.go | 12 + vendor/modules.txt | 6 +- 137 files changed, 4799 insertions(+), 11952 deletions(-) delete mode 100644 internal/services/mariadb/parse/maria_db_configuration.go delete mode 100644 internal/services/mariadb/parse/maria_db_configuration_test.go delete mode 100644 internal/services/mariadb/parse/maria_db_database.go delete mode 100644 internal/services/mariadb/parse/maria_db_database_test.go delete mode 100644 internal/services/mariadb/parse/maria_db_firewall_rule.go delete mode 100644 internal/services/mariadb/parse/maria_db_firewall_rule_test.go delete mode 100644 internal/services/mariadb/parse/maria_db_virtual_network_rule.go delete mode 100644 internal/services/mariadb/parse/maria_db_virtual_network_rule_test.go delete mode 100644 internal/services/mariadb/parse/server.go delete mode 100644 internal/services/mariadb/parse/server_test.go delete mode 100644 internal/services/mariadb/resourceids.go delete mode 100644 internal/services/mariadb/validate/maria_db_configuration_id.go delete mode 100644 internal/services/mariadb/validate/maria_db_configuration_id_test.go delete mode 100644 internal/services/mariadb/validate/maria_db_database_id.go delete mode 100644 internal/services/mariadb/validate/maria_db_database_id_test.go delete mode 100644 internal/services/mariadb/validate/maria_db_firewall_rule_id.go delete mode 100644 internal/services/mariadb/validate/maria_db_firewall_rule_id_test.go delete mode 100644 internal/services/mariadb/validate/maria_db_virtual_network_rule_id.go delete mode 100644 internal/services/mariadb/validate/maria_db_virtual_network_rule_id_test.go delete mode 100644 internal/services/mariadb/validate/server_id.go delete mode 100644 internal/services/mariadb/validate/server_id_test.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/CHANGELOG.md delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/_meta.json delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/advisors.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/checknameavailability.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/client.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/configurations.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/databases.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/enums.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/firewallrules.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedperformancetier.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsoperationstatus.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsresult.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/logfiles.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/models.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/operations.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/privateendpointconnections.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/privatelinkresources.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/querytexts.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/recommendedactions.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/replicas.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/servers.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/serversecurityalertpolicies.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/topquerystatistics.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/version.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/virtualnetworkrules.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/waitstatistics.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_createorupdate_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_get_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configuration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationlistresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_createorupdate_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_delete_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_get_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_listbyserver_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_database.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaselistresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaseproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_createorupdate_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_delete_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_get_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrule.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrulelistresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallruleproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/id_server.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_create_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_delete_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_get_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_list_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_listbyresourcegroup_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_update_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_privateendpointproperty.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_server.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverforcreate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverlistresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivateendpointconnection.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivateendpointconnectionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivatelinkserviceconnectionstateproperty.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforcreate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesfordefaultcreate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforgeorestore.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforreplica.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforrestore.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverupdateparameters.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverupdateparametersproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_sku.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_storageprofile.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_createorupdate_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_delete_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_listbyserver_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkrule.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkruleproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go diff --git a/internal/services/mariadb/client/client.go b/internal/services/mariadb/client/client.go index 0e1cb2344c0d..deba55b33098 100644 --- a/internal/services/mariadb/client/client.go +++ b/internal/services/mariadb/client/client.go @@ -1,32 +1,36 @@ package client import ( - "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { - ConfigurationsClient *mariadb.ConfigurationsClient - DatabasesClient *mariadb.DatabasesClient - FirewallRulesClient *mariadb.FirewallRulesClient - ServersClient *mariadb.ServersClient - VirtualNetworkRulesClient *mariadb.VirtualNetworkRulesClient + ConfigurationsClient *configurations.ConfigurationsClient + DatabasesClient *databases.DatabasesClient + FirewallRulesClient *firewallrules.FirewallRulesClient + ServersClient *servers.ServersClient + VirtualNetworkRulesClient *virtualnetworkrules.VirtualNetworkRulesClient } func NewClient(o *common.ClientOptions) *Client { - configurationsClient := mariadb.NewConfigurationsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + configurationsClient := configurations.NewConfigurationsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&configurationsClient.Client, o.ResourceManagerAuthorizer) - DatabasesClient := mariadb.NewDatabasesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + DatabasesClient := databases.NewDatabasesClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&DatabasesClient.Client, o.ResourceManagerAuthorizer) - FirewallRulesClient := mariadb.NewFirewallRulesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + FirewallRulesClient := firewallrules.NewFirewallRulesClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&FirewallRulesClient.Client, o.ResourceManagerAuthorizer) - ServersClient := mariadb.NewServersClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + ServersClient := servers.NewServersClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&ServersClient.Client, o.ResourceManagerAuthorizer) - VirtualNetworkRulesClient := mariadb.NewVirtualNetworkRulesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + VirtualNetworkRulesClient := virtualnetworkrules.NewVirtualNetworkRulesClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&VirtualNetworkRulesClient.Client, o.ResourceManagerAuthorizer) return &Client{ diff --git a/internal/services/mariadb/mariadb_configuration_resource.go b/internal/services/mariadb/mariadb_configuration_resource.go index abedc306decc..f16ad1325046 100644 --- a/internal/services/mariadb/mariadb_configuration_resource.go +++ b/internal/services/mariadb/mariadb_configuration_resource.go @@ -5,10 +5,10 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -22,7 +22,7 @@ func resourceMariaDbConfiguration() *pluginsdk.Resource { Read: resourceMariaDbConfigurationRead, Delete: resourceMariaDbConfigurationDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.MariaDBConfigurationID(id) + _, err := configurations.ParseConfigurationID(id) return err }), @@ -65,23 +65,17 @@ func resourceMariaDbConfigurationCreateUpdate(d *pluginsdk.ResourceData, meta in ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - log.Printf("[INFO] preparing arguments for AzureRM MariaDb Configuration creation.") - id := parse.NewMariaDBConfigurationID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) + id := configurations.NewConfigurationID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) value := d.Get("value").(string) - properties := mariadb.Configuration{ - ConfigurationProperties: &mariadb.ConfigurationProperties{ + properties := configurations.Configuration{ + Properties: &configurations.ConfigurationProperties{ Value: utils.String(value), }, } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.ConfigurationName, properties) - if err != nil { - return fmt.Errorf("issuing create/update request for %s: %v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for create/update of %s: %v", id, err) + if err := client.CreateOrUpdateThenPoll(ctx, id, properties); err != nil { + return fmt.Errorf("creating/updating %s: %+v", id, err) } d.SetId(id.ID()) @@ -94,26 +88,35 @@ func resourceMariaDbConfigurationRead(d *pluginsdk.ResourceData, meta interface{ ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.MariaDBConfigurationID(d.Id()) + id, err := configurations.ParseConfigurationID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.ConfigurationName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[WARN] %s was not found", *id) d.SetId("") return nil } - return fmt.Errorf("making Read request on %s: %+v", *id, err) + return fmt.Errorf("retrieving %s: %+v", *id, err) } d.Set("name", id.ConfigurationName) d.Set("server_name", id.ServerName) - d.Set("resource_group_name", id.ResourceGroup) - d.Set("value", resp.ConfigurationProperties.Value) + d.Set("resource_group_name", id.ResourceGroupName) + + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + value := "" + if v := props.Value; v != nil { + value = *v + } + d.Set("value", value) + } + } return nil } @@ -123,28 +126,37 @@ func resourceMariaDbConfigurationDelete(d *pluginsdk.ResourceData, meta interfac ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.MariaDBConfigurationID(d.Id()) + id, err := configurations.ParseConfigurationID(d.Id()) if err != nil { return err } // "delete" = resetting this to the default value - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.ConfigurationName) + resp, err := client.Get(ctx, *id) if err != nil { return fmt.Errorf("retrieving %s: %+v", *id, err) } - properties := mariadb.Configuration{ - ConfigurationProperties: &mariadb.ConfigurationProperties{ + defaultValue := "" + + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + if v := props.DefaultValue; v != nil { + defaultValue = *v + } + } + } + + properties := configurations.Configuration{ + Properties: &configurations.ConfigurationProperties{ // we can alternatively set `source: "system-default"` - Value: resp.DefaultValue, + Value: &defaultValue, }, } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.ConfigurationName, properties) - if err != nil { - return err + if err := client.CreateOrUpdateThenPoll(ctx, *id, properties); err != nil { + return fmt.Errorf("deleting %s: %+v", id, err) } - return future.WaitForCompletionRef(ctx, client.Client) + return nil } diff --git a/internal/services/mariadb/mariadb_configuration_resource_test.go b/internal/services/mariadb/mariadb_configuration_resource_test.go index b6ec842f3a80..70af8fccc732 100644 --- a/internal/services/mariadb/mariadb_configuration_resource_test.go +++ b/internal/services/mariadb/mariadb_configuration_resource_test.go @@ -5,9 +5,10 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -84,39 +85,41 @@ func TestAccMariaDbConfiguration_logSlowAdminStatements(t *testing.T) { } func (MariaDbConfigurationResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.MariaDBConfigurationID(state.ID) + id, err := configurations.ParseConfigurationID(state.ID) if err != nil { return nil, err } - resp, err := clients.MariaDB.ConfigurationsClient.Get(ctx, id.ResourceGroup, id.ServerName, id.ConfigurationName) + resp, err := clients.MariaDB.ConfigurationsClient.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %v", *id, err) } - return utils.Bool(resp.ConfigurationProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func checkValueIs(value string) acceptance.ClientCheckFunc { return func(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) error { - id, err := parse.MariaDBConfigurationID(state.ID) + id, err := configurations.ParseConfigurationID(state.ID) if err != nil { return err } - resp, err := clients.MariaDB.ConfigurationsClient.Get(ctx, id.ResourceGroup, id.ServerName, id.ConfigurationName) + resp, err := clients.MariaDB.ConfigurationsClient.Get(ctx, *id) if err != nil { return fmt.Errorf("retrieving %s: %v", *id, err) } - if resp.Value == nil { - return fmt.Errorf("%s Value is nil", *id) - } - - actualValue := *resp.Value - - if value != actualValue { - return fmt.Errorf("%s Value (%s) != expected (%s)", *id, actualValue, value) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + if v := props.Value; v != nil { + if value != *v { + return fmt.Errorf("%s Value (%s) != expected (%s)", *id, *v, value) + } + } else { + return fmt.Errorf("%s Value is nil", *id) + } + } } return nil @@ -125,28 +128,41 @@ func checkValueIs(value string) acceptance.ClientCheckFunc { func checkValueIsReset(configurationName string) acceptance.ClientCheckFunc { return func(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) error { - id, err := parse.ServerID(state.ID) + serverId, err := servers.ParseServerID(state.ID) if err != nil { return err } - resp, err := clients.MariaDB.ConfigurationsClient.Get(ctx, id.ResourceGroup, id.Name, configurationName) + id := configurations.NewConfigurationID(serverId.SubscriptionId, serverId.ResourceGroupName, serverId.ServerName, configurationName) + + resp, err := clients.MariaDB.ConfigurationsClient.Get(ctx, id) if err != nil { - return fmt.Errorf("retrieving MariaDB Configuration %q (Server %q / Resource Group %q): %v", configurationName, id.Name, id.ResourceGroup, err) + return fmt.Errorf("retrieving %s: %v", id, err) + } + + actualValue := "" + defaultValue := "" + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + if v := props.Value; v != nil { + actualValue = *v + } + if v := props.DefaultValue; v != nil { + defaultValue = *v + } + } } - if resp.Value == nil { - return fmt.Errorf("MariaDB Configuration %q (Server %q / Resource Group %q) Value is nil", configurationName, id.Name, id.ResourceGroup) + if actualValue == "" { + return fmt.Errorf("%s Value is nil", id) } - if resp.DefaultValue == nil { - return fmt.Errorf("MariaDB Configuration %q (Server %q / Resource Group %q) Default Value is nil", configurationName, id.Name, id.ResourceGroup) + if defaultValue == "" { + return fmt.Errorf("%s Default Value is nil", id) } - actualValue := *resp.Value - defaultValue := *resp.DefaultValue if defaultValue != actualValue { - return fmt.Errorf("MariaDB Configuration %q (Server %q / Resource Group %q) Value (%s) != Default (%s)", configurationName, id.Name, id.ResourceGroup, actualValue, defaultValue) + return fmt.Errorf("%s Value (%s) != Default (%s)", id, actualValue, defaultValue) } return nil diff --git a/internal/services/mariadb/mariadb_database_resource.go b/internal/services/mariadb/mariadb_database_resource.go index 4c3226a63ecf..391a05b861df 100644 --- a/internal/services/mariadb/mariadb_database_resource.go +++ b/internal/services/mariadb/mariadb_database_resource.go @@ -6,11 +6,11 @@ import ( "regexp" "time" - "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -25,7 +25,7 @@ func resourceMariaDbDatabase() *pluginsdk.Resource { Delete: resourceMariaDbDatabaseDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.MariaDBDatabaseID(id) + _, err := databases.ParseDatabaseID(id) return err }), @@ -87,17 +87,17 @@ func resourceMariaDbDatabaseCreateUpdate(d *pluginsdk.ResourceData, meta interfa log.Printf("[INFO] preparing arguments for AzureRM MariaDB database creation") - id := parse.NewMariaDBDatabaseID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) + id := databases.NewDatabaseID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %s", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_mariadb_database", id.ID()) } } @@ -105,22 +105,17 @@ func resourceMariaDbDatabaseCreateUpdate(d *pluginsdk.ResourceData, meta interfa charset := d.Get("charset").(string) collation := d.Get("collation").(string) - properties := mariadb.Database{ - DatabaseProperties: &mariadb.DatabaseProperties{ + properties := databases.Database{ + Properties: &databases.DatabaseProperties{ Charset: utils.String(charset), Collation: utils.String(collation), }, } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName, properties) - if err != nil { + if err := client.CreateOrUpdateThenPoll(ctx, id, properties); err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for completion of %s: %+v", id, err) - } - d.SetId(id.ID()) return resourceMariaDbDatabaseRead(d, meta) @@ -131,31 +126,43 @@ func resourceMariaDbDatabaseRead(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.MariaDBDatabaseID(d.Id()) + id, err := databases.ParseDatabaseID(d.Id()) if err != nil { - return fmt.Errorf("cannot parse MariaDB database %q ID:\n%+v", d.Id(), err) + return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[WARN] %s was not found", *id) d.SetId("") return nil } - return fmt.Errorf("making read request on %s:\n%+v", *id, err) + return fmt.Errorf("retrieving %s: %+v", *id, err) } d.Set("name", id.DatabaseName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("server_name", id.ServerName) - if properties := resp.DatabaseProperties; properties != nil { - d.Set("charset", properties.Charset) - d.Set("collation", properties.Collation) + charset := "" + collation := "" + + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + if v := props.Charset; v != nil { + charset = *v + } + if v := props.Collation; v != nil { + collation = *v + } + } } + d.Set("charset", charset) + d.Set("collation", collation) + return nil } @@ -164,18 +171,13 @@ func resourceMariaDbDatabaseDelete(d *pluginsdk.ResourceData, meta interface{}) ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.MariaDBDatabaseID(d.Id()) - if err != nil { - return fmt.Errorf("cannot parse MariaDB database %q ID:\n%+v", d.Id(), err) - } - - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName) + id, err := databases.ParseDatabaseID(d.Id()) if err != nil { - return fmt.Errorf("making delete request on %s:\n%+v", *id, err) + return err } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for deletion of %s:\n%+v", *id, err) + if err := client.DeleteThenPoll(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", *id, err) } return nil diff --git a/internal/services/mariadb/mariadb_database_resource_test.go b/internal/services/mariadb/mariadb_database_resource_test.go index 1c67f2b7fbed..6a124f3a00a6 100644 --- a/internal/services/mariadb/mariadb_database_resource_test.go +++ b/internal/services/mariadb/mariadb_database_resource_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -51,17 +51,17 @@ func TestAccMariaDbDatabase_requiresImport(t *testing.T) { } func (MariaDbDatabaseResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.MariaDBDatabaseID(state.ID) + id, err := databases.ParseDatabaseID(state.ID) if err != nil { return nil, err } - resp, err := clients.MariaDB.DatabasesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.DatabaseName) + resp, err := clients.MariaDB.DatabasesClient.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %v", *id, err) } - return utils.Bool(resp.DatabaseProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (MariaDbDatabaseResource) basic(data acceptance.TestData) string { diff --git a/internal/services/mariadb/mariadb_firewall_rule_resource.go b/internal/services/mariadb/mariadb_firewall_rule_resource.go index 50a217f36203..14a9a8fc64bb 100644 --- a/internal/services/mariadb/mariadb_firewall_rule_resource.go +++ b/internal/services/mariadb/mariadb_firewall_rule_resource.go @@ -5,16 +5,15 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func resourceArmMariaDBFirewallRule() *pluginsdk.Resource { @@ -24,7 +23,7 @@ func resourceArmMariaDBFirewallRule() *pluginsdk.Resource { Update: resourceArmMariaDBFirewallRuleCreateUpdate, Delete: resourceArmMariaDBFirewallRuleDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.MariaDBFirewallRuleID(id) + _, err := firewallrules.ParseFirewallRuleID(id) return err }), @@ -75,37 +74,32 @@ func resourceArmMariaDBFirewallRuleCreateUpdate(d *pluginsdk.ResourceData, meta log.Printf("[INFO] preparing arguments for AzureRM MariaDB Firewall Rule creation.") - id := parse.NewMariaDBFirewallRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) + id := firewallrules.NewFirewallRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) startIPAddress := d.Get("start_ip_address").(string) endIPAddress := d.Get("end_ip_address").(string) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.FirewallRuleName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_mariadb_firewall_rule", id.ID()) } } - properties := mariadb.FirewallRule{ - FirewallRuleProperties: &mariadb.FirewallRuleProperties{ - StartIPAddress: utils.String(startIPAddress), - EndIPAddress: utils.String(endIPAddress), + properties := firewallrules.FirewallRule{ + Properties: firewallrules.FirewallRuleProperties{ + StartIPAddress: startIPAddress, + EndIPAddress: endIPAddress, }, } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.FirewallRuleName, properties) - if err != nil { - return fmt.Errorf("issuing create/update request for %s: %v", id, err) - } - - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting on create/update future for %s: %v", id, err) + if err := client.CreateOrUpdateThenPoll(ctx, id, properties); err != nil { + return fmt.Errorf("creating/updated %s: %v", id, err) } d.SetId(id.ID()) @@ -118,25 +112,28 @@ func resourceArmMariaDBFirewallRuleRead(d *pluginsdk.ResourceData, meta interfac ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.MariaDBFirewallRuleID(d.Id()) + id, err := firewallrules.ParseFirewallRuleID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.FirewallRuleName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { d.SetId("") return nil } - return fmt.Errorf("making Read request on %s: %+v", *id, err) + return fmt.Errorf("retrieving %s: %+v", *id, err) } d.Set("name", id.FirewallRuleName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("server_name", id.ServerName) - d.Set("start_ip_address", resp.StartIPAddress) - d.Set("end_ip_address", resp.EndIPAddress) + + if model := resp.Model; model != nil { + d.Set("start_ip_address", model.Properties.StartIPAddress) + d.Set("end_ip_address", model.Properties.EndIPAddress) + } return nil } @@ -146,15 +143,14 @@ func resourceArmMariaDBFirewallRuleDelete(d *pluginsdk.ResourceData, meta interf ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.MariaDBFirewallRuleID(d.Id()) + id, err := firewallrules.ParseFirewallRuleID(d.Id()) if err != nil { return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.FirewallRuleName) - if err != nil { - return err + if err := client.DeleteThenPoll(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", *id, err) } - return future.WaitForCompletionRef(ctx, client.Client) + return nil } diff --git a/internal/services/mariadb/mariadb_firewall_rule_resource_test.go b/internal/services/mariadb/mariadb_firewall_rule_resource_test.go index b0e1b50c8c61..0dcfa0c465dd 100644 --- a/internal/services/mariadb/mariadb_firewall_rule_resource_test.go +++ b/internal/services/mariadb/mariadb_firewall_rule_resource_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -49,17 +49,17 @@ func TestAccMariaDbFirewallRule_requiresImport(t *testing.T) { } func (MariaDbFirewallRuleResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.MariaDBFirewallRuleID(state.ID) + id, err := firewallrules.ParseFirewallRuleID(state.ID) if err != nil { return nil, err } - resp, err := clients.MariaDB.FirewallRulesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.FirewallRuleName) + resp, err := clients.MariaDB.FirewallRulesClient.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %v", *id, err) } - return utils.Bool(resp.FirewallRuleProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (MariaDbFirewallRuleResource) basic(data acceptance.TestData) string { diff --git a/internal/services/mariadb/mariadb_server_data_source.go b/internal/services/mariadb/mariadb_server_data_source.go index 287aef2f68e1..180c47d9f7c3 100644 --- a/internal/services/mariadb/mariadb_server_data_source.go +++ b/internal/services/mariadb/mariadb_server_data_source.go @@ -5,15 +5,15 @@ import ( "regexp" "time" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func dataSourceMariaDbServer() *pluginsdk.Resource { @@ -91,7 +91,7 @@ func dataSourceMariaDbServer() *pluginsdk.Resource { Computed: true, }, - "tags": tags.SchemaDataSource(), + "tags": commonschema.TagsDataSource(), }, } } @@ -102,10 +102,10 @@ func dataSourceMariaDbServerRead(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewServerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - resp, err := client.Get(ctx, id.ResourceGroup, id.Name) + id := servers.NewServerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) + resp, err := client.Get(ctx, id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return fmt.Errorf("%s was not found", id) } @@ -113,18 +113,45 @@ func dataSourceMariaDbServerRead(d *pluginsdk.ResourceData, meta interface{}) er } d.SetId(id.ID()) - d.Set("name", id.Name) - d.Set("resource_group_name", id.ResourceGroup) - d.Set("location", location.NormalizeNilable(resp.Location)) - if sku := resp.Sku; sku != nil { - d.Set("sku_name", sku.Name) - } + d.Set("name", id.ServerName) + d.Set("resource_group_name", id.ResourceGroupName) + + if model := resp.Model; model != nil { + d.Set("location", location.Normalize(model.Location)) + + if sku := model.Sku; sku != nil { + d.Set("sku_name", sku.Name) + } - if props := resp.ServerProperties; props != nil { - d.Set("administrator_login", props.AdministratorLogin) - d.Set("fqdn", props.FullyQualifiedDomainName) - d.Set("ssl_enforcement", string(props.SslEnforcement)) - d.Set("version", string(props.Version)) + if props := model.Properties; props != nil { + adminLogin := "" + if v := props.AdministratorLogin; v != nil { + adminLogin = *v + } + + fqdn := "" + if v := props.FullyQualifiedDomainName; v != nil { + fqdn = *v + } + + sslEnforcement := "" + if v := props.SslEnforcement; v != nil { + sslEnforcement = string(*v) + } + + version := "" + if v := props.Version; v != nil { + version = string(*v) + } + + d.Set("administrator_login", adminLogin) + d.Set("fqdn", fqdn) + d.Set("ssl_enforcement", sslEnforcement) + d.Set("version", version) + } + + return tags.FlattenAndSet(d, model.Tags) } - return tags.FlattenAndSet(d, resp.Tags) + + return nil } diff --git a/internal/services/mariadb/mariadb_server_resource.go b/internal/services/mariadb/mariadb_server_resource.go index 3f31eee1774e..424e5f58cf7b 100644 --- a/internal/services/mariadb/mariadb_server_resource.go +++ b/internal/services/mariadb/mariadb_server_resource.go @@ -8,14 +8,14 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb" - "github.com/Azure/go-autorest/autorest/date" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -30,7 +30,7 @@ func resourceMariaDbServer() *pluginsdk.Resource { Delete: resourceMariaDbServerDelete, Importer: pluginsdk.ImporterValidatingResourceIdThen(func(id string) error { - _, err := parse.ServerID(id) + _, err := servers.ParseServerID(id) return err }, func(ctx context.Context, d *pluginsdk.ResourceData, meta interface{}) ([]*pluginsdk.ResourceData, error) { d.Set("create_mode", "Default") @@ -42,7 +42,7 @@ func resourceMariaDbServer() *pluginsdk.Resource { }), Timeouts: &pluginsdk.ResourceTimeout{ - Create: pluginsdk.DefaultTimeout(60 * time.Minute), + Create: pluginsdk.DefaultTimeout(90 * time.Minute), Read: pluginsdk.DefaultTimeout(5 * time.Minute), Update: pluginsdk.DefaultTimeout(60 * time.Minute), Delete: pluginsdk.DefaultTimeout(60 * time.Minute), @@ -85,19 +85,19 @@ func resourceMariaDbServer() *pluginsdk.Resource { "create_mode": { Type: pluginsdk.TypeString, Optional: true, - Default: string(mariadb.CreateModeDefault), + Default: string(servers.CreateModeDefault), ValidateFunc: validation.StringInSlice([]string{ - string(mariadb.CreateModeDefault), - string(mariadb.CreateModeGeoRestore), - string(mariadb.CreateModePointInTimeRestore), - string(mariadb.CreateModeReplica), + string(servers.CreateModeDefault), + string(servers.CreateModeGeoRestore), + string(servers.CreateModePointInTimeRestore), + string(servers.CreateModeReplica), }, false), }, "creation_source_server_id": { Type: pluginsdk.TypeString, Optional: true, - ValidateFunc: validate.ServerID, + ValidateFunc: servers.ValidateServerID, }, "fqdn": { @@ -160,7 +160,7 @@ func resourceMariaDbServer() *pluginsdk.Resource { ), }, - "tags": tags.Schema(), + "tags": commonschema.Tags(), "version": { Type: pluginsdk.TypeString, @@ -181,45 +181,45 @@ func resourceMariaDbServerCreate(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewServerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) + id := servers.NewServerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.Name) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_mariadb_server", id.ID()) } } location := azure.NormalizeLocation(d.Get("location").(string)) - mode := mariadb.CreateMode(d.Get("create_mode").(string)) + mode := servers.CreateMode(d.Get("create_mode").(string)) source := d.Get("creation_source_server_id").(string) - version := mariadb.ServerVersion(d.Get("version").(string)) + version := servers.ServerVersion(d.Get("version").(string)) sku, err := expandServerSkuName(d.Get("sku_name").(string)) if err != nil { return fmt.Errorf("expanding `sku_name`: %+v", err) } - publicAccess := mariadb.PublicNetworkAccessEnumEnabled + publicAccess := servers.PublicNetworkAccessEnumEnabled if v := d.Get("public_network_access_enabled"); !v.(bool) { - publicAccess = mariadb.PublicNetworkAccessEnumDisabled + publicAccess = servers.PublicNetworkAccessEnumDisabled } - ssl := mariadb.SslEnforcementEnumEnabled + ssl := servers.SslEnforcementEnumEnabled if v := d.Get("ssl_enforcement_enabled").(bool); !v { - ssl = mariadb.SslEnforcementEnumDisabled + ssl = servers.SslEnforcementEnumDisabled } storage := expandMariaDbStorageProfile(d) - var props mariadb.BasicServerPropertiesForCreate + var props servers.ServerPropertiesForCreate switch mode { - case mariadb.CreateModeDefault: + case servers.CreateModeDefault: admin := d.Get("administrator_login").(string) pass := d.Get("administrator_login_password").(string) @@ -234,68 +234,57 @@ func resourceMariaDbServerCreate(d *pluginsdk.ResourceData, meta interface{}) er return fmt.Errorf("`restore_point_in_time` cannot be set when `create_mode` is `default`") } - props = &mariadb.ServerPropertiesForDefaultCreate{ - AdministratorLogin: &admin, - AdministratorLoginPassword: &pass, - CreateMode: mode, - PublicNetworkAccess: publicAccess, - SslEnforcement: ssl, + props = servers.ServerPropertiesForDefaultCreate{ + AdministratorLogin: admin, + AdministratorLoginPassword: pass, + PublicNetworkAccess: &publicAccess, + SslEnforcement: &ssl, StorageProfile: storage, - Version: version, + Version: &version, } - case mariadb.CreateModePointInTimeRestore: + + case servers.CreateModePointInTimeRestore: v, ok := d.GetOk("restore_point_in_time") if !ok || v.(string) == "" { return fmt.Errorf("restore_point_in_time must be set when create_mode is PointInTimeRestore") } - time, _ := time.Parse(time.RFC3339, v.(string)) // should be validated by the schema - props = &mariadb.ServerPropertiesForRestore{ - CreateMode: mode, - SourceServerID: &source, - RestorePointInTime: &date.Time{ - Time: time, - }, - PublicNetworkAccess: publicAccess, - SslEnforcement: ssl, + props = &servers.ServerPropertiesForRestore{ + SourceServerId: source, + RestorePointInTime: v.(string), + PublicNetworkAccess: &publicAccess, + SslEnforcement: &ssl, StorageProfile: storage, - Version: version, + Version: &version, } - case mariadb.CreateModeGeoRestore: - props = &mariadb.ServerPropertiesForGeoRestore{ - CreateMode: mode, - SourceServerID: &source, - PublicNetworkAccess: publicAccess, - SslEnforcement: ssl, + case servers.CreateModeGeoRestore: + props = &servers.ServerPropertiesForGeoRestore{ + SourceServerId: source, + PublicNetworkAccess: &publicAccess, + SslEnforcement: &ssl, StorageProfile: storage, - Version: version, + Version: &version, } - case mariadb.CreateModeReplica: - props = &mariadb.ServerPropertiesForReplica{ - CreateMode: mode, - SourceServerID: &source, - PublicNetworkAccess: publicAccess, - SslEnforcement: ssl, - Version: version, + case servers.CreateModeReplica: + props = &servers.ServerPropertiesForReplica{ + SourceServerId: source, + PublicNetworkAccess: &publicAccess, + SslEnforcement: &ssl, + Version: &version, } } - server := mariadb.ServerForCreate{ - Location: &location, + server := servers.ServerForCreate{ + Location: location, Properties: props, Sku: sku, Tags: tags.Expand(d.Get("tags").(map[string]interface{})), } - future, err := client.Create(ctx, id.ResourceGroup, id.Name, server) - if err != nil { + if err := client.CreateThenPoll(ctx, id, server); err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for the creation of %s: %+v", id, err) - } - d.SetId(id.ID()) return resourceMariaDbServerRead(d, meta) } @@ -307,7 +296,7 @@ func resourceMariaDbServerUpdate(d *pluginsdk.ResourceData, meta interface{}) er log.Printf("[INFO] preparing arguments for AzureRM MariaDB Server update.") - id, err := parse.ServerID(d.Id()) + id, err := servers.ParseServerID(d.Id()) if err != nil { return err } @@ -317,39 +306,34 @@ func resourceMariaDbServerUpdate(d *pluginsdk.ResourceData, meta interface{}) er return fmt.Errorf("expanding `sku_name`: %+v", err) } - publicAccess := mariadb.PublicNetworkAccessEnumEnabled + publicAccess := servers.PublicNetworkAccessEnumEnabled if v := d.Get("public_network_access_enabled").(bool); !v { - publicAccess = mariadb.PublicNetworkAccessEnumDisabled + publicAccess = servers.PublicNetworkAccessEnumDisabled } - ssl := mariadb.SslEnforcementEnumEnabled + ssl := servers.SslEnforcementEnumEnabled if v := d.Get("ssl_enforcement_enabled").(bool); !v { - ssl = mariadb.SslEnforcementEnumDisabled + ssl = servers.SslEnforcementEnumDisabled } storageProfile := expandMariaDbStorageProfile(d) - - properties := mariadb.ServerUpdateParameters{ - ServerUpdateParametersProperties: &mariadb.ServerUpdateParametersProperties{ + serverVersion := servers.ServerVersion(d.Get("version").(string)) + properties := servers.ServerUpdateParameters{ + Properties: &servers.ServerUpdateParametersProperties{ AdministratorLoginPassword: utils.String(d.Get("administrator_login_password").(string)), - PublicNetworkAccess: publicAccess, - SslEnforcement: ssl, + PublicNetworkAccess: &publicAccess, + SslEnforcement: &ssl, StorageProfile: storageProfile, - Version: mariadb.ServerVersion(d.Get("version").(string)), + Version: &serverVersion, }, Sku: sku, Tags: tags.Expand(d.Get("tags").(map[string]interface{})), } - future, err := client.Update(ctx, id.ResourceGroup, id.Name, properties) - if err != nil { + if err := client.UpdateThenPoll(ctx, *id, properties); err != nil { return fmt.Errorf("updating %s: %+v", *id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for update of %s: %+v", *id, err) - } - return resourceMariaDbServerRead(d, meta) } @@ -358,14 +342,14 @@ func resourceMariaDbServerRead(d *pluginsdk.ResourceData, meta interface{}) erro ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.ServerID(d.Id()) + id, err := servers.ParseServerID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.Name) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[WARN] %s was not found - removing from state", *id) d.SetId("") return nil @@ -374,35 +358,60 @@ func resourceMariaDbServerRead(d *pluginsdk.ResourceData, meta interface{}) erro return fmt.Errorf("retrieving %s: %+v", *id, err) } - d.Set("name", id.Name) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("name", id.ServerName) + d.Set("resource_group_name", id.ResourceGroupName) - if location := resp.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } + if model := resp.Model; model != nil { + d.Set("location", azure.NormalizeLocation(model.Location)) - if sku := resp.Sku; sku != nil { - d.Set("sku_name", sku.Name) - } - - if props := resp.ServerProperties; props != nil { - d.Set("administrator_login", props.AdministratorLogin) - d.Set("public_network_access_enabled", props.PublicNetworkAccess == mariadb.PublicNetworkAccessEnumEnabled) - d.Set("ssl_enforcement_enabled", props.SslEnforcement == mariadb.SslEnforcementEnumEnabled) - d.Set("version", string(props.Version)) - - if storage := props.StorageProfile; storage != nil { - d.Set("auto_grow_enabled", storage.StorageAutogrow == mariadb.StorageAutogrowEnabled) - d.Set("backup_retention_days", storage.BackupRetentionDays) - d.Set("geo_redundant_backup_enabled", storage.GeoRedundantBackup == mariadb.Enabled) - d.Set("storage_mb", storage.StorageMB) + if sku := model.Sku; sku != nil { + d.Set("sku_name", sku.Name) } - // Computed - d.Set("fqdn", props.FullyQualifiedDomainName) - } + if props := model.Properties; props != nil { + d.Set("administrator_login", props.AdministratorLogin) - return tags.FlattenAndSet(d, resp.Tags) + publicNetworkAccess := false + if props.PublicNetworkAccess != nil { + publicNetworkAccess = *props.PublicNetworkAccess == servers.PublicNetworkAccessEnumEnabled + } + d.Set("public_network_access_enabled", publicNetworkAccess) + + sslEnforcement := false + if props.SslEnforcement != nil { + sslEnforcement = *props.SslEnforcement == servers.SslEnforcementEnumEnabled + } + d.Set("ssl_enforcement_enabled", sslEnforcement) + + version := "" + if props.Version != nil { + version = string(*props.Version) + } + d.Set("version", version) + + if storage := props.StorageProfile; storage != nil { + autoGrow := false + if storage.StorageAutogrow != nil { + autoGrow = *storage.StorageAutogrow == servers.StorageAutogrowEnabled + } + d.Set("auto_grow_enabled", autoGrow) + + geoRedundant := false + if storage.GeoRedundantBackup != nil { + geoRedundant = *storage.GeoRedundantBackup == servers.GeoRedundantBackupEnabled + } + d.Set("geo_redundant_backup_enabled", geoRedundant) + d.Set("backup_retention_days", storage.BackupRetentionDays) + d.Set("storage_mb", storage.StorageMB) + + } + + // Computed + d.Set("fqdn", props.FullyQualifiedDomainName) + } + return tags.FlattenAndSet(d, model.Tags) + } + return nil } func resourceMariaDbServerDelete(d *pluginsdk.ResourceData, meta interface{}) error { @@ -410,37 +419,32 @@ func resourceMariaDbServerDelete(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.ServerID(d.Id()) + id, err := servers.ParseServerID(d.Id()) if err != nil { return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.Name) - if err != nil { + if err := client.DeleteThenPoll(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", *id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for the deletion of %s: %+v", *id, err) - } - return nil } -func expandServerSkuName(skuName string) (*mariadb.Sku, error) { +func expandServerSkuName(skuName string) (*servers.Sku, error) { parts := strings.Split(skuName, "_") if len(parts) != 3 { return nil, fmt.Errorf("sku_name (%s) has the wrong number of parts (%d) after splitting on _", skuName, len(parts)) } - var tier mariadb.SkuTier + var tier servers.SkuTier switch parts[0] { case "B": - tier = mariadb.Basic + tier = servers.SkuTierBasic case "GP": - tier = mariadb.GeneralPurpose + tier = servers.SkuTierGeneralPurpose case "MO": - tier = mariadb.MemoryOptimized + tier = servers.SkuTierMemoryOptimized default: return nil, fmt.Errorf("sku_name %s has unknown sku tier %s", skuName, parts[0]) } @@ -450,37 +454,39 @@ func expandServerSkuName(skuName string) (*mariadb.Sku, error) { return nil, fmt.Errorf("cannot convert `sku_name` %q capacity %s to int", skuName, parts[2]) } - return &mariadb.Sku{ - Name: utils.String(skuName), - Tier: tier, - Capacity: utils.Int32(int32(capacity)), + return &servers.Sku{ + Name: skuName, + Tier: &tier, + Capacity: utils.Int64(int64(capacity)), Family: utils.String(parts[1]), }, nil } -func expandMariaDbStorageProfile(d *pluginsdk.ResourceData) *mariadb.StorageProfile { - storage := mariadb.StorageProfile{} +func expandMariaDbStorageProfile(d *pluginsdk.ResourceData) *servers.StorageProfile { + storage := servers.StorageProfile{} // now override whatever we may have from the block with the top level properties if v, ok := d.GetOk("auto_grow_enabled"); ok { - storage.StorageAutogrow = mariadb.StorageAutogrowDisabled + autogrowEnabled := servers.StorageAutogrowDisabled if v.(bool) { - storage.StorageAutogrow = mariadb.StorageAutogrowEnabled + autogrowEnabled = servers.StorageAutogrowEnabled } + storage.StorageAutogrow = &autogrowEnabled } if v, ok := d.GetOk("backup_retention_days"); ok { - storage.BackupRetentionDays = utils.Int32(int32(v.(int))) + storage.BackupRetentionDays = utils.Int64(int64(v.(int))) } if v, ok := d.GetOk("geo_redundant_backup_enabled"); ok { - storage.GeoRedundantBackup = mariadb.Disabled + geoRedundantBackup := servers.GeoRedundantBackupDisabled if v.(bool) { - storage.GeoRedundantBackup = mariadb.Enabled + geoRedundantBackup = servers.GeoRedundantBackupEnabled } + storage.GeoRedundantBackup = &geoRedundantBackup } if v, ok := d.GetOk("storage_mb"); ok { - storage.StorageMB = utils.Int32(int32(v.(int))) + storage.StorageMB = utils.Int64(int64(v.(int))) } return &storage diff --git a/internal/services/mariadb/mariadb_server_resource_test.go b/internal/services/mariadb/mariadb_server_resource_test.go index 45b2bde401a7..25e2f5b3b064 100644 --- a/internal/services/mariadb/mariadb_server_resource_test.go +++ b/internal/services/mariadb/mariadb_server_resource_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -199,17 +199,17 @@ func TestAccMariaDbServer_createPointInTimeRestore(t *testing.T) { } func (MariaDbServerResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.ServerID(state.ID) + id, err := servers.ParseServerID(state.ID) if err != nil { return nil, err } - resp, err := clients.MariaDB.ServersClient.Get(ctx, id.ResourceGroup, id.Name) + resp, err := clients.MariaDB.ServersClient.Get(ctx, *id) if err != nil { - return nil, fmt.Errorf("retrieving MariaDB Server %q (Resource Group %q): %v", id.Name, id.ResourceGroup, err) + return nil, fmt.Errorf("retrieving %s: %v", *id, err) } - return utils.Bool(resp.ServerProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (MariaDbServerResource) basic(data acceptance.TestData, version string) string { diff --git a/internal/services/mariadb/mariadb_virtual_network_rule_resource.go b/internal/services/mariadb/mariadb_virtual_network_rule_resource.go index c7af2b36673a..00347fe43794 100644 --- a/internal/services/mariadb/mariadb_virtual_network_rule_resource.go +++ b/internal/services/mariadb/mariadb_virtual_network_rule_resource.go @@ -6,12 +6,11 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb" "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/validate" validate2 "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -26,7 +25,7 @@ func resourceMariaDbVirtualNetworkRule() *pluginsdk.Resource { Update: resourceMariaDbVirtualNetworkRuleCreateUpdate, Delete: resourceMariaDbVirtualNetworkRuleDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.MariaDBVirtualNetworkRuleID(id) + _, err := virtualnetworkrules.ParseVirtualNetworkRuleID(id) return err }), @@ -69,44 +68,40 @@ func resourceMariaDbVirtualNetworkRuleCreateUpdate(d *pluginsdk.ResourceData, me ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewMariaDBVirtualNetworkRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) + id := virtualnetworkrules.NewVirtualNetworkRuleID(subscriptionId, d.Get("resource_group_name").(string), d.Get("server_name").(string), d.Get("name").(string)) subnetId := d.Get("subnet_id").(string) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.VirtualNetworkRuleName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_mariadb_virtual_network_rule", id.ID()) } } - parameters := mariadb.VirtualNetworkRule{ - VirtualNetworkRuleProperties: &mariadb.VirtualNetworkRuleProperties{ - VirtualNetworkSubnetID: utils.String(subnetId), + parameters := virtualnetworkrules.VirtualNetworkRule{ + Properties: &virtualnetworkrules.VirtualNetworkRuleProperties{ + VirtualNetworkSubnetId: subnetId, IgnoreMissingVnetServiceEndpoint: utils.Bool(false), }, } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.ServerName, id.VirtualNetworkRuleName, parameters) - if err != nil { + if err := client.CreateOrUpdateThenPoll(ctx, id, parameters); err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation/update of %q: %+v", id, err) - } // Wait for the provisioning state to become ready log.Printf("[DEBUG] Waiting for %s to become ready", id) stateConf := &pluginsdk.StateChangeConf{ Pending: []string{"Initializing", "InProgress", "Unknown", "ResponseNotFound"}, Target: []string{"Ready"}, - Refresh: mariaDbVirtualNetworkStateStatusCodeRefreshFunc(ctx, client, id.ResourceGroup, id.ServerName, id.VirtualNetworkRuleName), + Refresh: mariaDbVirtualNetworkStateStatusCodeRefreshFunc(ctx, client, id), MinTimeout: 1 * time.Minute, ContinuousTargetOccurence: 5, } @@ -130,14 +125,14 @@ func resourceMariaDbVirtualNetworkRuleRead(d *pluginsdk.ResourceData, meta inter ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.MariaDBVirtualNetworkRuleID(d.Id()) + id, err := virtualnetworkrules.ParseVirtualNetworkRuleID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.VirtualNetworkRuleName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[INFO] Error reading MariaDb Virtual Network Rule %q - removing from state", d.Id()) d.SetId("") return nil @@ -147,11 +142,13 @@ func resourceMariaDbVirtualNetworkRuleRead(d *pluginsdk.ResourceData, meta inter } d.Set("name", id.VirtualNetworkRuleName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("server_name", id.ServerName) - if props := resp.VirtualNetworkRuleProperties; props != nil { - d.Set("subnet_id", props.VirtualNetworkSubnetID) + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + d.Set("subnet_id", props.VirtualNetworkSubnetId) + } } return nil @@ -162,44 +159,40 @@ func resourceMariaDbVirtualNetworkRuleDelete(d *pluginsdk.ResourceData, meta int ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.MariaDBVirtualNetworkRuleID(d.Id()) + id, err := virtualnetworkrules.ParseVirtualNetworkRuleID(d.Id()) if err != nil { return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.ServerName, id.VirtualNetworkRuleName) - if err != nil { + if err := client.DeleteThenPoll(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", *id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - if !response.WasNotFound(future.Response()) { - return fmt.Errorf("waiting for deletion of %s: %+v", *id, err) - } - } - return nil } -func mariaDbVirtualNetworkStateStatusCodeRefreshFunc(ctx context.Context, client *mariadb.VirtualNetworkRulesClient, resourceGroup string, serverName string, name string) pluginsdk.StateRefreshFunc { +func mariaDbVirtualNetworkStateStatusCodeRefreshFunc(ctx context.Context, client *virtualnetworkrules.VirtualNetworkRulesClient, id virtualnetworkrules.VirtualNetworkRuleId) pluginsdk.StateRefreshFunc { return func() (interface{}, string, error) { - resp, err := client.Get(ctx, resourceGroup, serverName, name) + resp, err := client.Get(ctx, id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[DEBUG] Retrieving MariaDb Virtual Network Rule %q (MariaDb Server: %q, Resource Group: %q) returned 404.", resourceGroup, serverName, name) + if response.WasNotFound(resp.HttpResponse) { + log.Printf("[DEBUG] Retrieving %s returned 404.", id) return nil, "ResponseNotFound", nil } - return nil, "", fmt.Errorf("polling for the state of the MariaDb Virtual Network Rule %q (MariaDb Server: %q, Resource Group: %q): %+v", name, serverName, resourceGroup, err) + return nil, "", fmt.Errorf("polling for the state of %s: %+v", id, err) } - if props := resp.VirtualNetworkRuleProperties; props != nil { - log.Printf("[DEBUG] Retrieving MariaDb Virtual Network Rule %q (MariaDb Server: %q, Resource Group: %q) returned Status %s", resourceGroup, serverName, name, props.State) - return resp, string(props.State), nil + if model := resp.Model; model != nil { + if props := model.Properties; props != nil { + log.Printf("[DEBUG] Retrieving %s returned Status %s", id, *props.State) + return resp, string(*props.State), nil + + } } // Valid response was returned but VirtualNetworkRuleProperties was nil. Basically the rule exists, but with no properties for some reason. Assume Unknown instead of returning error. - log.Printf("[DEBUG] Retrieving MariaDb Virtual Network Rule %q (MariaDb Server: %q, Resource Group: %q) returned empty VirtualNetworkRuleProperties", resourceGroup, serverName, name) + log.Printf("[DEBUG] Retrieving %s returned empty VirtualNetworkRuleProperties", id) return resp, "Unknown", nil } } diff --git a/internal/services/mariadb/mariadb_virtual_network_rule_resource_test.go b/internal/services/mariadb/mariadb_virtual_network_rule_resource_test.go index b399f8fdbb93..aa37b5bbd321 100644 --- a/internal/services/mariadb/mariadb_virtual_network_rule_resource_test.go +++ b/internal/services/mariadb/mariadb_virtual_network_rule_resource_test.go @@ -6,10 +6,10 @@ import ( "regexp" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -91,17 +91,17 @@ func TestAccMariaDbVirtualNetworkRule_multipleSubnets(t *testing.T) { } func (MariaDbVirtualNetworkRuleResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.MariaDBVirtualNetworkRuleID(state.ID) + id, err := virtualnetworkrules.ParseVirtualNetworkRuleID(state.ID) if err != nil { return nil, err } - resp, err := clients.MariaDB.VirtualNetworkRulesClient.Get(ctx, id.ResourceGroup, id.ServerName, id.VirtualNetworkRuleName) + resp, err := clients.MariaDB.VirtualNetworkRulesClient.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %v", *id, err) } - return utils.Bool(resp.VirtualNetworkRuleProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (MariaDbVirtualNetworkRuleResource) basic(data acceptance.TestData) string { diff --git a/internal/services/mariadb/parse/maria_db_configuration.go b/internal/services/mariadb/parse/maria_db_configuration.go deleted file mode 100644 index 5f3140e28630..000000000000 --- a/internal/services/mariadb/parse/maria_db_configuration.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type MariaDBConfigurationId struct { - SubscriptionId string - ResourceGroup string - ServerName string - ConfigurationName string -} - -func NewMariaDBConfigurationID(subscriptionId, resourceGroup, serverName, configurationName string) MariaDBConfigurationId { - return MariaDBConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - ServerName: serverName, - ConfigurationName: configurationName, - } -} - -func (id MariaDBConfigurationId) String() string { - segments := []string{ - fmt.Sprintf("Configuration Name %q", id.ConfigurationName), - fmt.Sprintf("Server Name %q", id.ServerName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Maria D B Configuration", segmentsStr) -} - -func (id MariaDBConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/configurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.ServerName, id.ConfigurationName) -} - -// MariaDBConfigurationID parses a MariaDBConfiguration ID into an MariaDBConfigurationId struct -func MariaDBConfigurationID(input string) (*MariaDBConfigurationId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := MariaDBConfigurationId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.ServerName, err = id.PopSegment("servers"); err != nil { - return nil, err - } - if resourceId.ConfigurationName, err = id.PopSegment("configurations"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/mariadb/parse/maria_db_configuration_test.go b/internal/services/mariadb/parse/maria_db_configuration_test.go deleted file mode 100644 index 63e32230b1c1..000000000000 --- a/internal/services/mariadb/parse/maria_db_configuration_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = MariaDBConfigurationId{} - -func TestMariaDBConfigurationIDFormatter(t *testing.T) { - actual := NewMariaDBConfigurationID("12345678-1234-9876-4563-123456789012", "resGroup1", "server1", "config1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/configurations/config1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestMariaDBConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *MariaDBConfigurationId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Error: true, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Error: true, - }, - - { - // missing ConfigurationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/", - Error: true, - }, - - { - // missing value for ConfigurationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/configurations/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/configurations/config1", - Expected: &MariaDBConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "resGroup1", - ServerName: "server1", - ConfigurationName: "config1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1/CONFIGURATIONS/CONFIG1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := MariaDBConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", 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.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.ServerName != v.Expected.ServerName { - t.Fatalf("Expected %q but got %q for ServerName", v.Expected.ServerName, actual.ServerName) - } - if actual.ConfigurationName != v.Expected.ConfigurationName { - t.Fatalf("Expected %q but got %q for ConfigurationName", v.Expected.ConfigurationName, actual.ConfigurationName) - } - } -} diff --git a/internal/services/mariadb/parse/maria_db_database.go b/internal/services/mariadb/parse/maria_db_database.go deleted file mode 100644 index 6dd9d3339acc..000000000000 --- a/internal/services/mariadb/parse/maria_db_database.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type MariaDBDatabaseId struct { - SubscriptionId string - ResourceGroup string - ServerName string - DatabaseName string -} - -func NewMariaDBDatabaseID(subscriptionId, resourceGroup, serverName, databaseName string) MariaDBDatabaseId { - return MariaDBDatabaseId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - ServerName: serverName, - DatabaseName: databaseName, - } -} - -func (id MariaDBDatabaseId) String() string { - segments := []string{ - fmt.Sprintf("Database Name %q", id.DatabaseName), - fmt.Sprintf("Server Name %q", id.ServerName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Maria D B Database", segmentsStr) -} - -func (id MariaDBDatabaseId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/databases/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.ServerName, id.DatabaseName) -} - -// MariaDBDatabaseID parses a MariaDBDatabase ID into an MariaDBDatabaseId struct -func MariaDBDatabaseID(input string) (*MariaDBDatabaseId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := MariaDBDatabaseId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.ServerName, err = id.PopSegment("servers"); err != nil { - return nil, err - } - if resourceId.DatabaseName, err = id.PopSegment("databases"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/mariadb/parse/maria_db_database_test.go b/internal/services/mariadb/parse/maria_db_database_test.go deleted file mode 100644 index c5d9b1b08c95..000000000000 --- a/internal/services/mariadb/parse/maria_db_database_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = MariaDBDatabaseId{} - -func TestMariaDBDatabaseIDFormatter(t *testing.T) { - actual := NewMariaDBDatabaseID("12345678-1234-9876-4563-123456789012", "resGroup1", "server1", "db1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/databases/db1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestMariaDBDatabaseID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *MariaDBDatabaseId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Error: true, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Error: true, - }, - - { - // missing DatabaseName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/", - Error: true, - }, - - { - // missing value for DatabaseName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/databases/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/databases/db1", - Expected: &MariaDBDatabaseId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "resGroup1", - ServerName: "server1", - DatabaseName: "db1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1/DATABASES/DB1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := MariaDBDatabaseID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", 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.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.ServerName != v.Expected.ServerName { - t.Fatalf("Expected %q but got %q for ServerName", v.Expected.ServerName, actual.ServerName) - } - if actual.DatabaseName != v.Expected.DatabaseName { - t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) - } - } -} diff --git a/internal/services/mariadb/parse/maria_db_firewall_rule.go b/internal/services/mariadb/parse/maria_db_firewall_rule.go deleted file mode 100644 index 3153fd283942..000000000000 --- a/internal/services/mariadb/parse/maria_db_firewall_rule.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type MariaDBFirewallRuleId struct { - SubscriptionId string - ResourceGroup string - ServerName string - FirewallRuleName string -} - -func NewMariaDBFirewallRuleID(subscriptionId, resourceGroup, serverName, firewallRuleName string) MariaDBFirewallRuleId { - return MariaDBFirewallRuleId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - ServerName: serverName, - FirewallRuleName: firewallRuleName, - } -} - -func (id MariaDBFirewallRuleId) String() string { - segments := []string{ - fmt.Sprintf("Firewall Rule Name %q", id.FirewallRuleName), - fmt.Sprintf("Server Name %q", id.ServerName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Maria D B Firewall Rule", segmentsStr) -} - -func (id MariaDBFirewallRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/firewallRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.ServerName, id.FirewallRuleName) -} - -// MariaDBFirewallRuleID parses a MariaDBFirewallRule ID into an MariaDBFirewallRuleId struct -func MariaDBFirewallRuleID(input string) (*MariaDBFirewallRuleId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := MariaDBFirewallRuleId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.ServerName, err = id.PopSegment("servers"); err != nil { - return nil, err - } - if resourceId.FirewallRuleName, err = id.PopSegment("firewallRules"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/mariadb/parse/maria_db_firewall_rule_test.go b/internal/services/mariadb/parse/maria_db_firewall_rule_test.go deleted file mode 100644 index 86aaca3e4ec4..000000000000 --- a/internal/services/mariadb/parse/maria_db_firewall_rule_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = MariaDBFirewallRuleId{} - -func TestMariaDBFirewallRuleIDFormatter(t *testing.T) { - actual := NewMariaDBFirewallRuleID("12345678-1234-9876-4563-123456789012", "resGroup1", "server1", "firewallRule1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/firewallRule1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestMariaDBFirewallRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *MariaDBFirewallRuleId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Error: true, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Error: true, - }, - - { - // missing FirewallRuleName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/", - Error: true, - }, - - { - // missing value for FirewallRuleName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/firewallRule1", - Expected: &MariaDBFirewallRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "resGroup1", - ServerName: "server1", - FirewallRuleName: "firewallRule1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1/FIREWALLRULES/FIREWALLRULE1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := MariaDBFirewallRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", 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.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.ServerName != v.Expected.ServerName { - t.Fatalf("Expected %q but got %q for ServerName", v.Expected.ServerName, actual.ServerName) - } - if actual.FirewallRuleName != v.Expected.FirewallRuleName { - t.Fatalf("Expected %q but got %q for FirewallRuleName", v.Expected.FirewallRuleName, actual.FirewallRuleName) - } - } -} diff --git a/internal/services/mariadb/parse/maria_db_virtual_network_rule.go b/internal/services/mariadb/parse/maria_db_virtual_network_rule.go deleted file mode 100644 index c1ef6a2c7d1a..000000000000 --- a/internal/services/mariadb/parse/maria_db_virtual_network_rule.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type MariaDBVirtualNetworkRuleId struct { - SubscriptionId string - ResourceGroup string - ServerName string - VirtualNetworkRuleName string -} - -func NewMariaDBVirtualNetworkRuleID(subscriptionId, resourceGroup, serverName, virtualNetworkRuleName string) MariaDBVirtualNetworkRuleId { - return MariaDBVirtualNetworkRuleId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - ServerName: serverName, - VirtualNetworkRuleName: virtualNetworkRuleName, - } -} - -func (id MariaDBVirtualNetworkRuleId) String() string { - segments := []string{ - fmt.Sprintf("Virtual Network Rule Name %q", id.VirtualNetworkRuleName), - fmt.Sprintf("Server Name %q", id.ServerName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Maria D B Virtual Network Rule", segmentsStr) -} - -func (id MariaDBVirtualNetworkRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/virtualNetworkRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.ServerName, id.VirtualNetworkRuleName) -} - -// MariaDBVirtualNetworkRuleID parses a MariaDBVirtualNetworkRule ID into an MariaDBVirtualNetworkRuleId struct -func MariaDBVirtualNetworkRuleID(input string) (*MariaDBVirtualNetworkRuleId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := MariaDBVirtualNetworkRuleId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.ServerName, err = id.PopSegment("servers"); err != nil { - return nil, err - } - if resourceId.VirtualNetworkRuleName, err = id.PopSegment("virtualNetworkRules"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/mariadb/parse/maria_db_virtual_network_rule_test.go b/internal/services/mariadb/parse/maria_db_virtual_network_rule_test.go deleted file mode 100644 index 245d578ecd4d..000000000000 --- a/internal/services/mariadb/parse/maria_db_virtual_network_rule_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = MariaDBVirtualNetworkRuleId{} - -func TestMariaDBVirtualNetworkRuleIDFormatter(t *testing.T) { - actual := NewMariaDBVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "resGroup1", "server1", "vnetrule1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/virtualNetworkRules/vnetrule1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestMariaDBVirtualNetworkRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *MariaDBVirtualNetworkRuleId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Error: true, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Error: true, - }, - - { - // missing VirtualNetworkRuleName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/", - Error: true, - }, - - { - // missing value for VirtualNetworkRuleName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/virtualNetworkRules/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/virtualNetworkRules/vnetrule1", - Expected: &MariaDBVirtualNetworkRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "resGroup1", - ServerName: "server1", - VirtualNetworkRuleName: "vnetrule1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1/VIRTUALNETWORKRULES/VNETRULE1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := MariaDBVirtualNetworkRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", 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.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.ServerName != v.Expected.ServerName { - t.Fatalf("Expected %q but got %q for ServerName", v.Expected.ServerName, actual.ServerName) - } - if actual.VirtualNetworkRuleName != v.Expected.VirtualNetworkRuleName { - t.Fatalf("Expected %q but got %q for VirtualNetworkRuleName", v.Expected.VirtualNetworkRuleName, actual.VirtualNetworkRuleName) - } - } -} diff --git a/internal/services/mariadb/parse/server.go b/internal/services/mariadb/parse/server.go deleted file mode 100644 index 20bc1f33fa3d..000000000000 --- a/internal/services/mariadb/parse/server.go +++ /dev/null @@ -1,69 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type ServerId struct { - SubscriptionId string - ResourceGroup string - Name string -} - -func NewServerID(subscriptionId, resourceGroup, name string) ServerId { - return ServerId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - Name: name, - } -} - -func (id ServerId) String() string { - segments := []string{ - fmt.Sprintf("Name %q", id.Name), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Server", segmentsStr) -} - -func (id ServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.Name) -} - -// ServerID parses a Server ID into an ServerId struct -func ServerID(input string) (*ServerId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := ServerId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.Name, err = id.PopSegment("servers"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/mariadb/parse/server_test.go b/internal/services/mariadb/parse/server_test.go deleted file mode 100644 index 5a8802e54766..000000000000 --- a/internal/services/mariadb/parse/server_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = ServerId{} - -func TestServerIDFormatter(t *testing.T) { - actual := NewServerID("12345678-1234-9876-4563-123456789012", "resGroup1", "server1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestServerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServerId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Error: true, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1", - Expected: &ServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "resGroup1", - Name: "server1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ServerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", 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.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.Name != v.Expected.Name { - t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) - } - } -} diff --git a/internal/services/mariadb/resourceids.go b/internal/services/mariadb/resourceids.go deleted file mode 100644 index da078e4831b7..000000000000 --- a/internal/services/mariadb/resourceids.go +++ /dev/null @@ -1,7 +0,0 @@ -package mariadb - -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=Server -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=MariaDBFirewallRule -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/firewallRule1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=MariaDBVirtualNetworkRule -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/virtualNetworkRules/vnetrule1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=MariaDBConfiguration -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/configurations/config1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=MariaDBDatabase -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/databases/db1 diff --git a/internal/services/mariadb/validate/maria_db_configuration_id.go b/internal/services/mariadb/validate/maria_db_configuration_id.go deleted file mode 100644 index cb4f33723c41..000000000000 --- a/internal/services/mariadb/validate/maria_db_configuration_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" -) - -func MariaDBConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.MariaDBConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/mariadb/validate/maria_db_configuration_id_test.go b/internal/services/mariadb/validate/maria_db_configuration_id_test.go deleted file mode 100644 index c92c8b16023d..000000000000 --- a/internal/services/mariadb/validate/maria_db_configuration_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestMariaDBConfigurationID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Valid: false, - }, - - { - // missing ConfigurationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/", - Valid: false, - }, - - { - // missing value for ConfigurationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/configurations/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/configurations/config1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1/CONFIGURATIONS/CONFIG1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := MariaDBConfigurationID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/mariadb/validate/maria_db_database_id.go b/internal/services/mariadb/validate/maria_db_database_id.go deleted file mode 100644 index 72ace30d7eab..000000000000 --- a/internal/services/mariadb/validate/maria_db_database_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" -) - -func MariaDBDatabaseID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.MariaDBDatabaseID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/mariadb/validate/maria_db_database_id_test.go b/internal/services/mariadb/validate/maria_db_database_id_test.go deleted file mode 100644 index 860f79311e1b..000000000000 --- a/internal/services/mariadb/validate/maria_db_database_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestMariaDBDatabaseID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Valid: false, - }, - - { - // missing DatabaseName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/", - Valid: false, - }, - - { - // missing value for DatabaseName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/databases/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/databases/db1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1/DATABASES/DB1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := MariaDBDatabaseID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/mariadb/validate/maria_db_firewall_rule_id.go b/internal/services/mariadb/validate/maria_db_firewall_rule_id.go deleted file mode 100644 index 469e95bf6ac9..000000000000 --- a/internal/services/mariadb/validate/maria_db_firewall_rule_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" -) - -func MariaDBFirewallRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.MariaDBFirewallRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/mariadb/validate/maria_db_firewall_rule_id_test.go b/internal/services/mariadb/validate/maria_db_firewall_rule_id_test.go deleted file mode 100644 index 72cf474ee02f..000000000000 --- a/internal/services/mariadb/validate/maria_db_firewall_rule_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestMariaDBFirewallRuleID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Valid: false, - }, - - { - // missing FirewallRuleName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/", - Valid: false, - }, - - { - // missing value for FirewallRuleName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/firewallRule1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1/FIREWALLRULES/FIREWALLRULE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := MariaDBFirewallRuleID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/mariadb/validate/maria_db_virtual_network_rule_id.go b/internal/services/mariadb/validate/maria_db_virtual_network_rule_id.go deleted file mode 100644 index 8da930b85a65..000000000000 --- a/internal/services/mariadb/validate/maria_db_virtual_network_rule_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" -) - -func MariaDBVirtualNetworkRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.MariaDBVirtualNetworkRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/mariadb/validate/maria_db_virtual_network_rule_id_test.go b/internal/services/mariadb/validate/maria_db_virtual_network_rule_id_test.go deleted file mode 100644 index 99e3013e5da4..000000000000 --- a/internal/services/mariadb/validate/maria_db_virtual_network_rule_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestMariaDBVirtualNetworkRuleID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Valid: false, - }, - - { - // missing VirtualNetworkRuleName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/", - Valid: false, - }, - - { - // missing value for VirtualNetworkRuleName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/virtualNetworkRules/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1/virtualNetworkRules/vnetrule1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1/VIRTUALNETWORKRULES/VNETRULE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := MariaDBVirtualNetworkRuleID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/mariadb/validate/server_id.go b/internal/services/mariadb/validate/server_id.go deleted file mode 100644 index e3c030471093..000000000000 --- a/internal/services/mariadb/validate/server_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" -) - -func ServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.ServerID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/mariadb/validate/server_id_test.go b/internal/services/mariadb/validate/server_id_test.go deleted file mode 100644 index 2f1d7e91db3e..000000000000 --- a/internal/services/mariadb/validate/server_id_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestServerID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforMariaDB/servers/server1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.DBFORMARIADB/SERVERS/SERVER1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := ServerID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/network/private_endpoint_resource.go b/internal/services/network/private_endpoint_resource.go index 6bb98833fd41..89aa0215f18b 100644 --- a/internal/services/network/private_endpoint_resource.go +++ b/internal/services/network/private_endpoint_resource.go @@ -11,6 +11,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + mariaDB "github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers" "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers" "github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2018-09-01/privatezones" "github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2022-02-01/signalr" @@ -19,7 +20,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" cosmosParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/parse" - mariaDBParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/mariadb/parse" mysqlParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/mysql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate" @@ -673,7 +673,7 @@ func flattenPrivateLinkEndpointServiceConnection(serviceConnections *[]network.P } } if strings.Contains(strings.ToLower(privateConnectionId), "microsoft.dbformariadb") { - if serverId, err := mariaDBParse.ServerID(privateConnectionId); err == nil { + if serverId, err := mariaDB.ParseServerID(privateConnectionId); err == nil { privateConnectionId = serverId.ID() } } @@ -735,7 +735,7 @@ func flattenPrivateLinkEndpointServiceConnection(serviceConnections *[]network.P } } if strings.Contains(strings.ToLower(privateConnectionId), "microsoft.dbformariadb") { - if serverId, err := mariaDBParse.ServerID(privateConnectionId); err == nil { + if serverId, err := mariaDB.ParseServerID(privateConnectionId); err == nil { privateConnectionId = serverId.ID() } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/_meta.json deleted file mode 100644 index d12ba48ee266..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/mariadb/resource-manager/readme.md", - "tag": "package-2018-06-01", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-06-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mariadb/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/advisors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/advisors.go deleted file mode 100644 index 16f9345aa28d..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/advisors.go +++ /dev/null @@ -1,250 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// AdvisorsClient is the the Microsoft Azure management API provides create, read, update, and delete functionality for -// Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with -// new business model. -type AdvisorsClient struct { - BaseClient -} - -// NewAdvisorsClient creates an instance of the AdvisorsClient client. -func NewAdvisorsClient(subscriptionID string) AdvisorsClient { - return NewAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAdvisorsClientWithBaseURI creates an instance of the AdvisorsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) AdvisorsClient { - return AdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get get a recommendation action advisor. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// advisorName - the advisor name for recommendation action. -func (client AdvisorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, advisorName string) (result Advisor, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.AdvisorsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, advisorName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client AdvisorsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, advisorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "advisorName": autorest.Encode("path", advisorName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client AdvisorsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client AdvisorsClient) GetResponder(resp *http.Response) (result Advisor, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer list recommendation action advisors. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client AdvisorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result AdvisorsResultListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsClient.ListByServer") - defer func() { - sc := -1 - if result.arl.Response.Response != nil { - sc = result.arl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.AdvisorsClient", "ListByServer", err.Error()) - } - - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.arl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.arl, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.arl.hasNextLink() && result.arl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client AdvisorsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client AdvisorsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client AdvisorsClient) ListByServerResponder(resp *http.Response) (result AdvisorsResultList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client AdvisorsClient) listByServerNextResults(ctx context.Context, lastResults AdvisorsResultList) (result AdvisorsResultList, err error) { - req, err := lastResults.advisorsResultListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client AdvisorsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result AdvisorsResultListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/checknameavailability.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/checknameavailability.go deleted file mode 100644 index ad2217986167..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/checknameavailability.go +++ /dev/null @@ -1,118 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// CheckNameAvailabilityClient is the the Microsoft Azure management API provides create, read, update, and delete -// functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and -// configurations with new business model. -type CheckNameAvailabilityClient struct { - BaseClient -} - -// NewCheckNameAvailabilityClient creates an instance of the CheckNameAvailabilityClient client. -func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailabilityClient { - return NewCheckNameAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewCheckNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) CheckNameAvailabilityClient { - return CheckNameAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Execute check the availability of name for resource -// Parameters: -// nameAvailabilityRequest - the required parameters for checking if resource name is available. -func (client CheckNameAvailabilityClient) Execute(ctx context.Context, nameAvailabilityRequest NameAvailabilityRequest) (result NameAvailability, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/CheckNameAvailabilityClient.Execute") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: nameAvailabilityRequest, - Constraints: []validation.Constraint{{Target: "nameAvailabilityRequest.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.CheckNameAvailabilityClient", "Execute", err.Error()) - } - - req, err := client.ExecutePreparer(ctx, nameAvailabilityRequest) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.CheckNameAvailabilityClient", "Execute", nil, "Failure preparing request") - return - } - - resp, err := client.ExecuteSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.CheckNameAvailabilityClient", "Execute", resp, "Failure sending request") - return - } - - result, err = client.ExecuteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.CheckNameAvailabilityClient", "Execute", resp, "Failure responding to request") - return - } - - return -} - -// ExecutePreparer prepares the Execute request. -func (client CheckNameAvailabilityClient) ExecutePreparer(ctx context.Context, nameAvailabilityRequest NameAvailabilityRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DBForMariaDB/checkNameAvailability", pathParameters), - autorest.WithJSON(nameAvailabilityRequest), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ExecuteSender sends the Execute request. The method will close the -// http.Response Body if it receives an error. -func (client CheckNameAvailabilityClient) ExecuteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ExecuteResponder handles the response to the Execute request. The method always -// closes the http.Response Body. -func (client CheckNameAvailabilityClient) ExecuteResponder(resp *http.Response) (result NameAvailability, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/client.go deleted file mode 100644 index b4d263e8cfc4..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/client.go +++ /dev/null @@ -1,140 +0,0 @@ -// Package mariadb implements the Azure ARM Mariadb service API version 2018-06-01. -// -// The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MariaDB -// resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business -// model. -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -const ( - // DefaultBaseURI is the default URI used for the service Mariadb - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Mariadb. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} - -// CreateRecommendedActionSession create recommendation action session for the advisor. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// advisorName - the advisor name for recommendation action. -// databaseName - the name of the database. -func (client BaseClient) CreateRecommendedActionSession(ctx context.Context, resourceGroupName string, serverName string, advisorName string, databaseName string) (result CreateRecommendedActionSessionFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateRecommendedActionSession") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.BaseClient", "CreateRecommendedActionSession", err.Error()) - } - - req, err := client.CreateRecommendedActionSessionPreparer(ctx, resourceGroupName, serverName, advisorName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.BaseClient", "CreateRecommendedActionSession", nil, "Failure preparing request") - return - } - - result, err = client.CreateRecommendedActionSessionSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.BaseClient", "CreateRecommendedActionSession", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateRecommendedActionSessionPreparer prepares the CreateRecommendedActionSession request. -func (client BaseClient) CreateRecommendedActionSessionPreparer(ctx context.Context, resourceGroupName string, serverName string, advisorName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "advisorName": autorest.Encode("path", advisorName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - "databaseName": autorest.Encode("query", databaseName), - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateRecommendedActionSessionSender sends the CreateRecommendedActionSession request. The method will close the -// http.Response Body if it receives an error. -func (client BaseClient) CreateRecommendedActionSessionSender(req *http.Request) (future CreateRecommendedActionSessionFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateRecommendedActionSessionResponder handles the response to the CreateRecommendedActionSession request. The method always -// closes the http.Response Body. -func (client BaseClient) CreateRecommendedActionSessionResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/configurations.go deleted file mode 100644 index b694af5930fa..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/configurations.go +++ /dev/null @@ -1,302 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ConfigurationsClient is the the Microsoft Azure management API provides create, read, update, and delete -// functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and -// configurations with new business model. -type ConfigurationsClient struct { - BaseClient -} - -// NewConfigurationsClient creates an instance of the ConfigurationsClient client. -func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { - return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { - return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate updates a configuration of a server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// configurationName - the name of the server configuration. -// parameters - the required parameters for updating a server configuration. -func (client ConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration) (result ConfigurationsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ConfigurationsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, configurationName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/configurations/{configurationName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future ConfigurationsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result Configuration, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets information about a configuration of server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// configurationName - the name of the server configuration. -func (client ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, configurationName string) (result Configuration, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ConfigurationsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, configurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, configurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/configurations/{configurationName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ConfigurationsClient) GetResponder(resp *http.Response) (result Configuration, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer list all the configurations in a given server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client ConfigurationsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ConfigurationListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ConfigurationsClient", "ListByServer", err.Error()) - } - - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ConfigurationsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/configurations", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ConfigurationsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ConfigurationsClient) ListByServerResponder(resp *http.Response) (result ConfigurationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/databases.go deleted file mode 100644 index a913836a8477..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/databases.go +++ /dev/null @@ -1,392 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DatabasesClient is the the Microsoft Azure management API provides create, read, update, and delete functionality -// for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations -// with new business model. -type DatabasesClient struct { - BaseClient -} - -// NewDatabasesClient creates an instance of the DatabasesClient client. -func NewDatabasesClient(subscriptionID string) DatabasesClient { - return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { - return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a new database or updates an existing database. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// databaseName - the name of the database. -// parameters - the required parameters for creating or updating a database. -func (client DatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database) (result DatabasesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.DatabasesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/databases/{databaseName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (result Database, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a database. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DatabasesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.DatabasesClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DatabasesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) DeleteSender(req *http.Request) (future DatabasesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets information about a database. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// databaseName - the name of the database. -func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result Database, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.DatabasesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DatabasesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DatabasesClient) GetResponder(resp *http.Response) (result Database, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer list all the databases in a given server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client DatabasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result DatabaseListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.DatabasesClient", "ListByServer", err.Error()) - } - - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client DatabasesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/databases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ListByServerResponder(resp *http.Response) (result DatabaseListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/enums.go deleted file mode 100644 index e7858d2d7c9e..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/enums.go +++ /dev/null @@ -1,245 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// CreateMode enumerates the values for create mode. -type CreateMode string - -const ( - // CreateModeDefault ... - CreateModeDefault CreateMode = "Default" - // CreateModeGeoRestore ... - CreateModeGeoRestore CreateMode = "GeoRestore" - // CreateModePointInTimeRestore ... - CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" - // CreateModeReplica ... - CreateModeReplica CreateMode = "Replica" - // CreateModeServerPropertiesForCreate ... - CreateModeServerPropertiesForCreate CreateMode = "ServerPropertiesForCreate" -) - -// PossibleCreateModeValues returns an array of possible values for the CreateMode const type. -func PossibleCreateModeValues() []CreateMode { - return []CreateMode{CreateModeDefault, CreateModeGeoRestore, CreateModePointInTimeRestore, CreateModeReplica, CreateModeServerPropertiesForCreate} -} - -// GeoRedundantBackup enumerates the values for geo redundant backup. -type GeoRedundantBackup string - -const ( - // Disabled ... - Disabled GeoRedundantBackup = "Disabled" - // Enabled ... - Enabled GeoRedundantBackup = "Enabled" -) - -// PossibleGeoRedundantBackupValues returns an array of possible values for the GeoRedundantBackup const type. -func PossibleGeoRedundantBackupValues() []GeoRedundantBackup { - return []GeoRedundantBackup{Disabled, Enabled} -} - -// OperationOrigin enumerates the values for operation origin. -type OperationOrigin string - -const ( - // NotSpecified ... - NotSpecified OperationOrigin = "NotSpecified" - // System ... - System OperationOrigin = "system" - // User ... - User OperationOrigin = "user" -) - -// PossibleOperationOriginValues returns an array of possible values for the OperationOrigin const type. -func PossibleOperationOriginValues() []OperationOrigin { - return []OperationOrigin{NotSpecified, System, User} -} - -// PrivateEndpointProvisioningState enumerates the values for private endpoint provisioning state. -type PrivateEndpointProvisioningState string - -const ( - // Approving ... - Approving PrivateEndpointProvisioningState = "Approving" - // Dropping ... - Dropping PrivateEndpointProvisioningState = "Dropping" - // Failed ... - Failed PrivateEndpointProvisioningState = "Failed" - // Ready ... - Ready PrivateEndpointProvisioningState = "Ready" - // Rejecting ... - Rejecting PrivateEndpointProvisioningState = "Rejecting" -) - -// PossiblePrivateEndpointProvisioningStateValues returns an array of possible values for the PrivateEndpointProvisioningState const type. -func PossiblePrivateEndpointProvisioningStateValues() []PrivateEndpointProvisioningState { - return []PrivateEndpointProvisioningState{Approving, Dropping, Failed, Ready, Rejecting} -} - -// PrivateLinkServiceConnectionStateActionsRequire enumerates the values for private link service connection -// state actions require. -type PrivateLinkServiceConnectionStateActionsRequire string - -const ( - // None ... - None PrivateLinkServiceConnectionStateActionsRequire = "None" -) - -// PossiblePrivateLinkServiceConnectionStateActionsRequireValues returns an array of possible values for the PrivateLinkServiceConnectionStateActionsRequire const type. -func PossiblePrivateLinkServiceConnectionStateActionsRequireValues() []PrivateLinkServiceConnectionStateActionsRequire { - return []PrivateLinkServiceConnectionStateActionsRequire{None} -} - -// PrivateLinkServiceConnectionStateStatus enumerates the values for private link service connection state -// status. -type PrivateLinkServiceConnectionStateStatus string - -const ( - // Approved ... - Approved PrivateLinkServiceConnectionStateStatus = "Approved" - // Disconnected ... - Disconnected PrivateLinkServiceConnectionStateStatus = "Disconnected" - // Pending ... - Pending PrivateLinkServiceConnectionStateStatus = "Pending" - // Rejected ... - Rejected PrivateLinkServiceConnectionStateStatus = "Rejected" -) - -// PossiblePrivateLinkServiceConnectionStateStatusValues returns an array of possible values for the PrivateLinkServiceConnectionStateStatus const type. -func PossiblePrivateLinkServiceConnectionStateStatusValues() []PrivateLinkServiceConnectionStateStatus { - return []PrivateLinkServiceConnectionStateStatus{Approved, Disconnected, Pending, Rejected} -} - -// PublicNetworkAccessEnum enumerates the values for public network access enum. -type PublicNetworkAccessEnum string - -const ( - // PublicNetworkAccessEnumDisabled ... - PublicNetworkAccessEnumDisabled PublicNetworkAccessEnum = "Disabled" - // PublicNetworkAccessEnumEnabled ... - PublicNetworkAccessEnumEnabled PublicNetworkAccessEnum = "Enabled" -) - -// PossiblePublicNetworkAccessEnumValues returns an array of possible values for the PublicNetworkAccessEnum const type. -func PossiblePublicNetworkAccessEnumValues() []PublicNetworkAccessEnum { - return []PublicNetworkAccessEnum{PublicNetworkAccessEnumDisabled, PublicNetworkAccessEnumEnabled} -} - -// ServerSecurityAlertPolicyState enumerates the values for server security alert policy state. -type ServerSecurityAlertPolicyState string - -const ( - // ServerSecurityAlertPolicyStateDisabled ... - ServerSecurityAlertPolicyStateDisabled ServerSecurityAlertPolicyState = "Disabled" - // ServerSecurityAlertPolicyStateEnabled ... - ServerSecurityAlertPolicyStateEnabled ServerSecurityAlertPolicyState = "Enabled" -) - -// PossibleServerSecurityAlertPolicyStateValues returns an array of possible values for the ServerSecurityAlertPolicyState const type. -func PossibleServerSecurityAlertPolicyStateValues() []ServerSecurityAlertPolicyState { - return []ServerSecurityAlertPolicyState{ServerSecurityAlertPolicyStateDisabled, ServerSecurityAlertPolicyStateEnabled} -} - -// ServerState enumerates the values for server state. -type ServerState string - -const ( - // ServerStateDisabled ... - ServerStateDisabled ServerState = "Disabled" - // ServerStateDropping ... - ServerStateDropping ServerState = "Dropping" - // ServerStateReady ... - ServerStateReady ServerState = "Ready" -) - -// PossibleServerStateValues returns an array of possible values for the ServerState const type. -func PossibleServerStateValues() []ServerState { - return []ServerState{ServerStateDisabled, ServerStateDropping, ServerStateReady} -} - -// ServerVersion enumerates the values for server version. -type ServerVersion string - -const ( - // FiveFullStopSeven ... - FiveFullStopSeven ServerVersion = "5.7" - // FiveFullStopSix ... - FiveFullStopSix ServerVersion = "5.6" -) - -// PossibleServerVersionValues returns an array of possible values for the ServerVersion const type. -func PossibleServerVersionValues() []ServerVersion { - return []ServerVersion{FiveFullStopSeven, FiveFullStopSix} -} - -// SkuTier enumerates the values for sku tier. -type SkuTier string - -const ( - // Basic ... - Basic SkuTier = "Basic" - // GeneralPurpose ... - GeneralPurpose SkuTier = "GeneralPurpose" - // MemoryOptimized ... - MemoryOptimized SkuTier = "MemoryOptimized" -) - -// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. -func PossibleSkuTierValues() []SkuTier { - return []SkuTier{Basic, GeneralPurpose, MemoryOptimized} -} - -// SslEnforcementEnum enumerates the values for ssl enforcement enum. -type SslEnforcementEnum string - -const ( - // SslEnforcementEnumDisabled ... - SslEnforcementEnumDisabled SslEnforcementEnum = "Disabled" - // SslEnforcementEnumEnabled ... - SslEnforcementEnumEnabled SslEnforcementEnum = "Enabled" -) - -// PossibleSslEnforcementEnumValues returns an array of possible values for the SslEnforcementEnum const type. -func PossibleSslEnforcementEnumValues() []SslEnforcementEnum { - return []SslEnforcementEnum{SslEnforcementEnumDisabled, SslEnforcementEnumEnabled} -} - -// StorageAutogrow enumerates the values for storage autogrow. -type StorageAutogrow string - -const ( - // StorageAutogrowDisabled ... - StorageAutogrowDisabled StorageAutogrow = "Disabled" - // StorageAutogrowEnabled ... - StorageAutogrowEnabled StorageAutogrow = "Enabled" -) - -// PossibleStorageAutogrowValues returns an array of possible values for the StorageAutogrow const type. -func PossibleStorageAutogrowValues() []StorageAutogrow { - return []StorageAutogrow{StorageAutogrowDisabled, StorageAutogrowEnabled} -} - -// VirtualNetworkRuleState enumerates the values for virtual network rule state. -type VirtualNetworkRuleState string - -const ( - // VirtualNetworkRuleStateDeleting ... - VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" - // VirtualNetworkRuleStateInitializing ... - VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" - // VirtualNetworkRuleStateInProgress ... - VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" - // VirtualNetworkRuleStateReady ... - VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" - // VirtualNetworkRuleStateUnknown ... - VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" -) - -// PossibleVirtualNetworkRuleStateValues returns an array of possible values for the VirtualNetworkRuleState const type. -func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState { - return []VirtualNetworkRuleState{VirtualNetworkRuleStateDeleting, VirtualNetworkRuleStateInitializing, VirtualNetworkRuleStateInProgress, VirtualNetworkRuleStateReady, VirtualNetworkRuleStateUnknown} -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/firewallrules.go deleted file mode 100644 index b8fe7610802b..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/firewallrules.go +++ /dev/null @@ -1,399 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// FirewallRulesClient is the the Microsoft Azure management API provides create, read, update, and delete -// functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and -// configurations with new business model. -type FirewallRulesClient struct { - BaseClient -} - -// NewFirewallRulesClient creates an instance of the FirewallRulesClient client. -func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { - return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { - return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a new firewall rule or updates an existing firewall rule. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// firewallRuleName - the name of the server firewall rule. -// parameters - the required parameters for creating or updating a firewall rule. -func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule) (result FirewallRulesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.FirewallRuleProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.FirewallRuleProperties.StartIPAddress", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.FirewallRuleProperties.StartIPAddress", Name: validation.Pattern, Rule: `^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`, Chain: nil}}}, - {Target: "parameters.FirewallRuleProperties.EndIPAddress", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.FirewallRuleProperties.EndIPAddress", Name: validation.Pattern, Rule: `^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`, Chain: nil}}}, - }}}}}); err != nil { - return result, validation.NewError("mariadb.FirewallRulesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, firewallRuleName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client FirewallRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallRuleName": autorest.Encode("path", firewallRuleName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/firewallRules/{firewallRuleName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallRulesClient) CreateOrUpdateSender(req *http.Request) (future FirewallRulesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a server firewall rule. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// firewallRuleName - the name of the server firewall rule. -func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRulesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.FirewallRulesClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, firewallRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client FirewallRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallRuleName": autorest.Encode("path", firewallRuleName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/firewallRules/{firewallRuleName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallRulesClient) DeleteSender(req *http.Request) (future FirewallRulesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets information about a server firewall rule. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// firewallRuleName - the name of the server firewall rule. -func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.FirewallRulesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, firewallRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client FirewallRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallRuleName": autorest.Encode("path", firewallRuleName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/firewallRules/{firewallRuleName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallRulesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client FirewallRulesClient) GetResponder(resp *http.Response) (result FirewallRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer list all the firewall rules in a given server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client FirewallRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result FirewallRuleListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.FirewallRulesClient", "ListByServer", err.Error()) - } - - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client FirewallRulesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/firewallRules", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallRulesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client FirewallRulesClient) ListByServerResponder(resp *http.Response) (result FirewallRuleListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedperformancetier.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedperformancetier.go deleted file mode 100644 index 344821554017..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedperformancetier.go +++ /dev/null @@ -1,115 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LocationBasedPerformanceTierClient is the the Microsoft Azure management API provides create, read, update, and -// delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files -// and configurations with new business model. -type LocationBasedPerformanceTierClient struct { - BaseClient -} - -// NewLocationBasedPerformanceTierClient creates an instance of the LocationBasedPerformanceTierClient client. -func NewLocationBasedPerformanceTierClient(subscriptionID string) LocationBasedPerformanceTierClient { - return NewLocationBasedPerformanceTierClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLocationBasedPerformanceTierClientWithBaseURI creates an instance of the LocationBasedPerformanceTierClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedPerformanceTierClient { - return LocationBasedPerformanceTierClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List list all the performance tiers at specified location in a given subscription. -// Parameters: -// locationName - the name of the location. -func (client LocationBasedPerformanceTierClient) List(ctx context.Context, locationName string) (result PerformanceTierListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedPerformanceTierClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.LocationBasedPerformanceTierClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx, locationName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedPerformanceTierClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedPerformanceTierClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedPerformanceTierClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client LocationBasedPerformanceTierClient) ListPreparer(ctx context.Context, locationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DBForMariaDB/locations/{locationName}/performanceTiers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client LocationBasedPerformanceTierClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client LocationBasedPerformanceTierClient) ListResponder(resp *http.Response) (result PerformanceTierListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsoperationstatus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsoperationstatus.go deleted file mode 100644 index b1ad76e27196..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsoperationstatus.go +++ /dev/null @@ -1,118 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LocationBasedRecommendedActionSessionsOperationStatusClient is the the Microsoft Azure management API provides -// create, read, update, and delete functionality for Azure MariaDB resources including servers, databases, firewall -// rules, VNET rules, log files and configurations with new business model. -type LocationBasedRecommendedActionSessionsOperationStatusClient struct { - BaseClient -} - -// NewLocationBasedRecommendedActionSessionsOperationStatusClient creates an instance of the -// LocationBasedRecommendedActionSessionsOperationStatusClient client. -func NewLocationBasedRecommendedActionSessionsOperationStatusClient(subscriptionID string) LocationBasedRecommendedActionSessionsOperationStatusClient { - return NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI creates an instance of the -// LocationBasedRecommendedActionSessionsOperationStatusClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedRecommendedActionSessionsOperationStatusClient { - return LocationBasedRecommendedActionSessionsOperationStatusClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get recommendation action session operation status. -// Parameters: -// locationName - the name of the location. -// operationID - the operation identifier. -func (client LocationBasedRecommendedActionSessionsOperationStatusClient) Get(ctx context.Context, locationName string, operationID string) (result RecommendedActionSessionsOperationStatus, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedRecommendedActionSessionsOperationStatusClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.LocationBasedRecommendedActionSessionsOperationStatusClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, locationName, operationID) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsOperationStatusClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsOperationStatusClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsOperationStatusClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client LocationBasedRecommendedActionSessionsOperationStatusClient) GetPreparer(ctx context.Context, locationName string, operationID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "operationId": autorest.Encode("path", operationID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/recommendedActionSessionsAzureAsyncOperation/{operationId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client LocationBasedRecommendedActionSessionsOperationStatusClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client LocationBasedRecommendedActionSessionsOperationStatusClient) GetResponder(resp *http.Response) (result RecommendedActionSessionsOperationStatus, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsresult.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsresult.go deleted file mode 100644 index ed1f515670ca..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsresult.go +++ /dev/null @@ -1,160 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LocationBasedRecommendedActionSessionsResultClient is the the Microsoft Azure management API provides create, read, -// update, and delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET -// rules, log files and configurations with new business model. -type LocationBasedRecommendedActionSessionsResultClient struct { - BaseClient -} - -// NewLocationBasedRecommendedActionSessionsResultClient creates an instance of the -// LocationBasedRecommendedActionSessionsResultClient client. -func NewLocationBasedRecommendedActionSessionsResultClient(subscriptionID string) LocationBasedRecommendedActionSessionsResultClient { - return NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI creates an instance of the -// LocationBasedRecommendedActionSessionsResultClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedRecommendedActionSessionsResultClient { - return LocationBasedRecommendedActionSessionsResultClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List recommendation action session operation result. -// Parameters: -// locationName - the name of the location. -// operationID - the operation identifier. -func (client LocationBasedRecommendedActionSessionsResultClient) List(ctx context.Context, locationName string, operationID string) (result RecommendationActionsResultListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedRecommendedActionSessionsResultClient.List") - defer func() { - sc := -1 - if result.rarl.Response.Response != nil { - sc = result.rarl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.LocationBasedRecommendedActionSessionsResultClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, locationName, operationID) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rarl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "List", resp, "Failure sending request") - return - } - - result.rarl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "List", resp, "Failure responding to request") - return - } - if result.rarl.hasNextLink() && result.rarl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client LocationBasedRecommendedActionSessionsResultClient) ListPreparer(ctx context.Context, locationName string, operationID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "operationId": autorest.Encode("path", operationID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/recommendedActionSessionsOperationResults/{operationId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client LocationBasedRecommendedActionSessionsResultClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client LocationBasedRecommendedActionSessionsResultClient) ListResponder(resp *http.Response) (result RecommendationActionsResultList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client LocationBasedRecommendedActionSessionsResultClient) listNextResults(ctx context.Context, lastResults RecommendationActionsResultList) (result RecommendationActionsResultList, err error) { - req, err := lastResults.recommendationActionsResultListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client LocationBasedRecommendedActionSessionsResultClient) ListComplete(ctx context.Context, locationName string, operationID string) (result RecommendationActionsResultListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedRecommendedActionSessionsResultClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, locationName, operationID) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/logfiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/logfiles.go deleted file mode 100644 index d4bace6ef787..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/logfiles.go +++ /dev/null @@ -1,120 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LogFilesClient is the the Microsoft Azure management API provides create, read, update, and delete functionality for -// Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with -// new business model. -type LogFilesClient struct { - BaseClient -} - -// NewLogFilesClient creates an instance of the LogFilesClient client. -func NewLogFilesClient(subscriptionID string) LogFilesClient { - return NewLogFilesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewLogFilesClientWithBaseURI(baseURI string, subscriptionID string) LogFilesClient { - return LogFilesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByServer list all the log files in a given server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client LogFilesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result LogFileListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LogFilesClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.LogFilesClient", "ListByServer", err.Error()) - } - - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.LogFilesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.LogFilesClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.LogFilesClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client LogFilesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/logFiles", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client LogFilesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client LogFilesClient) ListByServerResponder(resp *http.Response) (result LogFileListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/models.go deleted file mode 100644 index 6f7ac5dd7f23..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/models.go +++ /dev/null @@ -1,4337 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb" - -// Advisor represents a recommendation action advisor. -type Advisor struct { - autorest.Response `json:"-"` - // Properties - The properties of a recommendation action advisor. - Properties interface{} `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Advisor. -func (a Advisor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if a.Properties != nil { - objectMap["properties"] = a.Properties - } - return json.Marshal(objectMap) -} - -// AdvisorsResultList a list of query statistics. -type AdvisorsResultList struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of recommendation action advisors. - Value *[]Advisor `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for AdvisorsResultList. -func (arl AdvisorsResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AdvisorsResultListIterator provides access to a complete listing of Advisor values. -type AdvisorsResultListIterator struct { - i int - page AdvisorsResultListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *AdvisorsResultListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsResultListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *AdvisorsResultListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AdvisorsResultListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter AdvisorsResultListIterator) Response() AdvisorsResultList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter AdvisorsResultListIterator) Value() Advisor { - if !iter.page.NotDone() { - return Advisor{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AdvisorsResultListIterator type. -func NewAdvisorsResultListIterator(page AdvisorsResultListPage) AdvisorsResultListIterator { - return AdvisorsResultListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (arl AdvisorsResultList) IsEmpty() bool { - return arl.Value == nil || len(*arl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (arl AdvisorsResultList) hasNextLink() bool { - return arl.NextLink != nil && len(*arl.NextLink) != 0 -} - -// advisorsResultListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (arl AdvisorsResultList) advisorsResultListPreparer(ctx context.Context) (*http.Request, error) { - if !arl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(arl.NextLink))) -} - -// AdvisorsResultListPage contains a page of Advisor values. -type AdvisorsResultListPage struct { - fn func(context.Context, AdvisorsResultList) (AdvisorsResultList, error) - arl AdvisorsResultList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *AdvisorsResultListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsResultListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.arl) - if err != nil { - return err - } - page.arl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *AdvisorsResultListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AdvisorsResultListPage) NotDone() bool { - return !page.arl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AdvisorsResultListPage) Response() AdvisorsResultList { - return page.arl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AdvisorsResultListPage) Values() []Advisor { - if page.arl.IsEmpty() { - return nil - } - return *page.arl.Value -} - -// Creates a new instance of the AdvisorsResultListPage type. -func NewAdvisorsResultListPage(cur AdvisorsResultList, getNextPage func(context.Context, AdvisorsResultList) (AdvisorsResultList, error)) AdvisorsResultListPage { - return AdvisorsResultListPage{ - fn: getNextPage, - arl: cur, - } -} - -// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. -type AzureEntityResource struct { - // Etag - READ-ONLY; Resource Etag. - Etag *string `json:"etag,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureEntityResource. -func (aer AzureEntityResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// CloudError an error response from the Batch service. -type CloudError struct { - Error *ErrorResponse `json:"error,omitempty"` -} - -// Configuration represents a Configuration. -type Configuration struct { - autorest.Response `json:"-"` - // ConfigurationProperties - The properties of a configuration. - *ConfigurationProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Configuration. -func (c Configuration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.ConfigurationProperties != nil { - objectMap["properties"] = c.ConfigurationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Configuration struct. -func (c *Configuration) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var configurationProperties ConfigurationProperties - err = json.Unmarshal(*v, &configurationProperties) - if err != nil { - return err - } - c.ConfigurationProperties = &configurationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - c.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - c.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - c.Type = &typeVar - } - } - } - - return nil -} - -// ConfigurationListResult a list of server configurations. -type ConfigurationListResult struct { - autorest.Response `json:"-"` - // Value - The list of server configurations. - Value *[]Configuration `json:"value,omitempty"` -} - -// ConfigurationProperties the properties of a configuration. -type ConfigurationProperties struct { - // Value - Value of the configuration. - Value *string `json:"value,omitempty"` - // Description - READ-ONLY; Description of the configuration. - Description *string `json:"description,omitempty"` - // DefaultValue - READ-ONLY; Default value of the configuration. - DefaultValue *string `json:"defaultValue,omitempty"` - // DataType - READ-ONLY; Data type of the configuration. - DataType *string `json:"dataType,omitempty"` - // AllowedValues - READ-ONLY; Allowed values of the configuration. - AllowedValues *string `json:"allowedValues,omitempty"` - // Source - Source of the configuration. - Source *string `json:"source,omitempty"` -} - -// MarshalJSON is the custom marshaler for ConfigurationProperties. -func (cp ConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cp.Value != nil { - objectMap["value"] = cp.Value - } - if cp.Source != nil { - objectMap["source"] = cp.Source - } - return json.Marshal(objectMap) -} - -// ConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ConfigurationsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ConfigurationsClient) (Configuration, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ConfigurationsCreateOrUpdateFuture.Result. -func (future *ConfigurationsCreateOrUpdateFuture) result(client ConfigurationsClient) (c Configuration, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - c.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.ConfigurationsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent { - c, err = client.CreateOrUpdateResponder(c.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsCreateOrUpdateFuture", "Result", c.Response.Response, "Failure responding to request") - } - } - return -} - -// CreateRecommendedActionSessionFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type CreateRecommendedActionSessionFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(BaseClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *CreateRecommendedActionSessionFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for CreateRecommendedActionSessionFuture.Result. -func (future *CreateRecommendedActionSessionFuture) result(client BaseClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.CreateRecommendedActionSessionFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.CreateRecommendedActionSessionFuture") - return - } - ar.Response = future.Response() - return -} - -// Database represents a Database. -type Database struct { - autorest.Response `json:"-"` - // DatabaseProperties - The properties of a database. - *DatabaseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Database. -func (d Database) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if d.DatabaseProperties != nil { - objectMap["properties"] = d.DatabaseProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Database struct. -func (d *Database) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var databaseProperties DatabaseProperties - err = json.Unmarshal(*v, &databaseProperties) - if err != nil { - return err - } - d.DatabaseProperties = &databaseProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - d.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - d.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - d.Type = &typeVar - } - } - } - - return nil -} - -// DatabaseListResult a List of databases. -type DatabaseListResult struct { - autorest.Response `json:"-"` - // Value - The list of databases housed in a server - Value *[]Database `json:"value,omitempty"` -} - -// DatabaseProperties the properties of a database. -type DatabaseProperties struct { - // Charset - The charset of the database. - Charset *string `json:"charset,omitempty"` - // Collation - The collation of the database. - Collation *string `json:"collation,omitempty"` -} - -// DatabasesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DatabasesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (Database, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesCreateOrUpdateFuture.Result. -func (future *DatabasesCreateOrUpdateFuture) result(client DatabasesClient) (d Database, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - d.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.DatabasesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent { - d, err = client.CreateOrUpdateResponder(d.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request") - } - } - return -} - -// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DatabasesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DatabasesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DatabasesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DatabasesDeleteFuture.Result. -func (future *DatabasesDeleteFuture) result(client DatabasesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.DatabasesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.DatabasesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ErrorAdditionalInfo the resource management error additional info. -type ErrorAdditionalInfo struct { - // Type - READ-ONLY; The additional info type. - Type *string `json:"type,omitempty"` - // Info - READ-ONLY; The additional info. - Info interface{} `json:"info,omitempty"` -} - -// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. -func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for -// failed operations. (This also follows the OData error response format.) -type ErrorResponse struct { - // Code - READ-ONLY; The error code. - Code *string `json:"code,omitempty"` - // Message - READ-ONLY; The error message. - Message *string `json:"message,omitempty"` - // Target - READ-ONLY; The error target. - Target *string `json:"target,omitempty"` - // Details - READ-ONLY; The error details. - Details *[]ErrorResponse `json:"details,omitempty"` - // AdditionalInfo - READ-ONLY; The error additional info. - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` -} - -// MarshalJSON is the custom marshaler for ErrorResponse. -func (er ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// FirewallRule represents a server firewall rule. -type FirewallRule struct { - autorest.Response `json:"-"` - // FirewallRuleProperties - The properties of a firewall rule. - *FirewallRuleProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FirewallRule. -func (fr FirewallRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fr.FirewallRuleProperties != nil { - objectMap["properties"] = fr.FirewallRuleProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FirewallRule struct. -func (fr *FirewallRule) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var firewallRuleProperties FirewallRuleProperties - err = json.Unmarshal(*v, &firewallRuleProperties) - if err != nil { - return err - } - fr.FirewallRuleProperties = &firewallRuleProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fr.Type = &typeVar - } - } - } - - return nil -} - -// FirewallRuleListResult a list of firewall rules. -type FirewallRuleListResult struct { - autorest.Response `json:"-"` - // Value - The list of firewall rules in a server. - Value *[]FirewallRule `json:"value,omitempty"` -} - -// FirewallRuleProperties the properties of a server firewall rule. -type FirewallRuleProperties struct { - // StartIPAddress - The start IP address of the server firewall rule. Must be IPv4 format. - StartIPAddress *string `json:"startIpAddress,omitempty"` - // EndIPAddress - The end IP address of the server firewall rule. Must be IPv4 format. - EndIPAddress *string `json:"endIpAddress,omitempty"` -} - -// FirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type FirewallRulesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FirewallRulesClient) (FirewallRule, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FirewallRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FirewallRulesCreateOrUpdateFuture.Result. -func (future *FirewallRulesCreateOrUpdateFuture) result(client FirewallRulesClient) (fr FirewallRule, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.FirewallRulesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fr.Response.Response, err = future.GetResult(sender); err == nil && fr.Response.Response.StatusCode != http.StatusNoContent { - fr, err = client.CreateOrUpdateResponder(fr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesCreateOrUpdateFuture", "Result", fr.Response.Response, "Failure responding to request") - } - } - return -} - -// FirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type FirewallRulesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FirewallRulesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FirewallRulesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FirewallRulesDeleteFuture.Result. -func (future *FirewallRulesDeleteFuture) result(client FirewallRulesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.FirewallRulesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// LogFile represents a log file. -type LogFile struct { - // LogFileProperties - The properties of the log file. - *LogFileProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for LogFile. -func (lf LogFile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lf.LogFileProperties != nil { - objectMap["properties"] = lf.LogFileProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for LogFile struct. -func (lf *LogFile) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var logFileProperties LogFileProperties - err = json.Unmarshal(*v, &logFileProperties) - if err != nil { - return err - } - lf.LogFileProperties = &logFileProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - lf.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - lf.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - lf.Type = &typeVar - } - } - } - - return nil -} - -// LogFileListResult a list of log files. -type LogFileListResult struct { - autorest.Response `json:"-"` - // Value - The list of log files. - Value *[]LogFile `json:"value,omitempty"` -} - -// LogFileProperties the properties of a log file. -type LogFileProperties struct { - // SizeInKB - Size of the log file. - SizeInKB *int64 `json:"sizeInKB,omitempty"` - // CreatedTime - READ-ONLY; Creation timestamp of the log file. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // LastModifiedTime - READ-ONLY; Last modified timestamp of the log file. - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` - // Type - Type of the log file. - Type *string `json:"type,omitempty"` - // URL - READ-ONLY; The url to download the log file from. - URL *string `json:"url,omitempty"` -} - -// MarshalJSON is the custom marshaler for LogFileProperties. -func (lfp LogFileProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lfp.SizeInKB != nil { - objectMap["sizeInKB"] = lfp.SizeInKB - } - if lfp.Type != nil { - objectMap["type"] = lfp.Type - } - return json.Marshal(objectMap) -} - -// NameAvailability represents a resource name availability. -type NameAvailability struct { - autorest.Response `json:"-"` - // Message - Error Message. - Message *string `json:"message,omitempty"` - // NameAvailable - Indicates whether the resource name is available. - NameAvailable *bool `json:"nameAvailable,omitempty"` - // Reason - Reason for name being unavailable. - Reason *string `json:"reason,omitempty"` -} - -// NameAvailabilityRequest request from client to check resource name availability. -type NameAvailabilityRequest struct { - // Name - Resource name to verify. - Name *string `json:"name,omitempty"` - // Type - Resource type used for verification. - Type *string `json:"type,omitempty"` -} - -// Operation REST API operation definition. -type Operation struct { - // Name - READ-ONLY; The name of the operation being performed on this particular object. - Name *string `json:"name,omitempty"` - // Display - READ-ONLY; The localized display information for this particular operation or action. - Display *OperationDisplay `json:"display,omitempty"` - // Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'NotSpecified', 'User', 'System' - Origin OperationOrigin `json:"origin,omitempty"` - // Properties - READ-ONLY; Additional descriptions for the operation. - Properties map[string]interface{} `json:"properties"` -} - -// MarshalJSON is the custom marshaler for Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationDisplay display metadata associated with the operation. -type OperationDisplay struct { - // Provider - READ-ONLY; Operation resource provider name. - Provider *string `json:"provider,omitempty"` - // Resource - READ-ONLY; Resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` - // Operation - READ-ONLY; Localized friendly name for the operation. - Operation *string `json:"operation,omitempty"` - // Description - READ-ONLY; Operation description. - Description *string `json:"description,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationDisplay. -func (od OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationListResult a list of resource provider operations. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - The list of resource provider operations. - Value *[]Operation `json:"value,omitempty"` -} - -// PerformanceTierListResult a list of performance tiers. -type PerformanceTierListResult struct { - autorest.Response `json:"-"` - // Value - The list of performance tiers - Value *[]PerformanceTierProperties `json:"value,omitempty"` -} - -// PerformanceTierProperties performance tier properties -type PerformanceTierProperties struct { - // ID - ID of the performance tier. - ID *string `json:"id,omitempty"` - // ServiceLevelObjectives - Service level objectives associated with the performance tier - ServiceLevelObjectives *[]PerformanceTierServiceLevelObjectives `json:"serviceLevelObjectives,omitempty"` -} - -// PerformanceTierServiceLevelObjectives service level objectives for performance tier. -type PerformanceTierServiceLevelObjectives struct { - // ID - ID for the service level objective. - ID *string `json:"id,omitempty"` - // Edition - Edition of the performance tier. - Edition *string `json:"edition,omitempty"` - // VCore - vCore associated with the service level objective - VCore *int32 `json:"vCore,omitempty"` - // HardwareGeneration - Hardware generation associated with the service level objective - HardwareGeneration *string `json:"hardwareGeneration,omitempty"` - // MaxBackupRetentionDays - Maximum Backup retention in days for the performance tier edition - MaxBackupRetentionDays *int32 `json:"maxBackupRetentionDays,omitempty"` - // MinBackupRetentionDays - Minimum Backup retention in days for the performance tier edition - MinBackupRetentionDays *int32 `json:"minBackupRetentionDays,omitempty"` - // MaxStorageMB - Max storage allowed for a server. - MaxStorageMB *int32 `json:"maxStorageMB,omitempty"` - // MinStorageMB - Max storage allowed for a server. - MinStorageMB *int32 `json:"minStorageMB,omitempty"` -} - -// PrivateEndpointConnection a private endpoint connection -type PrivateEndpointConnection struct { - autorest.Response `json:"-"` - // PrivateEndpointConnectionProperties - Resource properties. - *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpointConnection. -func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pec.PrivateEndpointConnectionProperties != nil { - objectMap["properties"] = pec.PrivateEndpointConnectionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. -func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var privateEndpointConnectionProperties PrivateEndpointConnectionProperties - err = json.Unmarshal(*v, &privateEndpointConnectionProperties) - if err != nil { - return err - } - pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pec.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pec.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pec.Type = &typeVar - } - } - } - - return nil -} - -// PrivateEndpointConnectionListResult a list of private endpoint connections. -type PrivateEndpointConnectionListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]PrivateEndpointConnection `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult. -func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PrivateEndpointConnectionListResultIterator provides access to a complete listing of -// PrivateEndpointConnection values. -type PrivateEndpointConnectionListResultIterator struct { - i int - page PrivateEndpointConnectionListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *PrivateEndpointConnectionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection { - if !iter.page.NotDone() { - return PrivateEndpointConnection{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the PrivateEndpointConnectionListResultIterator type. -func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { - return PrivateEndpointConnectionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool { - return peclr.Value == nil || len(*peclr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool { - return peclr.NextLink != nil && len(*peclr.NextLink) != 0 -} - -// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { - if !peclr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(peclr.NextLink))) -} - -// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values. -type PrivateEndpointConnectionListResultPage struct { - fn func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error) - peclr PrivateEndpointConnectionListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.peclr) - if err != nil { - return err - } - page.peclr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *PrivateEndpointConnectionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PrivateEndpointConnectionListResultPage) NotDone() bool { - return !page.peclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult { - return page.peclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection { - if page.peclr.IsEmpty() { - return nil - } - return *page.peclr.Value -} - -// Creates a new instance of the PrivateEndpointConnectionListResultPage type. -func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { - return PrivateEndpointConnectionListResultPage{ - fn: getNextPage, - peclr: cur, - } -} - -// PrivateEndpointConnectionProperties properties of a private endpoint connection. -type PrivateEndpointConnectionProperties struct { - // PrivateEndpoint - Private endpoint which the connection belongs to. - PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` - // PrivateLinkServiceConnectionState - Connection state of the private endpoint connection. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` - // ProvisioningState - READ-ONLY; State of the private endpoint connection. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties. -func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pecp.PrivateEndpoint != nil { - objectMap["privateEndpoint"] = pecp.PrivateEndpoint - } - if pecp.PrivateLinkServiceConnectionState != nil { - objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState - } - return json.Marshal(objectMap) -} - -// PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type PrivateEndpointConnectionsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateEndpointConnectionsCreateOrUpdateFuture.Result. -func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pec.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.PrivateEndpointConnectionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent { - pec, err = client.CreateOrUpdateResponder(pec.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", pec.Response.Response, "Failure responding to request") - } - } - return -} - -// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PrivateEndpointConnectionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateEndpointConnectionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result. -func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.PrivateEndpointConnectionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// PrivateEndpointConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PrivateEndpointConnectionsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateEndpointConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateEndpointConnectionsUpdateTagsFuture.Result. -func (future *PrivateEndpointConnectionsUpdateTagsFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pec.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.PrivateEndpointConnectionsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent { - pec, err = client.UpdateTagsResponder(pec.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsUpdateTagsFuture", "Result", pec.Response.Response, "Failure responding to request") - } - } - return -} - -// PrivateEndpointProperty ... -type PrivateEndpointProperty struct { - // ID - Resource id of the private endpoint. - ID *string `json:"id,omitempty"` -} - -// PrivateLinkResource a private link resource -type PrivateLinkResource struct { - autorest.Response `json:"-"` - // Properties - READ-ONLY; The private link resource group id. - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateLinkResource. -func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PrivateLinkResourceListResult a list of private link resources -type PrivateLinkResourceListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]PrivateLinkResource `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateLinkResourceListResult. -func (plrlr PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PrivateLinkResourceListResultIterator provides access to a complete listing of PrivateLinkResource -// values. -type PrivateLinkResourceListResultIterator struct { - i int - page PrivateLinkResourceListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *PrivateLinkResourceListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourceListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *PrivateLinkResourceListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PrivateLinkResourceListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter PrivateLinkResourceListResultIterator) Response() PrivateLinkResourceListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter PrivateLinkResourceListResultIterator) Value() PrivateLinkResource { - if !iter.page.NotDone() { - return PrivateLinkResource{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the PrivateLinkResourceListResultIterator type. -func NewPrivateLinkResourceListResultIterator(page PrivateLinkResourceListResultPage) PrivateLinkResourceListResultIterator { - return PrivateLinkResourceListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (plrlr PrivateLinkResourceListResult) IsEmpty() bool { - return plrlr.Value == nil || len(*plrlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (plrlr PrivateLinkResourceListResult) hasNextLink() bool { - return plrlr.NextLink != nil && len(*plrlr.NextLink) != 0 -} - -// privateLinkResourceListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (plrlr PrivateLinkResourceListResult) privateLinkResourceListResultPreparer(ctx context.Context) (*http.Request, error) { - if !plrlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(plrlr.NextLink))) -} - -// PrivateLinkResourceListResultPage contains a page of PrivateLinkResource values. -type PrivateLinkResourceListResultPage struct { - fn func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error) - plrlr PrivateLinkResourceListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *PrivateLinkResourceListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourceListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.plrlr) - if err != nil { - return err - } - page.plrlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *PrivateLinkResourceListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PrivateLinkResourceListResultPage) NotDone() bool { - return !page.plrlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page PrivateLinkResourceListResultPage) Response() PrivateLinkResourceListResult { - return page.plrlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page PrivateLinkResourceListResultPage) Values() []PrivateLinkResource { - if page.plrlr.IsEmpty() { - return nil - } - return *page.plrlr.Value -} - -// Creates a new instance of the PrivateLinkResourceListResultPage type. -func NewPrivateLinkResourceListResultPage(cur PrivateLinkResourceListResult, getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { - return PrivateLinkResourceListResultPage{ - fn: getNextPage, - plrlr: cur, - } -} - -// PrivateLinkResourceProperties properties of a private link resource. -type PrivateLinkResourceProperties struct { - // GroupID - READ-ONLY; The private link resource group id. - GroupID *string `json:"groupId,omitempty"` - // RequiredMembers - READ-ONLY; The private link resource required member names. - RequiredMembers *[]string `json:"requiredMembers,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties. -func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PrivateLinkServiceConnectionStateProperty ... -type PrivateLinkServiceConnectionStateProperty struct { - // Status - The private link service connection status. - Status *string `json:"status,omitempty"` - // Description - The private link service connection description. - Description *string `json:"description,omitempty"` - // ActionsRequired - READ-ONLY; The actions required for private link service connection. - ActionsRequired *string `json:"actionsRequired,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionStateProperty. -func (plscsp PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if plscsp.Status != nil { - objectMap["status"] = plscsp.Status - } - if plscsp.Description != nil { - objectMap["description"] = plscsp.Description - } - return json.Marshal(objectMap) -} - -// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not -// have tags and a location -type ProxyResource struct { - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProxyResource. -func (pr ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// QueryStatistic represents a Query Statistic. -type QueryStatistic struct { - autorest.Response `json:"-"` - // QueryStatisticProperties - The properties of a query statistic. - *QueryStatisticProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for QueryStatistic. -func (qs QueryStatistic) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if qs.QueryStatisticProperties != nil { - objectMap["properties"] = qs.QueryStatisticProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for QueryStatistic struct. -func (qs *QueryStatistic) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var queryStatisticProperties QueryStatisticProperties - err = json.Unmarshal(*v, &queryStatisticProperties) - if err != nil { - return err - } - qs.QueryStatisticProperties = &queryStatisticProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - qs.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - qs.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - qs.Type = &typeVar - } - } - } - - return nil -} - -// QueryStatisticProperties the properties of a query statistic. -type QueryStatisticProperties struct { - // QueryID - Database query identifier. - QueryID *string `json:"queryId,omitempty"` - // StartTime - Observation start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - Observation end time. - EndTime *date.Time `json:"endTime,omitempty"` - // AggregationFunction - Aggregation function name. - AggregationFunction *string `json:"aggregationFunction,omitempty"` - // DatabaseNames - The list of database names. - DatabaseNames *[]string `json:"databaseNames,omitempty"` - // QueryExecutionCount - Number of query executions in this time interval. - QueryExecutionCount *int64 `json:"queryExecutionCount,omitempty"` - // MetricName - Metric name. - MetricName *string `json:"metricName,omitempty"` - // MetricDisplayName - Metric display name. - MetricDisplayName *string `json:"metricDisplayName,omitempty"` - // MetricValue - Metric value. - MetricValue *float64 `json:"metricValue,omitempty"` - // MetricValueUnit - Metric value unit. - MetricValueUnit *string `json:"metricValueUnit,omitempty"` -} - -// QueryText represents a Query Text. -type QueryText struct { - autorest.Response `json:"-"` - // QueryTextProperties - The properties of a query text. - *QueryTextProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for QueryText. -func (qt QueryText) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if qt.QueryTextProperties != nil { - objectMap["properties"] = qt.QueryTextProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for QueryText struct. -func (qt *QueryText) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var queryTextProperties QueryTextProperties - err = json.Unmarshal(*v, &queryTextProperties) - if err != nil { - return err - } - qt.QueryTextProperties = &queryTextProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - qt.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - qt.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - qt.Type = &typeVar - } - } - } - - return nil -} - -// QueryTextProperties the properties of a query text. -type QueryTextProperties struct { - // QueryID - Query identifier unique to the server. - QueryID *string `json:"queryId,omitempty"` - // QueryText - Query text. - QueryText *string `json:"queryText,omitempty"` -} - -// QueryTextsResultList a list of query texts. -type QueryTextsResultList struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of query texts. - Value *[]QueryText `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for QueryTextsResultList. -func (qtrl QueryTextsResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// QueryTextsResultListIterator provides access to a complete listing of QueryText values. -type QueryTextsResultListIterator struct { - i int - page QueryTextsResultListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *QueryTextsResultListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsResultListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *QueryTextsResultListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter QueryTextsResultListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter QueryTextsResultListIterator) Response() QueryTextsResultList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter QueryTextsResultListIterator) Value() QueryText { - if !iter.page.NotDone() { - return QueryText{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the QueryTextsResultListIterator type. -func NewQueryTextsResultListIterator(page QueryTextsResultListPage) QueryTextsResultListIterator { - return QueryTextsResultListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (qtrl QueryTextsResultList) IsEmpty() bool { - return qtrl.Value == nil || len(*qtrl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (qtrl QueryTextsResultList) hasNextLink() bool { - return qtrl.NextLink != nil && len(*qtrl.NextLink) != 0 -} - -// queryTextsResultListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (qtrl QueryTextsResultList) queryTextsResultListPreparer(ctx context.Context) (*http.Request, error) { - if !qtrl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(qtrl.NextLink))) -} - -// QueryTextsResultListPage contains a page of QueryText values. -type QueryTextsResultListPage struct { - fn func(context.Context, QueryTextsResultList) (QueryTextsResultList, error) - qtrl QueryTextsResultList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *QueryTextsResultListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsResultListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.qtrl) - if err != nil { - return err - } - page.qtrl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *QueryTextsResultListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page QueryTextsResultListPage) NotDone() bool { - return !page.qtrl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page QueryTextsResultListPage) Response() QueryTextsResultList { - return page.qtrl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page QueryTextsResultListPage) Values() []QueryText { - if page.qtrl.IsEmpty() { - return nil - } - return *page.qtrl.Value -} - -// Creates a new instance of the QueryTextsResultListPage type. -func NewQueryTextsResultListPage(cur QueryTextsResultList, getNextPage func(context.Context, QueryTextsResultList) (QueryTextsResultList, error)) QueryTextsResultListPage { - return QueryTextsResultListPage{ - fn: getNextPage, - qtrl: cur, - } -} - -// RecommendationAction represents a Recommendation Action. -type RecommendationAction struct { - autorest.Response `json:"-"` - // RecommendationActionProperties - The properties of a recommendation action. - *RecommendationActionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecommendationAction. -func (ra RecommendationAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ra.RecommendationActionProperties != nil { - objectMap["properties"] = ra.RecommendationActionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RecommendationAction struct. -func (ra *RecommendationAction) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var recommendationActionProperties RecommendationActionProperties - err = json.Unmarshal(*v, &recommendationActionProperties) - if err != nil { - return err - } - ra.RecommendationActionProperties = &recommendationActionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ra.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ra.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ra.Type = &typeVar - } - } - } - - return nil -} - -// RecommendationActionProperties the properties of a recommendation action. -type RecommendationActionProperties struct { - // AdvisorName - Advisor name. - AdvisorName *string `json:"advisorName,omitempty"` - // SessionID - Recommendation action session identifier. - SessionID *string `json:"sessionId,omitempty"` - // ActionID - Recommendation action identifier. - ActionID *int32 `json:"actionId,omitempty"` - // CreatedTime - Recommendation action creation time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ExpirationTime - Recommendation action expiration time. - ExpirationTime *date.Time `json:"expirationTime,omitempty"` - // Reason - Recommendation action reason. - Reason *string `json:"reason,omitempty"` - // RecommendationType - Recommendation action type. - RecommendationType *string `json:"recommendationType,omitempty"` - // Details - Recommendation action details. - Details map[string]*string `json:"details"` -} - -// MarshalJSON is the custom marshaler for RecommendationActionProperties. -func (rap RecommendationActionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rap.AdvisorName != nil { - objectMap["advisorName"] = rap.AdvisorName - } - if rap.SessionID != nil { - objectMap["sessionId"] = rap.SessionID - } - if rap.ActionID != nil { - objectMap["actionId"] = rap.ActionID - } - if rap.CreatedTime != nil { - objectMap["createdTime"] = rap.CreatedTime - } - if rap.ExpirationTime != nil { - objectMap["expirationTime"] = rap.ExpirationTime - } - if rap.Reason != nil { - objectMap["reason"] = rap.Reason - } - if rap.RecommendationType != nil { - objectMap["recommendationType"] = rap.RecommendationType - } - if rap.Details != nil { - objectMap["details"] = rap.Details - } - return json.Marshal(objectMap) -} - -// RecommendationActionsResultList a list of recommendation actions. -type RecommendationActionsResultList struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of recommendation action advisors. - Value *[]RecommendationAction `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecommendationActionsResultList. -func (rarl RecommendationActionsResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RecommendationActionsResultListIterator provides access to a complete listing of RecommendationAction -// values. -type RecommendationActionsResultListIterator struct { - i int - page RecommendationActionsResultListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *RecommendationActionsResultListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationActionsResultListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *RecommendationActionsResultListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RecommendationActionsResultListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter RecommendationActionsResultListIterator) Response() RecommendationActionsResultList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter RecommendationActionsResultListIterator) Value() RecommendationAction { - if !iter.page.NotDone() { - return RecommendationAction{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RecommendationActionsResultListIterator type. -func NewRecommendationActionsResultListIterator(page RecommendationActionsResultListPage) RecommendationActionsResultListIterator { - return RecommendationActionsResultListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (rarl RecommendationActionsResultList) IsEmpty() bool { - return rarl.Value == nil || len(*rarl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (rarl RecommendationActionsResultList) hasNextLink() bool { - return rarl.NextLink != nil && len(*rarl.NextLink) != 0 -} - -// recommendationActionsResultListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rarl RecommendationActionsResultList) recommendationActionsResultListPreparer(ctx context.Context) (*http.Request, error) { - if !rarl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rarl.NextLink))) -} - -// RecommendationActionsResultListPage contains a page of RecommendationAction values. -type RecommendationActionsResultListPage struct { - fn func(context.Context, RecommendationActionsResultList) (RecommendationActionsResultList, error) - rarl RecommendationActionsResultList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *RecommendationActionsResultListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationActionsResultListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.rarl) - if err != nil { - return err - } - page.rarl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *RecommendationActionsResultListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RecommendationActionsResultListPage) NotDone() bool { - return !page.rarl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RecommendationActionsResultListPage) Response() RecommendationActionsResultList { - return page.rarl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RecommendationActionsResultListPage) Values() []RecommendationAction { - if page.rarl.IsEmpty() { - return nil - } - return *page.rarl.Value -} - -// Creates a new instance of the RecommendationActionsResultListPage type. -func NewRecommendationActionsResultListPage(cur RecommendationActionsResultList, getNextPage func(context.Context, RecommendationActionsResultList) (RecommendationActionsResultList, error)) RecommendationActionsResultListPage { - return RecommendationActionsResultListPage{ - fn: getNextPage, - rarl: cur, - } -} - -// RecommendedActionSessionsOperationStatus recommendation action session operation status. -type RecommendedActionSessionsOperationStatus struct { - autorest.Response `json:"-"` - // Name - Operation identifier. - Name *string `json:"name,omitempty"` - // StartTime - Operation start time. - StartTime *date.Time `json:"startTime,omitempty"` - // Status - Operation status. - Status *string `json:"status,omitempty"` -} - -// Resource common fields that are returned in the response for all Azure Resource Manager resources -type Resource struct { - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SecurityAlertPolicyProperties properties of a security alert policy. -type SecurityAlertPolicyProperties struct { - // State - Specifies the state of the policy, whether it is enabled or disabled. Possible values include: 'ServerSecurityAlertPolicyStateEnabled', 'ServerSecurityAlertPolicyStateDisabled' - State ServerSecurityAlertPolicyState `json:"state,omitempty"` - // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly - DisabledAlerts *[]string `json:"disabledAlerts,omitempty"` - // EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent. - EmailAddresses *[]string `json:"emailAddresses,omitempty"` - // EmailAccountAdmins - Specifies that the alert is sent to the account administrators. - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. - StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` - // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *int32 `json:"retentionDays,omitempty"` -} - -// Server represents a server. -type Server struct { - autorest.Response `json:"-"` - // Sku - The SKU (pricing tier) of the server. - Sku *Sku `json:"sku,omitempty"` - // ServerProperties - Properties of the server. - *ServerProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // Location - The geo-location where the resource lives - Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Server. -func (s Server) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if s.Sku != nil { - objectMap["sku"] = s.Sku - } - if s.ServerProperties != nil { - objectMap["properties"] = s.ServerProperties - } - if s.Tags != nil { - objectMap["tags"] = s.Tags - } - if s.Location != nil { - objectMap["location"] = s.Location - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Server struct. -func (s *Server) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - s.Sku = &sku - } - case "properties": - if v != nil { - var serverProperties ServerProperties - err = json.Unmarshal(*v, &serverProperties) - if err != nil { - return err - } - s.ServerProperties = &serverProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - s.Tags = tags - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - s.Location = &location - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - s.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - s.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - s.Type = &typeVar - } - } - } - - return nil -} - -// ServerForCreate represents a server to be created. -type ServerForCreate struct { - // Sku - The SKU (pricing tier) of the server. - Sku *Sku `json:"sku,omitempty"` - // Properties - Properties of the server. - Properties BasicServerPropertiesForCreate `json:"properties,omitempty"` - // Location - The location the resource resides in. - Location *string `json:"location,omitempty"` - // Tags - Application-specific metadata in the form of key-value pairs. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ServerForCreate. -func (sfc ServerForCreate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sfc.Sku != nil { - objectMap["sku"] = sfc.Sku - } - objectMap["properties"] = sfc.Properties - if sfc.Location != nil { - objectMap["location"] = sfc.Location - } - if sfc.Tags != nil { - objectMap["tags"] = sfc.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerForCreate struct. -func (sfc *ServerForCreate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - sfc.Sku = &sku - } - case "properties": - if v != nil { - properties, err := unmarshalBasicServerPropertiesForCreate(*v) - if err != nil { - return err - } - sfc.Properties = properties - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - sfc.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - sfc.Tags = tags - } - } - } - - return nil -} - -// ServerListResult a list of servers. -type ServerListResult struct { - autorest.Response `json:"-"` - // Value - The list of servers - Value *[]Server `json:"value,omitempty"` -} - -// ServerPrivateEndpointConnection a private endpoint connection under a server -type ServerPrivateEndpointConnection struct { - // ID - READ-ONLY; Resource Id of the private endpoint connection. - ID *string `json:"id,omitempty"` - // Properties - READ-ONLY; Private endpoint connection properties - Properties *ServerPrivateEndpointConnectionProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerPrivateEndpointConnection. -func (spec ServerPrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServerPrivateEndpointConnectionProperties properties of a private endpoint connection. -type ServerPrivateEndpointConnectionProperties struct { - // PrivateEndpoint - Private endpoint which the connection belongs to. - PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` - // PrivateLinkServiceConnectionState - Connection state of the private endpoint connection. - PrivateLinkServiceConnectionState *ServerPrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` - // ProvisioningState - READ-ONLY; State of the private endpoint connection. Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', 'Rejecting' - ProvisioningState PrivateEndpointProvisioningState `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerPrivateEndpointConnectionProperties. -func (specp ServerPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if specp.PrivateEndpoint != nil { - objectMap["privateEndpoint"] = specp.PrivateEndpoint - } - if specp.PrivateLinkServiceConnectionState != nil { - objectMap["privateLinkServiceConnectionState"] = specp.PrivateLinkServiceConnectionState - } - return json.Marshal(objectMap) -} - -// ServerPrivateLinkServiceConnectionStateProperty ... -type ServerPrivateLinkServiceConnectionStateProperty struct { - // Status - The private link service connection status. Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - Status PrivateLinkServiceConnectionStateStatus `json:"status,omitempty"` - // Description - The private link service connection description. - Description *string `json:"description,omitempty"` - // ActionsRequired - READ-ONLY; The actions required for private link service connection. Possible values include: 'None' - ActionsRequired PrivateLinkServiceConnectionStateActionsRequire `json:"actionsRequired,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerPrivateLinkServiceConnectionStateProperty. -func (splscsp ServerPrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if splscsp.Status != "" { - objectMap["status"] = splscsp.Status - } - if splscsp.Description != nil { - objectMap["description"] = splscsp.Description - } - return json.Marshal(objectMap) -} - -// ServerProperties the properties of a server. -type ServerProperties struct { - // AdministratorLogin - The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). - AdministratorLogin *string `json:"administratorLogin,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' - Version ServerVersion `json:"version,omitempty"` - // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' - SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` - // UserVisibleState - A state of a server that is visible to user. Possible values include: 'ServerStateReady', 'ServerStateDropping', 'ServerStateDisabled' - UserVisibleState ServerState `json:"userVisibleState,omitempty"` - // FullyQualifiedDomainName - The fully qualified domain name of a server. - FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` - // EarliestRestoreDate - Earliest restore point creation time (ISO8601 format) - EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` - // StorageProfile - Storage profile of a server. - StorageProfile *StorageProfile `json:"storageProfile,omitempty"` - // ReplicationRole - The replication role of the server. - ReplicationRole *string `json:"replicationRole,omitempty"` - // MasterServerID - The master server id of a replica server. - MasterServerID *string `json:"masterServerId,omitempty"` - // ReplicaCapacity - The maximum number of replicas that a master server can have. - ReplicaCapacity *int32 `json:"replicaCapacity,omitempty"` - // PublicNetworkAccess - Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnumEnabled', 'PublicNetworkAccessEnumDisabled' - PublicNetworkAccess PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` - // PrivateEndpointConnections - READ-ONLY; List of private endpoint connections on a server - PrivateEndpointConnections *[]ServerPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerProperties. -func (sp ServerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sp.AdministratorLogin != nil { - objectMap["administratorLogin"] = sp.AdministratorLogin - } - if sp.Version != "" { - objectMap["version"] = sp.Version - } - if sp.SslEnforcement != "" { - objectMap["sslEnforcement"] = sp.SslEnforcement - } - if sp.UserVisibleState != "" { - objectMap["userVisibleState"] = sp.UserVisibleState - } - if sp.FullyQualifiedDomainName != nil { - objectMap["fullyQualifiedDomainName"] = sp.FullyQualifiedDomainName - } - if sp.EarliestRestoreDate != nil { - objectMap["earliestRestoreDate"] = sp.EarliestRestoreDate - } - if sp.StorageProfile != nil { - objectMap["storageProfile"] = sp.StorageProfile - } - if sp.ReplicationRole != nil { - objectMap["replicationRole"] = sp.ReplicationRole - } - if sp.MasterServerID != nil { - objectMap["masterServerId"] = sp.MasterServerID - } - if sp.ReplicaCapacity != nil { - objectMap["replicaCapacity"] = sp.ReplicaCapacity - } - if sp.PublicNetworkAccess != "" { - objectMap["publicNetworkAccess"] = sp.PublicNetworkAccess - } - return json.Marshal(objectMap) -} - -// BasicServerPropertiesForCreate the properties used to create a new server. -type BasicServerPropertiesForCreate interface { - AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) - AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) - AsServerPropertiesForGeoRestore() (*ServerPropertiesForGeoRestore, bool) - AsServerPropertiesForReplica() (*ServerPropertiesForReplica, bool) - AsServerPropertiesForCreate() (*ServerPropertiesForCreate, bool) -} - -// ServerPropertiesForCreate the properties used to create a new server. -type ServerPropertiesForCreate struct { - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' - Version ServerVersion `json:"version,omitempty"` - // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' - SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` - // PublicNetworkAccess - Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnumEnabled', 'PublicNetworkAccessEnumDisabled' - PublicNetworkAccess PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` - // StorageProfile - Storage profile of a server. - StorageProfile *StorageProfile `json:"storageProfile,omitempty"` - // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' - CreateMode CreateMode `json:"createMode,omitempty"` -} - -func unmarshalBasicServerPropertiesForCreate(body []byte) (BasicServerPropertiesForCreate, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["createMode"] { - case string(CreateModeDefault): - var spfdc ServerPropertiesForDefaultCreate - err := json.Unmarshal(body, &spfdc) - return spfdc, err - case string(CreateModePointInTimeRestore): - var spfr ServerPropertiesForRestore - err := json.Unmarshal(body, &spfr) - return spfr, err - case string(CreateModeGeoRestore): - var spfgr ServerPropertiesForGeoRestore - err := json.Unmarshal(body, &spfgr) - return spfgr, err - case string(CreateModeReplica): - var spfr ServerPropertiesForReplica - err := json.Unmarshal(body, &spfr) - return spfr, err - default: - var spfc ServerPropertiesForCreate - err := json.Unmarshal(body, &spfc) - return spfc, err - } -} -func unmarshalBasicServerPropertiesForCreateArray(body []byte) ([]BasicServerPropertiesForCreate, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - spfcArray := make([]BasicServerPropertiesForCreate, len(rawMessages)) - - for index, rawMessage := range rawMessages { - spfc, err := unmarshalBasicServerPropertiesForCreate(*rawMessage) - if err != nil { - return nil, err - } - spfcArray[index] = spfc - } - return spfcArray, nil -} - -// MarshalJSON is the custom marshaler for ServerPropertiesForCreate. -func (spfc ServerPropertiesForCreate) MarshalJSON() ([]byte, error) { - spfc.CreateMode = CreateModeServerPropertiesForCreate - objectMap := make(map[string]interface{}) - if spfc.Version != "" { - objectMap["version"] = spfc.Version - } - if spfc.SslEnforcement != "" { - objectMap["sslEnforcement"] = spfc.SslEnforcement - } - if spfc.PublicNetworkAccess != "" { - objectMap["publicNetworkAccess"] = spfc.PublicNetworkAccess - } - if spfc.StorageProfile != nil { - objectMap["storageProfile"] = spfc.StorageProfile - } - if spfc.CreateMode != "" { - objectMap["createMode"] = spfc.CreateMode - } - return json.Marshal(objectMap) -} - -// AsServerPropertiesForDefaultCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForCreate. -func (spfc ServerPropertiesForCreate) AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) { - return nil, false -} - -// AsServerPropertiesForRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForCreate. -func (spfc ServerPropertiesForCreate) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) { - return nil, false -} - -// AsServerPropertiesForGeoRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForCreate. -func (spfc ServerPropertiesForCreate) AsServerPropertiesForGeoRestore() (*ServerPropertiesForGeoRestore, bool) { - return nil, false -} - -// AsServerPropertiesForReplica is the BasicServerPropertiesForCreate implementation for ServerPropertiesForCreate. -func (spfc ServerPropertiesForCreate) AsServerPropertiesForReplica() (*ServerPropertiesForReplica, bool) { - return nil, false -} - -// AsServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForCreate. -func (spfc ServerPropertiesForCreate) AsServerPropertiesForCreate() (*ServerPropertiesForCreate, bool) { - return &spfc, true -} - -// AsBasicServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForCreate. -func (spfc ServerPropertiesForCreate) AsBasicServerPropertiesForCreate() (BasicServerPropertiesForCreate, bool) { - return &spfc, true -} - -// ServerPropertiesForDefaultCreate the properties used to create a new server. -type ServerPropertiesForDefaultCreate struct { - // AdministratorLogin - The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). - AdministratorLogin *string `json:"administratorLogin,omitempty"` - // AdministratorLoginPassword - The password of the administrator login. - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' - Version ServerVersion `json:"version,omitempty"` - // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' - SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` - // PublicNetworkAccess - Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnumEnabled', 'PublicNetworkAccessEnumDisabled' - PublicNetworkAccess PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` - // StorageProfile - Storage profile of a server. - StorageProfile *StorageProfile `json:"storageProfile,omitempty"` - // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' - CreateMode CreateMode `json:"createMode,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerPropertiesForDefaultCreate. -func (spfdc ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { - spfdc.CreateMode = CreateModeDefault - objectMap := make(map[string]interface{}) - if spfdc.AdministratorLogin != nil { - objectMap["administratorLogin"] = spfdc.AdministratorLogin - } - if spfdc.AdministratorLoginPassword != nil { - objectMap["administratorLoginPassword"] = spfdc.AdministratorLoginPassword - } - if spfdc.Version != "" { - objectMap["version"] = spfdc.Version - } - if spfdc.SslEnforcement != "" { - objectMap["sslEnforcement"] = spfdc.SslEnforcement - } - if spfdc.PublicNetworkAccess != "" { - objectMap["publicNetworkAccess"] = spfdc.PublicNetworkAccess - } - if spfdc.StorageProfile != nil { - objectMap["storageProfile"] = spfdc.StorageProfile - } - if spfdc.CreateMode != "" { - objectMap["createMode"] = spfdc.CreateMode - } - return json.Marshal(objectMap) -} - -// AsServerPropertiesForDefaultCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. -func (spfdc ServerPropertiesForDefaultCreate) AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) { - return &spfdc, true -} - -// AsServerPropertiesForRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. -func (spfdc ServerPropertiesForDefaultCreate) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) { - return nil, false -} - -// AsServerPropertiesForGeoRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. -func (spfdc ServerPropertiesForDefaultCreate) AsServerPropertiesForGeoRestore() (*ServerPropertiesForGeoRestore, bool) { - return nil, false -} - -// AsServerPropertiesForReplica is the BasicServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. -func (spfdc ServerPropertiesForDefaultCreate) AsServerPropertiesForReplica() (*ServerPropertiesForReplica, bool) { - return nil, false -} - -// AsServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. -func (spfdc ServerPropertiesForDefaultCreate) AsServerPropertiesForCreate() (*ServerPropertiesForCreate, bool) { - return nil, false -} - -// AsBasicServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. -func (spfdc ServerPropertiesForDefaultCreate) AsBasicServerPropertiesForCreate() (BasicServerPropertiesForCreate, bool) { - return &spfdc, true -} - -// ServerPropertiesForGeoRestore the properties used to create a new server by restoring to a different -// region from a geo replicated backup. -type ServerPropertiesForGeoRestore struct { - // SourceServerID - The source server id to restore from. - SourceServerID *string `json:"sourceServerId,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' - Version ServerVersion `json:"version,omitempty"` - // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' - SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` - // PublicNetworkAccess - Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnumEnabled', 'PublicNetworkAccessEnumDisabled' - PublicNetworkAccess PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` - // StorageProfile - Storage profile of a server. - StorageProfile *StorageProfile `json:"storageProfile,omitempty"` - // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' - CreateMode CreateMode `json:"createMode,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerPropertiesForGeoRestore. -func (spfgr ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { - spfgr.CreateMode = CreateModeGeoRestore - objectMap := make(map[string]interface{}) - if spfgr.SourceServerID != nil { - objectMap["sourceServerId"] = spfgr.SourceServerID - } - if spfgr.Version != "" { - objectMap["version"] = spfgr.Version - } - if spfgr.SslEnforcement != "" { - objectMap["sslEnforcement"] = spfgr.SslEnforcement - } - if spfgr.PublicNetworkAccess != "" { - objectMap["publicNetworkAccess"] = spfgr.PublicNetworkAccess - } - if spfgr.StorageProfile != nil { - objectMap["storageProfile"] = spfgr.StorageProfile - } - if spfgr.CreateMode != "" { - objectMap["createMode"] = spfgr.CreateMode - } - return json.Marshal(objectMap) -} - -// AsServerPropertiesForDefaultCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForGeoRestore. -func (spfgr ServerPropertiesForGeoRestore) AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) { - return nil, false -} - -// AsServerPropertiesForRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForGeoRestore. -func (spfgr ServerPropertiesForGeoRestore) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) { - return nil, false -} - -// AsServerPropertiesForGeoRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForGeoRestore. -func (spfgr ServerPropertiesForGeoRestore) AsServerPropertiesForGeoRestore() (*ServerPropertiesForGeoRestore, bool) { - return &spfgr, true -} - -// AsServerPropertiesForReplica is the BasicServerPropertiesForCreate implementation for ServerPropertiesForGeoRestore. -func (spfgr ServerPropertiesForGeoRestore) AsServerPropertiesForReplica() (*ServerPropertiesForReplica, bool) { - return nil, false -} - -// AsServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForGeoRestore. -func (spfgr ServerPropertiesForGeoRestore) AsServerPropertiesForCreate() (*ServerPropertiesForCreate, bool) { - return nil, false -} - -// AsBasicServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForGeoRestore. -func (spfgr ServerPropertiesForGeoRestore) AsBasicServerPropertiesForCreate() (BasicServerPropertiesForCreate, bool) { - return &spfgr, true -} - -// ServerPropertiesForReplica the properties to create a new replica. -type ServerPropertiesForReplica struct { - // SourceServerID - The master server id to create replica from. - SourceServerID *string `json:"sourceServerId,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' - Version ServerVersion `json:"version,omitempty"` - // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' - SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` - // PublicNetworkAccess - Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnumEnabled', 'PublicNetworkAccessEnumDisabled' - PublicNetworkAccess PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` - // StorageProfile - Storage profile of a server. - StorageProfile *StorageProfile `json:"storageProfile,omitempty"` - // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' - CreateMode CreateMode `json:"createMode,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerPropertiesForReplica. -func (spfr ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { - spfr.CreateMode = CreateModeReplica - objectMap := make(map[string]interface{}) - if spfr.SourceServerID != nil { - objectMap["sourceServerId"] = spfr.SourceServerID - } - if spfr.Version != "" { - objectMap["version"] = spfr.Version - } - if spfr.SslEnforcement != "" { - objectMap["sslEnforcement"] = spfr.SslEnforcement - } - if spfr.PublicNetworkAccess != "" { - objectMap["publicNetworkAccess"] = spfr.PublicNetworkAccess - } - if spfr.StorageProfile != nil { - objectMap["storageProfile"] = spfr.StorageProfile - } - if spfr.CreateMode != "" { - objectMap["createMode"] = spfr.CreateMode - } - return json.Marshal(objectMap) -} - -// AsServerPropertiesForDefaultCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForReplica. -func (spfr ServerPropertiesForReplica) AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) { - return nil, false -} - -// AsServerPropertiesForRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForReplica. -func (spfr ServerPropertiesForReplica) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) { - return nil, false -} - -// AsServerPropertiesForGeoRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForReplica. -func (spfr ServerPropertiesForReplica) AsServerPropertiesForGeoRestore() (*ServerPropertiesForGeoRestore, bool) { - return nil, false -} - -// AsServerPropertiesForReplica is the BasicServerPropertiesForCreate implementation for ServerPropertiesForReplica. -func (spfr ServerPropertiesForReplica) AsServerPropertiesForReplica() (*ServerPropertiesForReplica, bool) { - return &spfr, true -} - -// AsServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForReplica. -func (spfr ServerPropertiesForReplica) AsServerPropertiesForCreate() (*ServerPropertiesForCreate, bool) { - return nil, false -} - -// AsBasicServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForReplica. -func (spfr ServerPropertiesForReplica) AsBasicServerPropertiesForCreate() (BasicServerPropertiesForCreate, bool) { - return &spfr, true -} - -// ServerPropertiesForRestore the properties used to create a new server by restoring from a backup. -type ServerPropertiesForRestore struct { - // SourceServerID - The source server id to restore from. - SourceServerID *string `json:"sourceServerId,omitempty"` - // RestorePointInTime - Restore point creation time (ISO8601 format), specifying the time to restore from. - RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' - Version ServerVersion `json:"version,omitempty"` - // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' - SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` - // PublicNetworkAccess - Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnumEnabled', 'PublicNetworkAccessEnumDisabled' - PublicNetworkAccess PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` - // StorageProfile - Storage profile of a server. - StorageProfile *StorageProfile `json:"storageProfile,omitempty"` - // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' - CreateMode CreateMode `json:"createMode,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerPropertiesForRestore. -func (spfr ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { - spfr.CreateMode = CreateModePointInTimeRestore - objectMap := make(map[string]interface{}) - if spfr.SourceServerID != nil { - objectMap["sourceServerId"] = spfr.SourceServerID - } - if spfr.RestorePointInTime != nil { - objectMap["restorePointInTime"] = spfr.RestorePointInTime - } - if spfr.Version != "" { - objectMap["version"] = spfr.Version - } - if spfr.SslEnforcement != "" { - objectMap["sslEnforcement"] = spfr.SslEnforcement - } - if spfr.PublicNetworkAccess != "" { - objectMap["publicNetworkAccess"] = spfr.PublicNetworkAccess - } - if spfr.StorageProfile != nil { - objectMap["storageProfile"] = spfr.StorageProfile - } - if spfr.CreateMode != "" { - objectMap["createMode"] = spfr.CreateMode - } - return json.Marshal(objectMap) -} - -// AsServerPropertiesForDefaultCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForRestore. -func (spfr ServerPropertiesForRestore) AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) { - return nil, false -} - -// AsServerPropertiesForRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForRestore. -func (spfr ServerPropertiesForRestore) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) { - return &spfr, true -} - -// AsServerPropertiesForGeoRestore is the BasicServerPropertiesForCreate implementation for ServerPropertiesForRestore. -func (spfr ServerPropertiesForRestore) AsServerPropertiesForGeoRestore() (*ServerPropertiesForGeoRestore, bool) { - return nil, false -} - -// AsServerPropertiesForReplica is the BasicServerPropertiesForCreate implementation for ServerPropertiesForRestore. -func (spfr ServerPropertiesForRestore) AsServerPropertiesForReplica() (*ServerPropertiesForReplica, bool) { - return nil, false -} - -// AsServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForRestore. -func (spfr ServerPropertiesForRestore) AsServerPropertiesForCreate() (*ServerPropertiesForCreate, bool) { - return nil, false -} - -// AsBasicServerPropertiesForCreate is the BasicServerPropertiesForCreate implementation for ServerPropertiesForRestore. -func (spfr ServerPropertiesForRestore) AsBasicServerPropertiesForCreate() (BasicServerPropertiesForCreate, bool) { - return &spfr, true -} - -// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServersCreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServersClient) (Server, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServersCreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServersCreateFuture.Result. -func (future *ServersCreateFuture) result(client ServersClient) (s Server, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.ServersCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.CreateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersCreateFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServersDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServersDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServersDeleteFuture.Result. -func (future *ServersDeleteFuture) result(client ServersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.ServersDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ServerSecurityAlertPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ServerSecurityAlertPoliciesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServerSecurityAlertPoliciesClient) (ServerSecurityAlertPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServerSecurityAlertPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServerSecurityAlertPoliciesCreateOrUpdateFuture.Result. -func (future *ServerSecurityAlertPoliciesCreateOrUpdateFuture) result(client ServerSecurityAlertPoliciesClient) (ssap ServerSecurityAlertPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ssap.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.ServerSecurityAlertPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ssap.Response.Response, err = future.GetResult(sender); err == nil && ssap.Response.Response.StatusCode != http.StatusNoContent { - ssap, err = client.CreateOrUpdateResponder(ssap.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesCreateOrUpdateFuture", "Result", ssap.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerSecurityAlertPolicy a server security alert policy. -type ServerSecurityAlertPolicy struct { - autorest.Response `json:"-"` - // SecurityAlertPolicyProperties - Resource properties. - *SecurityAlertPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicy. -func (ssap ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ssap.SecurityAlertPolicyProperties != nil { - objectMap["properties"] = ssap.SecurityAlertPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerSecurityAlertPolicy struct. -func (ssap *ServerSecurityAlertPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var securityAlertPolicyProperties SecurityAlertPolicyProperties - err = json.Unmarshal(*v, &securityAlertPolicyProperties) - if err != nil { - return err - } - ssap.SecurityAlertPolicyProperties = &securityAlertPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ssap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ssap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ssap.Type = &typeVar - } - } - } - - return nil -} - -// ServersRestartFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServersRestartFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServersRestartFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServersRestartFuture.Result. -func (future *ServersRestartFuture) result(client ServersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersRestartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.ServersRestartFuture") - return - } - ar.Response = future.Response() - return -} - -// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServersUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServersClient) (Server, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServersUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServersUpdateFuture.Result. -func (future *ServersUpdateFuture) result(client ServersClient) (s Server, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.ServersUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.UpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// ServerUpdateParameters parameters allowed to update for a server. -type ServerUpdateParameters struct { - // Sku - The SKU (pricing tier) of the server. - Sku *Sku `json:"sku,omitempty"` - // ServerUpdateParametersProperties - The properties that can be updated for a server. - *ServerUpdateParametersProperties `json:"properties,omitempty"` - // Tags - Application-specific metadata in the form of key-value pairs. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ServerUpdateParameters. -func (sup ServerUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sup.Sku != nil { - objectMap["sku"] = sup.Sku - } - if sup.ServerUpdateParametersProperties != nil { - objectMap["properties"] = sup.ServerUpdateParametersProperties - } - if sup.Tags != nil { - objectMap["tags"] = sup.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServerUpdateParameters struct. -func (sup *ServerUpdateParameters) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - sup.Sku = &sku - } - case "properties": - if v != nil { - var serverUpdateParametersProperties ServerUpdateParametersProperties - err = json.Unmarshal(*v, &serverUpdateParametersProperties) - if err != nil { - return err - } - sup.ServerUpdateParametersProperties = &serverUpdateParametersProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - sup.Tags = tags - } - } - } - - return nil -} - -// ServerUpdateParametersProperties the properties that can be updated for a server. -type ServerUpdateParametersProperties struct { - // StorageProfile - Storage profile of a server. - StorageProfile *StorageProfile `json:"storageProfile,omitempty"` - // AdministratorLoginPassword - The password of the administrator login. - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // Version - The version of a server. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' - Version ServerVersion `json:"version,omitempty"` - // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' - SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` - // PublicNetworkAccess - Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnumEnabled', 'PublicNetworkAccessEnumDisabled' - PublicNetworkAccess PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` - // ReplicationRole - The replication role of the server. - ReplicationRole *string `json:"replicationRole,omitempty"` -} - -// Sku billing information related properties of a server. -type Sku struct { - // Name - The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8. - Name *string `json:"name,omitempty"` - // Tier - The tier of the particular SKU, e.g. Basic. Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - Tier SkuTier `json:"tier,omitempty"` - // Capacity - The scale up/out capacity, representing server's compute units. - Capacity *int32 `json:"capacity,omitempty"` - // Size - The size code, to be interpreted by resource as appropriate. - Size *string `json:"size,omitempty"` - // Family - The family of hardware. - Family *string `json:"family,omitempty"` -} - -// StorageProfile storage Profile properties of a server -type StorageProfile struct { - // BackupRetentionDays - Backup retention days for the server. - BackupRetentionDays *int32 `json:"backupRetentionDays,omitempty"` - // GeoRedundantBackup - Enable Geo-redundant or not for server backup. Possible values include: 'Enabled', 'Disabled' - GeoRedundantBackup GeoRedundantBackup `json:"geoRedundantBackup,omitempty"` - // StorageMB - Max storage allowed for a server. - StorageMB *int32 `json:"storageMB,omitempty"` - // StorageAutogrow - Enable Storage Auto Grow. Possible values include: 'StorageAutogrowEnabled', 'StorageAutogrowDisabled' - StorageAutogrow StorageAutogrow `json:"storageAutogrow,omitempty"` -} - -// TagsObject tags object for patch operations. -type TagsObject struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for TagsObject. -func (toVar TagsObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if toVar.Tags != nil { - objectMap["tags"] = toVar.Tags - } - return json.Marshal(objectMap) -} - -// TopQueryStatisticsInput input to get top query statistics -type TopQueryStatisticsInput struct { - // TopQueryStatisticsInputProperties - The properties of a wait statistics input. - *TopQueryStatisticsInputProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for TopQueryStatisticsInput. -func (tqsi TopQueryStatisticsInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tqsi.TopQueryStatisticsInputProperties != nil { - objectMap["properties"] = tqsi.TopQueryStatisticsInputProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for TopQueryStatisticsInput struct. -func (tqsi *TopQueryStatisticsInput) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var topQueryStatisticsInputProperties TopQueryStatisticsInputProperties - err = json.Unmarshal(*v, &topQueryStatisticsInputProperties) - if err != nil { - return err - } - tqsi.TopQueryStatisticsInputProperties = &topQueryStatisticsInputProperties - } - } - } - - return nil -} - -// TopQueryStatisticsInputProperties the properties for input to get top query statistics -type TopQueryStatisticsInputProperties struct { - // NumberOfTopQueries - Max number of top queries to return. - NumberOfTopQueries *int32 `json:"numberOfTopQueries,omitempty"` - // AggregationFunction - Aggregation function name. - AggregationFunction *string `json:"aggregationFunction,omitempty"` - // ObservedMetric - Observed metric name. - ObservedMetric *string `json:"observedMetric,omitempty"` - // ObservationStartTime - Observation start time. - ObservationStartTime *date.Time `json:"observationStartTime,omitempty"` - // ObservationEndTime - Observation end time. - ObservationEndTime *date.Time `json:"observationEndTime,omitempty"` - // AggregationWindow - Aggregation interval type in ISO 8601 format. - AggregationWindow *string `json:"aggregationWindow,omitempty"` -} - -// TopQueryStatisticsResultList a list of query statistics. -type TopQueryStatisticsResultList struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of top query statistics. - Value *[]QueryStatistic `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for TopQueryStatisticsResultList. -func (tqsrl TopQueryStatisticsResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// TopQueryStatisticsResultListIterator provides access to a complete listing of QueryStatistic values. -type TopQueryStatisticsResultListIterator struct { - i int - page TopQueryStatisticsResultListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *TopQueryStatisticsResultListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsResultListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *TopQueryStatisticsResultListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter TopQueryStatisticsResultListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter TopQueryStatisticsResultListIterator) Response() TopQueryStatisticsResultList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter TopQueryStatisticsResultListIterator) Value() QueryStatistic { - if !iter.page.NotDone() { - return QueryStatistic{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the TopQueryStatisticsResultListIterator type. -func NewTopQueryStatisticsResultListIterator(page TopQueryStatisticsResultListPage) TopQueryStatisticsResultListIterator { - return TopQueryStatisticsResultListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (tqsrl TopQueryStatisticsResultList) IsEmpty() bool { - return tqsrl.Value == nil || len(*tqsrl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (tqsrl TopQueryStatisticsResultList) hasNextLink() bool { - return tqsrl.NextLink != nil && len(*tqsrl.NextLink) != 0 -} - -// topQueryStatisticsResultListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (tqsrl TopQueryStatisticsResultList) topQueryStatisticsResultListPreparer(ctx context.Context) (*http.Request, error) { - if !tqsrl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(tqsrl.NextLink))) -} - -// TopQueryStatisticsResultListPage contains a page of QueryStatistic values. -type TopQueryStatisticsResultListPage struct { - fn func(context.Context, TopQueryStatisticsResultList) (TopQueryStatisticsResultList, error) - tqsrl TopQueryStatisticsResultList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *TopQueryStatisticsResultListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsResultListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.tqsrl) - if err != nil { - return err - } - page.tqsrl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *TopQueryStatisticsResultListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page TopQueryStatisticsResultListPage) NotDone() bool { - return !page.tqsrl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page TopQueryStatisticsResultListPage) Response() TopQueryStatisticsResultList { - return page.tqsrl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page TopQueryStatisticsResultListPage) Values() []QueryStatistic { - if page.tqsrl.IsEmpty() { - return nil - } - return *page.tqsrl.Value -} - -// Creates a new instance of the TopQueryStatisticsResultListPage type. -func NewTopQueryStatisticsResultListPage(cur TopQueryStatisticsResultList, getNextPage func(context.Context, TopQueryStatisticsResultList) (TopQueryStatisticsResultList, error)) TopQueryStatisticsResultListPage { - return TopQueryStatisticsResultListPage{ - fn: getNextPage, - tqsrl: cur, - } -} - -// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource -// which has 'tags' and a 'location' -type TrackedResource struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // Location - The geo-location where the resource lives - Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for TrackedResource. -func (tr TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tr.Tags != nil { - objectMap["tags"] = tr.Tags - } - if tr.Location != nil { - objectMap["location"] = tr.Location - } - return json.Marshal(objectMap) -} - -// VirtualNetworkRule a virtual network rule. -type VirtualNetworkRule struct { - autorest.Response `json:"-"` - // VirtualNetworkRuleProperties - Resource properties. - *VirtualNetworkRuleProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkRule. -func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnr.VirtualNetworkRuleProperties != nil { - objectMap["properties"] = vnr.VirtualNetworkRuleProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct. -func (vnr *VirtualNetworkRule) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var virtualNetworkRuleProperties VirtualNetworkRuleProperties - err = json.Unmarshal(*v, &virtualNetworkRuleProperties) - if err != nil { - return err - } - vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vnr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vnr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vnr.Type = &typeVar - } - } - } - - return nil -} - -// VirtualNetworkRuleListResult a list of virtual network rules. -type VirtualNetworkRuleListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]VirtualNetworkRule `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkRuleListResult. -func (vnrlr VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualNetworkRuleListResultIterator provides access to a complete listing of VirtualNetworkRule values. -type VirtualNetworkRuleListResultIterator struct { - i int - page VirtualNetworkRuleListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *VirtualNetworkRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *VirtualNetworkRuleListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkRuleListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter VirtualNetworkRuleListResultIterator) Response() VirtualNetworkRuleListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule { - if !iter.page.NotDone() { - return VirtualNetworkRule{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkRuleListResultIterator type. -func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator { - return VirtualNetworkRuleListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool { - return vnrlr.Value == nil || len(*vnrlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (vnrlr VirtualNetworkRuleListResult) hasNextLink() bool { - return vnrlr.NextLink != nil && len(*vnrlr.NextLink) != 0 -} - -// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if !vnrlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnrlr.NextLink))) -} - -// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values. -type VirtualNetworkRuleListResultPage struct { - fn func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error) - vnrlr VirtualNetworkRuleListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *VirtualNetworkRuleListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.vnrlr) - if err != nil { - return err - } - page.vnrlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *VirtualNetworkRuleListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkRuleListResultPage) NotDone() bool { - return !page.vnrlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkRuleListResultPage) Response() VirtualNetworkRuleListResult { - return page.vnrlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule { - if page.vnrlr.IsEmpty() { - return nil - } - return *page.vnrlr.Value -} - -// Creates a new instance of the VirtualNetworkRuleListResultPage type. -func NewVirtualNetworkRuleListResultPage(cur VirtualNetworkRuleListResult, getNextPage func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)) VirtualNetworkRuleListResultPage { - return VirtualNetworkRuleListResultPage{ - fn: getNextPage, - vnrlr: cur, - } -} - -// VirtualNetworkRuleProperties properties of a virtual network rule. -type VirtualNetworkRuleProperties struct { - // VirtualNetworkSubnetID - The ARM resource id of the virtual network subnet. - VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` - // IgnoreMissingVnetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` - // State - READ-ONLY; Virtual Network Rule State. Possible values include: 'VirtualNetworkRuleStateInitializing', 'VirtualNetworkRuleStateInProgress', 'VirtualNetworkRuleStateReady', 'VirtualNetworkRuleStateDeleting', 'VirtualNetworkRuleStateUnknown' - State VirtualNetworkRuleState `json:"state,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkRuleProperties. -func (vnrp VirtualNetworkRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnrp.VirtualNetworkSubnetID != nil { - objectMap["virtualNetworkSubnetId"] = vnrp.VirtualNetworkSubnetID - } - if vnrp.IgnoreMissingVnetServiceEndpoint != nil { - objectMap["ignoreMissingVnetServiceEndpoint"] = vnrp.IgnoreMissingVnetServiceEndpoint - } - return json.Marshal(objectMap) -} - -// VirtualNetworkRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkRulesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkRulesClient) (VirtualNetworkRule, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkRulesCreateOrUpdateFuture.Result. -func (future *VirtualNetworkRulesCreateOrUpdateFuture) result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vnr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.VirtualNetworkRulesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vnr.Response.Response, err = future.GetResult(sender); err == nil && vnr.Response.Response.StatusCode != http.StatusNoContent { - vnr, err = client.CreateOrUpdateResponder(vnr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesCreateOrUpdateFuture", "Result", vnr.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkRulesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkRulesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkRulesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkRulesDeleteFuture.Result. -func (future *VirtualNetworkRulesDeleteFuture) result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("mariadb.VirtualNetworkRulesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// WaitStatistic represents a Wait Statistic. -type WaitStatistic struct { - autorest.Response `json:"-"` - // WaitStatisticProperties - The properties of a wait statistic. - *WaitStatisticProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for WaitStatistic. -func (ws WaitStatistic) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ws.WaitStatisticProperties != nil { - objectMap["properties"] = ws.WaitStatisticProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WaitStatistic struct. -func (ws *WaitStatistic) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var waitStatisticProperties WaitStatisticProperties - err = json.Unmarshal(*v, &waitStatisticProperties) - if err != nil { - return err - } - ws.WaitStatisticProperties = &waitStatisticProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ws.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ws.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ws.Type = &typeVar - } - } - } - - return nil -} - -// WaitStatisticProperties the properties of a wait statistic. -type WaitStatisticProperties struct { - // StartTime - Observation start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - Observation end time. - EndTime *date.Time `json:"endTime,omitempty"` - // EventName - Wait event name. - EventName *string `json:"eventName,omitempty"` - // EventTypeName - Wait event type name. - EventTypeName *string `json:"eventTypeName,omitempty"` - // QueryID - Database query identifier. - QueryID *int64 `json:"queryId,omitempty"` - // DatabaseName - Database Name. - DatabaseName *string `json:"databaseName,omitempty"` - // UserID - Database user identifier. - UserID *int64 `json:"userId,omitempty"` - // Count - Wait event count observed in this time interval. - Count *int64 `json:"count,omitempty"` - // TotalTimeInMs - Total time of wait in milliseconds in this time interval. - TotalTimeInMs *float64 `json:"totalTimeInMs,omitempty"` -} - -// WaitStatisticsInput input to get wait statistics -type WaitStatisticsInput struct { - // WaitStatisticsInputProperties - The properties of a wait statistics input. - *WaitStatisticsInputProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for WaitStatisticsInput. -func (wsi WaitStatisticsInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wsi.WaitStatisticsInputProperties != nil { - objectMap["properties"] = wsi.WaitStatisticsInputProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WaitStatisticsInput struct. -func (wsi *WaitStatisticsInput) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var waitStatisticsInputProperties WaitStatisticsInputProperties - err = json.Unmarshal(*v, &waitStatisticsInputProperties) - if err != nil { - return err - } - wsi.WaitStatisticsInputProperties = &waitStatisticsInputProperties - } - } - } - - return nil -} - -// WaitStatisticsInputProperties the properties for input to get wait statistics -type WaitStatisticsInputProperties struct { - // ObservationStartTime - Observation start time. - ObservationStartTime *date.Time `json:"observationStartTime,omitempty"` - // ObservationEndTime - Observation end time. - ObservationEndTime *date.Time `json:"observationEndTime,omitempty"` - // AggregationWindow - Aggregation interval type in ISO 8601 format. - AggregationWindow *string `json:"aggregationWindow,omitempty"` -} - -// WaitStatisticsResultList a list of wait statistics. -type WaitStatisticsResultList struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of wait statistics. - Value *[]WaitStatistic `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for WaitStatisticsResultList. -func (wsrl WaitStatisticsResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// WaitStatisticsResultListIterator provides access to a complete listing of WaitStatistic values. -type WaitStatisticsResultListIterator struct { - i int - page WaitStatisticsResultListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *WaitStatisticsResultListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsResultListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *WaitStatisticsResultListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WaitStatisticsResultListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter WaitStatisticsResultListIterator) Response() WaitStatisticsResultList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter WaitStatisticsResultListIterator) Value() WaitStatistic { - if !iter.page.NotDone() { - return WaitStatistic{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the WaitStatisticsResultListIterator type. -func NewWaitStatisticsResultListIterator(page WaitStatisticsResultListPage) WaitStatisticsResultListIterator { - return WaitStatisticsResultListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (wsrl WaitStatisticsResultList) IsEmpty() bool { - return wsrl.Value == nil || len(*wsrl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (wsrl WaitStatisticsResultList) hasNextLink() bool { - return wsrl.NextLink != nil && len(*wsrl.NextLink) != 0 -} - -// waitStatisticsResultListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (wsrl WaitStatisticsResultList) waitStatisticsResultListPreparer(ctx context.Context) (*http.Request, error) { - if !wsrl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(wsrl.NextLink))) -} - -// WaitStatisticsResultListPage contains a page of WaitStatistic values. -type WaitStatisticsResultListPage struct { - fn func(context.Context, WaitStatisticsResultList) (WaitStatisticsResultList, error) - wsrl WaitStatisticsResultList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *WaitStatisticsResultListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsResultListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.wsrl) - if err != nil { - return err - } - page.wsrl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *WaitStatisticsResultListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WaitStatisticsResultListPage) NotDone() bool { - return !page.wsrl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page WaitStatisticsResultListPage) Response() WaitStatisticsResultList { - return page.wsrl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page WaitStatisticsResultListPage) Values() []WaitStatistic { - if page.wsrl.IsEmpty() { - return nil - } - return *page.wsrl.Value -} - -// Creates a new instance of the WaitStatisticsResultListPage type. -func NewWaitStatisticsResultListPage(cur WaitStatisticsResultList, getNextPage func(context.Context, WaitStatisticsResultList) (WaitStatisticsResultList, error)) WaitStatisticsResultListPage { - return WaitStatisticsResultListPage{ - fn: getNextPage, - wsrl: cur, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/operations.go deleted file mode 100644 index 46b3fc07f95f..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/operations.go +++ /dev/null @@ -1,100 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the the Microsoft Azure management API provides create, read, update, and delete functionality -// for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations -// with new business model. -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List lists all of the available REST API operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.OperationsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.OperationsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.DBForMariaDB/operations"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/privateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/privateendpointconnections.go deleted file mode 100644 index c3b83dc4828e..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/privateendpointconnections.go +++ /dev/null @@ -1,532 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// PrivateEndpointConnectionsClient is the the Microsoft Azure management API provides create, read, update, and delete -// functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and -// configurations with new business model. -type PrivateEndpointConnectionsClient struct { - BaseClient -} - -// NewPrivateEndpointConnectionsClient creates an instance of the PrivateEndpointConnectionsClient client. -func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { - return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { - return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate approve or reject a private endpoint connection with a given name. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState.Status", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState.Description", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client PrivateEndpointConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a private endpoint connection with a given name. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (future PrivateEndpointConnectionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a private endpoint connection. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// privateEndpointConnectionName - the name of the private endpoint connection. -func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets all private endpoint connections on a server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client PrivateEndpointConnectionsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result PrivateEndpointConnectionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByServer") - defer func() { - sc := -1 - if result.peclr.Response.Response != nil { - sc = result.peclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "ListByServer", err.Error()) - } - - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.peclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.peclr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.peclr.hasNextLink() && result.peclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client PrivateEndpointConnectionsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) ListByServerResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client PrivateEndpointConnectionsClient) listByServerNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) { - req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateEndpointConnectionsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result PrivateEndpointConnectionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} - -// UpdateTags updates private endpoint connection with the specified tags. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// parameters - parameters supplied to the Update private endpoint connection Tags operation. -func (client PrivateEndpointConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters TagsObject) (result PrivateEndpointConnectionsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "UpdateTags", err.Error()) - } - - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client PrivateEndpointConnectionsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) UpdateTagsSender(req *http.Request) (future PrivateEndpointConnectionsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) UpdateTagsResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/privatelinkresources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/privatelinkresources.go deleted file mode 100644 index 64801789e0c8..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/privatelinkresources.go +++ /dev/null @@ -1,251 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// PrivateLinkResourcesClient is the the Microsoft Azure management API provides create, read, update, and delete -// functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and -// configurations with new business model. -type PrivateLinkResourcesClient struct { - BaseClient -} - -// NewPrivateLinkResourcesClient creates an instance of the PrivateLinkResourcesClient client. -func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { - return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { - return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a private link resource for MariaDB server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// groupName - the name of the private link resource. -func (client PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, serverName string, groupName string) (result PrivateLinkResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.PrivateLinkResourcesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, groupName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PrivateLinkResourcesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, groupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "groupName": autorest.Encode("path", groupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateLinkResources/{groupName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkResourcesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client PrivateLinkResourcesClient) GetResponder(resp *http.Response) (result PrivateLinkResource, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets the private link resources for MariaDB server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client PrivateLinkResourcesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result PrivateLinkResourceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByServer") - defer func() { - sc := -1 - if result.plrlr.Response.Response != nil { - sc = result.plrlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.PrivateLinkResourcesClient", "ListByServer", err.Error()) - } - - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.plrlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "ListByServer", resp, "Failure sending request") - return - } - - result.plrlr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.plrlr.hasNextLink() && result.plrlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client PrivateLinkResourcesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateLinkResources", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkResourcesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client PrivateLinkResourcesClient) ListByServerResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client PrivateLinkResourcesClient) listByServerNextResults(ctx context.Context, lastResults PrivateLinkResourceListResult) (result PrivateLinkResourceListResult, err error) { - req, err := lastResults.privateLinkResourceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateLinkResourcesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result PrivateLinkResourceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/querytexts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/querytexts.go deleted file mode 100644 index a627580963b3..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/querytexts.go +++ /dev/null @@ -1,254 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// QueryTextsClient is the the Microsoft Azure management API provides create, read, update, and delete functionality -// for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations -// with new business model. -type QueryTextsClient struct { - BaseClient -} - -// NewQueryTextsClient creates an instance of the QueryTextsClient client. -func NewQueryTextsClient(subscriptionID string) QueryTextsClient { - return NewQueryTextsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewQueryTextsClientWithBaseURI creates an instance of the QueryTextsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewQueryTextsClientWithBaseURI(baseURI string, subscriptionID string) QueryTextsClient { - return QueryTextsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieve the Query-Store query texts for the queryId. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// queryID - the Query-Store query identifier. -func (client QueryTextsClient) Get(ctx context.Context, resourceGroupName string, serverName string, queryID string) (result QueryText, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.QueryTextsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, queryID) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client QueryTextsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, queryID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "queryId": autorest.Encode("path", queryID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/queryTexts/{queryId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client QueryTextsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client QueryTextsClient) GetResponder(resp *http.Response) (result QueryText, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer retrieve the Query-Store query texts for specified queryIds. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// queryIds - the query identifiers -func (client QueryTextsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, queryIds []string) (result QueryTextsResultListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsClient.ListByServer") - defer func() { - sc := -1 - if result.qtrl.Response.Response != nil { - sc = result.qtrl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: queryIds, - Constraints: []validation.Constraint{{Target: "queryIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.QueryTextsClient", "ListByServer", err.Error()) - } - - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, queryIds) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.qtrl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.qtrl, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.qtrl.hasNextLink() && result.qtrl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client QueryTextsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string, queryIds []string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - "queryIds": queryIds, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/queryTexts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client QueryTextsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client QueryTextsClient) ListByServerResponder(resp *http.Response) (result QueryTextsResultList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client QueryTextsClient) listByServerNextResults(ctx context.Context, lastResults QueryTextsResultList) (result QueryTextsResultList, err error) { - req, err := lastResults.queryTextsResultListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client QueryTextsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, queryIds []string) (result QueryTextsResultListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName, queryIds) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/recommendedactions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/recommendedactions.go deleted file mode 100644 index cfbd8f46bfa0..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/recommendedactions.go +++ /dev/null @@ -1,259 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RecommendedActionsClient is the the Microsoft Azure management API provides create, read, update, and delete -// functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and -// configurations with new business model. -type RecommendedActionsClient struct { - BaseClient -} - -// NewRecommendedActionsClient creates an instance of the RecommendedActionsClient client. -func NewRecommendedActionsClient(subscriptionID string) RecommendedActionsClient { - return NewRecommendedActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRecommendedActionsClientWithBaseURI creates an instance of the RecommendedActionsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewRecommendedActionsClientWithBaseURI(baseURI string, subscriptionID string) RecommendedActionsClient { - return RecommendedActionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieve recommended actions from the advisor. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// advisorName - the advisor name for recommendation action. -// recommendedActionName - the recommended action name. -func (client RecommendedActionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, advisorName string, recommendedActionName string) (result RecommendationAction, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecommendedActionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.RecommendedActionsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, advisorName, recommendedActionName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RecommendedActionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, advisorName string, recommendedActionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "advisorName": autorest.Encode("path", advisorName), - "recommendedActionName": autorest.Encode("path", recommendedActionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client RecommendedActionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client RecommendedActionsClient) GetResponder(resp *http.Response) (result RecommendationAction, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer retrieve recommended actions from the advisor. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// advisorName - the advisor name for recommendation action. -// sessionID - the recommendation action session identifier. -func (client RecommendedActionsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, advisorName string, sessionID string) (result RecommendationActionsResultListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecommendedActionsClient.ListByServer") - defer func() { - sc := -1 - if result.rarl.Response.Response != nil { - sc = result.rarl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.RecommendedActionsClient", "ListByServer", err.Error()) - } - - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, advisorName, sessionID) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.rarl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.rarl, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.rarl.hasNextLink() && result.rarl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client RecommendedActionsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string, advisorName string, sessionID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "advisorName": autorest.Encode("path", advisorName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(sessionID) > 0 { - queryParameters["sessionId"] = autorest.Encode("query", sessionID) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/recommendedActions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client RecommendedActionsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client RecommendedActionsClient) ListByServerResponder(resp *http.Response) (result RecommendationActionsResultList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client RecommendedActionsClient) listByServerNextResults(ctx context.Context, lastResults RecommendationActionsResultList) (result RecommendationActionsResultList, err error) { - req, err := lastResults.recommendationActionsResultListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client RecommendedActionsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, advisorName string, sessionID string) (result RecommendationActionsResultListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecommendedActionsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName, advisorName, sessionID) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/replicas.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/replicas.go deleted file mode 100644 index 93ce74925a16..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/replicas.go +++ /dev/null @@ -1,120 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ReplicasClient is the the Microsoft Azure management API provides create, read, update, and delete functionality for -// Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with -// new business model. -type ReplicasClient struct { - BaseClient -} - -// NewReplicasClient creates an instance of the ReplicasClient client. -func NewReplicasClient(subscriptionID string) ReplicasClient { - return NewReplicasClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewReplicasClientWithBaseURI(baseURI string, subscriptionID string) ReplicasClient { - return ReplicasClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByServer list all the replicas for a given server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client ReplicasClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicasClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ReplicasClient", "ListByServer", err.Error()) - } - - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ReplicasClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.ReplicasClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ReplicasClient", "ListByServer", resp, "Failure responding to request") - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ReplicasClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/replicas", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ReplicasClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ReplicasClient) ListByServerResponder(resp *http.Response) (result ServerListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/servers.go deleted file mode 100644 index b13535358ce5..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/servers.go +++ /dev/null @@ -1,649 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServersClient is the the Microsoft Azure management API provides create, read, update, and delete functionality for -// Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with -// new business model. -type ServersClient struct { - BaseClient -} - -// NewServersClient creates an instance of the ServersClient client. -func NewServersClient(subscriptionID string) ServersClient { - return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { - return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create creates a new server or updates an existing server. The update action will overwrite the existing server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// parameters - the required parameters for creating or updating a server. -func (client ServersClient) Create(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate) (result ServersCreateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Create") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, - }}, - {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ServersClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Create", nil, "Failure preparing request") - return - } - - result, err = client.CreateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Create", result.Response(), "Failure sending request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client ServersClient) CreatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) CreateSender(req *http.Request) (future ServersCreateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client ServersClient) CreateResponder(resp *http.Response) (result Server, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client ServersClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result ServersDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ServersClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) DeleteSender(req *http.Request) (future ServersDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets information about a server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result Server, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ServersClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServersClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServersClient) GetResponder(resp *http.Response) (result Server, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list all the servers in a given subscription. -func (client ServersClient) List(ctx context.Context) (result ServerListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ServersClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ServersClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DBForMariaDB/servers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client ServersClient) ListResponder(resp *http.Response) (result ServerListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup list all the servers in a given resource group. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -func (client ServersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServerListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ServersClient", "ListByResourceGroup", err.Error()) - } - - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ServersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (result ServerListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Restart restarts a server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client ServersClient) Restart(ctx context.Context, resourceGroupName string, serverName string) (result ServersRestartFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Restart") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ServersClient", "Restart", err.Error()) - } - - req, err := client.RestartPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Restart", nil, "Failure preparing request") - return - } - - result, err = client.RestartSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Restart", result.Response(), "Failure sending request") - return - } - - return -} - -// RestartPreparer prepares the Restart request. -func (client ServersClient) RestartPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/restart", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RestartSender sends the Restart request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) RestartSender(req *http.Request) (future ServersRestartFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RestartResponder handles the response to the Restart request. The method always -// closes the http.Response Body. -func (client ServersClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates an existing server. The request body can contain one to many of the properties present in the normal -// server definition. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// parameters - the required parameters for updating a server. -func (client ServersClient) Update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters) (result ServersUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ServersClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) UpdateSender(req *http.Request) (future ServersUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ServersClient) UpdateResponder(resp *http.Response) (result Server, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/serversecurityalertpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/serversecurityalertpolicies.go deleted file mode 100644 index 8d934a4e58bd..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/serversecurityalertpolicies.go +++ /dev/null @@ -1,215 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServerSecurityAlertPoliciesClient is the the Microsoft Azure management API provides create, read, update, and -// delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files -// and configurations with new business model. -type ServerSecurityAlertPoliciesClient struct { - BaseClient -} - -// NewServerSecurityAlertPoliciesClient creates an instance of the ServerSecurityAlertPoliciesClient client. -func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityAlertPoliciesClient { - return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient { - return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a threat detection policy. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// parameters - the server security alert policy. -func (client ServerSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (result ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerSecurityAlertPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityAlertPolicyName": autorest.Encode("path", "Default"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get get a server's security alert policy. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerSecurityAlertPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.ServerSecurityAlertPoliciesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServerSecurityAlertPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityAlertPolicyName": autorest.Encode("path", "Default"), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServerSecurityAlertPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServerSecurityAlertPoliciesClient) GetResponder(resp *http.Response) (result ServerSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/topquerystatistics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/topquerystatistics.go deleted file mode 100644 index 01fbea398d8e..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/topquerystatistics.go +++ /dev/null @@ -1,263 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// TopQueryStatisticsClient is the the Microsoft Azure management API provides create, read, update, and delete -// functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and -// configurations with new business model. -type TopQueryStatisticsClient struct { - BaseClient -} - -// NewTopQueryStatisticsClient creates an instance of the TopQueryStatisticsClient client. -func NewTopQueryStatisticsClient(subscriptionID string) TopQueryStatisticsClient { - return NewTopQueryStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewTopQueryStatisticsClientWithBaseURI creates an instance of the TopQueryStatisticsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewTopQueryStatisticsClientWithBaseURI(baseURI string, subscriptionID string) TopQueryStatisticsClient { - return TopQueryStatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieve the query statistic for specified identifier. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// queryStatisticID - the Query Statistic identifier. -func (client TopQueryStatisticsClient) Get(ctx context.Context, resourceGroupName string, serverName string, queryStatisticID string) (result QueryStatistic, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.TopQueryStatisticsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, queryStatisticID) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client TopQueryStatisticsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, queryStatisticID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "queryStatisticId": autorest.Encode("path", queryStatisticID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/topQueryStatistics/{queryStatisticId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client TopQueryStatisticsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client TopQueryStatisticsClient) GetResponder(resp *http.Response) (result QueryStatistic, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer retrieve the Query-Store top queries for specified metric and aggregation. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// parameters - the required parameters for retrieving top query statistics. -func (client TopQueryStatisticsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, parameters TopQueryStatisticsInput) (result TopQueryStatisticsResultListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsClient.ListByServer") - defer func() { - sc := -1 - if result.tqsrl.Response.Response != nil { - sc = result.tqsrl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TopQueryStatisticsInputProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.TopQueryStatisticsInputProperties.NumberOfTopQueries", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TopQueryStatisticsInputProperties.AggregationFunction", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TopQueryStatisticsInputProperties.ObservedMetric", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TopQueryStatisticsInputProperties.ObservationStartTime", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TopQueryStatisticsInputProperties.ObservationEndTime", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TopQueryStatisticsInputProperties.AggregationWindow", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("mariadb.TopQueryStatisticsClient", "ListByServer", err.Error()) - } - - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.tqsrl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.tqsrl, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.tqsrl.hasNextLink() && result.tqsrl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client TopQueryStatisticsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string, parameters TopQueryStatisticsInput) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/topQueryStatistics", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client TopQueryStatisticsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client TopQueryStatisticsClient) ListByServerResponder(resp *http.Response) (result TopQueryStatisticsResultList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client TopQueryStatisticsClient) listByServerNextResults(ctx context.Context, lastResults TopQueryStatisticsResultList) (result TopQueryStatisticsResultList, err error) { - req, err := lastResults.topQueryStatisticsResultListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client TopQueryStatisticsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, parameters TopQueryStatisticsInput) (result TopQueryStatisticsResultListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName, parameters) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/version.go deleted file mode 100644 index 6490eb48c93d..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package mariadb - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " mariadb/2018-06-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/virtualnetworkrules.go deleted file mode 100644 index aa9dfb2aa1c8..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/virtualnetworkrules.go +++ /dev/null @@ -1,438 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualNetworkRulesClient is the the Microsoft Azure management API provides create, read, update, and delete -// functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and -// configurations with new business model. -type VirtualNetworkRulesClient struct { - BaseClient -} - -// NewVirtualNetworkRulesClient creates an instance of the VirtualNetworkRulesClient client. -func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient { - return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { - return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an existing virtual network rule. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// virtualNetworkRuleName - the name of the virtual network rule. -// parameters - the requested virtual Network Rule Resource state. -func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (result VirtualNetworkRulesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties.VirtualNetworkSubnetID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("mariadb.VirtualNetworkRulesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualNetworkRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkRulesClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkRulesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualNetworkRulesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the virtual network rule with the given name. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// virtualNetworkRuleName - the name of the virtual network rule. -func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRulesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.VirtualNetworkRulesClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualNetworkRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkRulesClient) DeleteSender(req *http.Request) (future VirtualNetworkRulesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualNetworkRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a virtual network rule. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// virtualNetworkRuleName - the name of the virtual network rule. -func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.VirtualNetworkRulesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualNetworkRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkRulesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client VirtualNetworkRulesClient) GetResponder(resp *http.Response) (result VirtualNetworkRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer gets a list of virtual network rules in a server. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client VirtualNetworkRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer") - defer func() { - sc := -1 - if result.vnrlr.Response.Response != nil { - sc = result.vnrlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.VirtualNetworkRulesClient", "ListByServer", err.Error()) - } - - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.vnrlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "ListByServer", resp, "Failure sending request") - return - } - - result.vnrlr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.vnrlr.hasNextLink() && result.vnrlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client VirtualNetworkRulesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/virtualNetworkRules", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkRulesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client VirtualNetworkRulesClient) ListByServerResponder(resp *http.Response) (result VirtualNetworkRuleListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client VirtualNetworkRulesClient) listByServerNextResults(ctx context.Context, lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) { - req, err := lastResults.virtualNetworkRuleListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/waitstatistics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/waitstatistics.go deleted file mode 100644 index dea80dafff8d..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/waitstatistics.go +++ /dev/null @@ -1,259 +0,0 @@ -package mariadb - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WaitStatisticsClient is the the Microsoft Azure management API provides create, read, update, and delete -// functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and -// configurations with new business model. -type WaitStatisticsClient struct { - BaseClient -} - -// NewWaitStatisticsClient creates an instance of the WaitStatisticsClient client. -func NewWaitStatisticsClient(subscriptionID string) WaitStatisticsClient { - return NewWaitStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWaitStatisticsClientWithBaseURI creates an instance of the WaitStatisticsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWaitStatisticsClientWithBaseURI(baseURI string, subscriptionID string) WaitStatisticsClient { - return WaitStatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieve wait statistics for specified identifier. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// waitStatisticsID - the Wait Statistic identifier. -func (client WaitStatisticsClient) Get(ctx context.Context, resourceGroupName string, serverName string, waitStatisticsID string) (result WaitStatistic, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("mariadb.WaitStatisticsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, waitStatisticsID) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WaitStatisticsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, waitStatisticsID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "waitStatisticsId": autorest.Encode("path", waitStatisticsID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/waitStatistics/{waitStatisticsId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WaitStatisticsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WaitStatisticsClient) GetResponder(resp *http.Response) (result WaitStatistic, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByServer retrieve wait statistics for specified aggregation window. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -// parameters - the required parameters for retrieving wait statistics. -func (client WaitStatisticsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, parameters WaitStatisticsInput) (result WaitStatisticsResultListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsClient.ListByServer") - defer func() { - sc := -1 - if result.wsrl.Response.Response != nil { - sc = result.wsrl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.WaitStatisticsInputProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.WaitStatisticsInputProperties.ObservationStartTime", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.WaitStatisticsInputProperties.ObservationEndTime", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.WaitStatisticsInputProperties.AggregationWindow", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("mariadb.WaitStatisticsClient", "ListByServer", err.Error()) - } - - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.wsrl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "ListByServer", resp, "Failure sending request") - return - } - - result.wsrl, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "ListByServer", resp, "Failure responding to request") - return - } - if result.wsrl.hasNextLink() && result.wsrl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client WaitStatisticsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string, parameters WaitStatisticsInput) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/waitStatistics", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client WaitStatisticsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client WaitStatisticsClient) ListByServerResponder(resp *http.Response) (result WaitStatisticsResultList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client WaitStatisticsClient) listByServerNextResults(ctx context.Context, lastResults WaitStatisticsResultList) (result WaitStatisticsResultList, err error) { - req, err := lastResults.waitStatisticsResultListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client WaitStatisticsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, parameters WaitStatisticsInput) (result WaitStatisticsResultListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName, parameters) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/README.md new file mode 100644 index 000000000000..fa17aca6a5cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/README.md @@ -0,0 +1,69 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations` Documentation + +The `configurations` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-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/mariadb/2018-06-01/configurations" +``` + + +### Client Initialization + +```go +client := configurations.NewConfigurationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ConfigurationsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := configurations.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "configurationValue") + +payload := configurations.Configuration{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ConfigurationsClient.Get` + +```go +ctx := context.TODO() +id := configurations.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "configurationValue") + +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: `ConfigurationsClient.ListByServer` + +```go +ctx := context.TODO() +id := configurations.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.ListByServer(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/client.go new file mode 100644 index 000000000000..bbe813edd989 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/client.go @@ -0,0 +1,18 @@ +package configurations + +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 ConfigurationsClient struct { + Client autorest.Client + baseUri string +} + +func NewConfigurationsClientWithBaseURI(endpoint string) ConfigurationsClient { + return ConfigurationsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go new file mode 100644 index 000000000000..4ee365c6b97d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go @@ -0,0 +1,137 @@ +package configurations + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = ConfigurationId{} + +// ConfigurationId is a struct representing the Resource ID for a Configuration +type ConfigurationId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + ConfigurationName string +} + +// NewConfigurationID returns a new ConfigurationId struct +func NewConfigurationID(subscriptionId string, resourceGroupName string, serverName string, configurationName string) ConfigurationId { + return ConfigurationId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + ConfigurationName: configurationName, + } +} + +// ParseConfigurationID parses 'input' into a ConfigurationId +func ParseConfigurationID(input string) (*ConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(ConfigurationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ConfigurationId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { + return nil, fmt.Errorf("the segment 'configurationName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseConfigurationIDInsensitively parses 'input' case-insensitively into a ConfigurationId +// note: this method should only be used for API response data and not user input +func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(ConfigurationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ConfigurationId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { + return nil, fmt.Errorf("the segment 'configurationName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID +func ValidateConfigurationID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseConfigurationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Configuration ID +func (id ConfigurationId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/configurations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.ConfigurationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Configuration ID +func (id ConfigurationId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticConfigurations", "configurations", "configurations"), + resourceids.UserSpecifiedSegment("configurationName", "configurationValue"), + } +} + +// String returns a human-readable description of this Configuration ID +func (id ConfigurationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Configuration Name: %q", id.ConfigurationName), + } + return fmt.Sprintf("Configuration (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go new file mode 100644 index 000000000000..01a99b520638 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go @@ -0,0 +1,124 @@ +package configurations + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = ServerId{} + +// ServerId is a struct representing the Resource ID for a Server +type ServerId struct { + SubscriptionId string + ResourceGroupName string + ServerName string +} + +// NewServerID returns a new ServerId struct +func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId { + return ServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + } +} + +// ParseServerID parses 'input' into a ServerId +func ParseServerID(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId +// note: this method should only be used for API response data and not user input +func ParseServerIDInsensitively(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateServerID checks that 'input' can be parsed as a Server ID +func ValidateServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Server ID +func (id ServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Server ID +func (id ServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + } +} + +// String returns a human-readable description of this Server ID +func (id ServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + } + return fmt.Sprintf("Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_createorupdate_autorest.go new file mode 100644 index 000000000000..c1e771a52d14 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_createorupdate_autorest.go @@ -0,0 +1,79 @@ +package configurations + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// CreateOrUpdate ... +func (c ConfigurationsClient) CreateOrUpdate(ctx context.Context, id ConfigurationId, input Configuration) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "configurations.ConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = c.senderForCreateOrUpdate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "configurations.ConfigurationsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c ConfigurationsClient) CreateOrUpdateThenPoll(ctx context.Context, id ConfigurationId, input Configuration) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c ConfigurationsClient) preparerForCreateOrUpdate(ctx context.Context, id ConfigurationId, input Configuration) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForCreateOrUpdate sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (c ConfigurationsClient) senderForCreateOrUpdate(ctx context.Context, req *http.Request) (future CreateOrUpdateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_get_autorest.go new file mode 100644 index 000000000000..2aeb488f91c0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_get_autorest.go @@ -0,0 +1,68 @@ +package configurations + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *Configuration +} + +// Get ... +func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "configurations.ConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "configurations.ConfigurationsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "configurations.ConfigurationsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c ConfigurationsClient) preparerForGet(ctx context.Context, id ConfigurationId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c ConfigurationsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver_autorest.go new file mode 100644 index 000000000000..950a5ec48c1b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver_autorest.go @@ -0,0 +1,69 @@ +package configurations + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + Model *ConfigurationListResult +} + +// ListByServer ... +func (c ConfigurationsClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error) { + req, err := c.preparerForListByServer(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "configurations.ConfigurationsClient", "ListByServer", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "configurations.ConfigurationsClient", "ListByServer", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByServer(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "configurations.ConfigurationsClient", "ListByServer", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListByServer prepares the ListByServer request. +func (c ConfigurationsClient) preparerForListByServer(ctx context.Context, id ServerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/configurations", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByServer handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (c ConfigurationsClient) responderForListByServer(resp *http.Response) (result ListByServerOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configuration.go new file mode 100644 index 000000000000..84bf2c281276 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configuration.go @@ -0,0 +1,11 @@ +package configurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Configuration struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ConfigurationProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationlistresult.go new file mode 100644 index 000000000000..98af12f5801e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationlistresult.go @@ -0,0 +1,8 @@ +package configurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationListResult struct { + Value *[]Configuration `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationproperties.go new file mode 100644 index 000000000000..51143bf6154a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/model_configurationproperties.go @@ -0,0 +1,13 @@ +package configurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationProperties struct { + AllowedValues *string `json:"allowedValues,omitempty"` + DataType *string `json:"dataType,omitempty"` + DefaultValue *string `json:"defaultValue,omitempty"` + Description *string `json:"description,omitempty"` + Source *string `json:"source,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/version.go new file mode 100644 index 000000000000..b31650f64344 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/version.go @@ -0,0 +1,12 @@ +package configurations + +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 = "2018-06-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/README.md new file mode 100644 index 000000000000..3685fef1934d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/README.md @@ -0,0 +1,81 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases` Documentation + +The `databases` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-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/mariadb/2018-06-01/databases" +``` + + +### Client Initialization + +```go +client := databases.NewDatabasesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DatabasesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +payload := databases.Database{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Delete` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Get` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue") + +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: `DatabasesClient.ListByServer` + +```go +ctx := context.TODO() +id := databases.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.ListByServer(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/client.go new file mode 100644 index 000000000000..5305d65eb6c1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/client.go @@ -0,0 +1,18 @@ +package databases + +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 DatabasesClient struct { + Client autorest.Client + baseUri string +} + +func NewDatabasesClientWithBaseURI(endpoint string) DatabasesClient { + return DatabasesClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go new file mode 100644 index 000000000000..4a5dcb246904 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go @@ -0,0 +1,137 @@ +package databases + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = DatabaseId{} + +// DatabaseId is a struct representing the Resource ID for a Database +type DatabaseId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + DatabaseName string +} + +// NewDatabaseID returns a new DatabaseId struct +func NewDatabaseID(subscriptionId string, resourceGroupName string, serverName string, databaseName string) DatabaseId { + return DatabaseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + DatabaseName: databaseName, + } +} + +// ParseDatabaseID parses 'input' into a DatabaseId +func ParseDatabaseID(input string) (*DatabaseId, error) { + parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := DatabaseId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { + return nil, fmt.Errorf("the segment 'databaseName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId +// note: this method should only be used for API response data and not user input +func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { + parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := DatabaseId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { + return nil, fmt.Errorf("the segment 'databaseName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateDatabaseID checks that 'input' can be parsed as a Database ID +func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseDatabaseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Database ID +func (id DatabaseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/databases/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.DatabaseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Database ID +func (id DatabaseId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticDatabases", "databases", "databases"), + resourceids.UserSpecifiedSegment("databaseName", "databaseValue"), + } +} + +// String returns a human-readable description of this Database ID +func (id DatabaseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Database Name: %q", id.DatabaseName), + } + return fmt.Sprintf("Database (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go new file mode 100644 index 000000000000..2369e7a1a499 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go @@ -0,0 +1,124 @@ +package databases + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = ServerId{} + +// ServerId is a struct representing the Resource ID for a Server +type ServerId struct { + SubscriptionId string + ResourceGroupName string + ServerName string +} + +// NewServerID returns a new ServerId struct +func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId { + return ServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + } +} + +// ParseServerID parses 'input' into a ServerId +func ParseServerID(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId +// note: this method should only be used for API response data and not user input +func ParseServerIDInsensitively(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateServerID checks that 'input' can be parsed as a Server ID +func ValidateServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Server ID +func (id ServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Server ID +func (id ServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + } +} + +// String returns a human-readable description of this Server ID +func (id ServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + } + return fmt.Sprintf("Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_createorupdate_autorest.go new file mode 100644 index 000000000000..8046543297da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_createorupdate_autorest.go @@ -0,0 +1,79 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// CreateOrUpdate ... +func (c DatabasesClient) CreateOrUpdate(ctx context.Context, id DatabaseId, input Database) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = c.senderForCreateOrUpdate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c DatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id DatabaseId, input Database) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c DatabasesClient) preparerForCreateOrUpdate(ctx context.Context, id DatabaseId, input Database) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForCreateOrUpdate sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (c DatabasesClient) senderForCreateOrUpdate(ctx context.Context, req *http.Request) (future CreateOrUpdateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_delete_autorest.go new file mode 100644 index 000000000000..13221da85a68 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_delete_autorest.go @@ -0,0 +1,78 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Delete ... +func (c DatabasesClient) Delete(ctx context.Context, id DatabaseId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = c.senderForDelete(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c DatabasesClient) DeleteThenPoll(ctx context.Context, id DatabaseId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} + +// preparerForDelete prepares the Delete request. +func (c DatabasesClient) preparerForDelete(ctx context.Context, id DatabaseId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForDelete sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (c DatabasesClient) senderForDelete(ctx context.Context, req *http.Request) (future DeleteOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_get_autorest.go new file mode 100644 index 000000000000..f35d313d2268 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_get_autorest.go @@ -0,0 +1,68 @@ +package databases + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *Database +} + +// Get ... +func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c DatabasesClient) preparerForGet(ctx context.Context, id DatabaseId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c DatabasesClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_listbyserver_autorest.go new file mode 100644 index 000000000000..c02aac94bf65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/method_listbyserver_autorest.go @@ -0,0 +1,69 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + Model *DatabaseListResult +} + +// ListByServer ... +func (c DatabasesClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error) { + req, err := c.preparerForListByServer(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "ListByServer", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "ListByServer", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByServer(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "ListByServer", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListByServer prepares the ListByServer request. +func (c DatabasesClient) preparerForListByServer(ctx context.Context, id ServerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/databases", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByServer handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (c DatabasesClient) responderForListByServer(resp *http.Response) (result ListByServerOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_database.go new file mode 100644 index 000000000000..a9880a7432bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_database.go @@ -0,0 +1,11 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Database struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *DatabaseProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaselistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaselistresult.go new file mode 100644 index 000000000000..80645ead0923 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaselistresult.go @@ -0,0 +1,8 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseListResult struct { + Value *[]Database `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaseproperties.go new file mode 100644 index 000000000000..85fcbd70d578 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/model_databaseproperties.go @@ -0,0 +1,9 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseProperties struct { + Charset *string `json:"charset,omitempty"` + Collation *string `json:"collation,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/version.go new file mode 100644 index 000000000000..6edfbce43c1b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/version.go @@ -0,0 +1,12 @@ +package databases + +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 = "2018-06-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/README.md new file mode 100644 index 000000000000..d46a7c5402ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/README.md @@ -0,0 +1,81 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules` Documentation + +The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-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/mariadb/2018-06-01/firewallrules" +``` + + +### Client Initialization + +```go +client := firewallrules.NewFirewallRulesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `FirewallRulesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "firewallRuleValue") + +payload := firewallrules.FirewallRule{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `FirewallRulesClient.Delete` + +```go +ctx := context.TODO() +id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "firewallRuleValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FirewallRulesClient.Get` + +```go +ctx := context.TODO() +id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "firewallRuleValue") + +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: `FirewallRulesClient.ListByServer` + +```go +ctx := context.TODO() +id := firewallrules.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +read, err := client.ListByServer(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/client.go new file mode 100644 index 000000000000..ac01b0459a14 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/client.go @@ -0,0 +1,18 @@ +package firewallrules + +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 FirewallRulesClient struct { + Client autorest.Client + baseUri string +} + +func NewFirewallRulesClientWithBaseURI(endpoint string) FirewallRulesClient { + return FirewallRulesClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go new file mode 100644 index 000000000000..7c308c2e5efa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go @@ -0,0 +1,137 @@ +package firewallrules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = FirewallRuleId{} + +// FirewallRuleId is a struct representing the Resource ID for a Firewall Rule +type FirewallRuleId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + FirewallRuleName string +} + +// NewFirewallRuleID returns a new FirewallRuleId struct +func NewFirewallRuleID(subscriptionId string, resourceGroupName string, serverName string, firewallRuleName string) FirewallRuleId { + return FirewallRuleId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + FirewallRuleName: firewallRuleName, + } +} + +// ParseFirewallRuleID parses 'input' into a FirewallRuleId +func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(FirewallRuleId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := FirewallRuleId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { + return nil, fmt.Errorf("the segment 'firewallRuleName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseFirewallRuleIDInsensitively parses 'input' case-insensitively into a FirewallRuleId +// note: this method should only be used for API response data and not user input +func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(FirewallRuleId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := FirewallRuleId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { + return nil, fmt.Errorf("the segment 'firewallRuleName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID +func ValidateFirewallRuleID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFirewallRuleID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Firewall Rule ID +func (id FirewallRuleId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/firewallRules/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.FirewallRuleName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Firewall Rule ID +func (id FirewallRuleId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticFirewallRules", "firewallRules", "firewallRules"), + resourceids.UserSpecifiedSegment("firewallRuleName", "firewallRuleValue"), + } +} + +// String returns a human-readable description of this Firewall Rule ID +func (id FirewallRuleId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Firewall Rule Name: %q", id.FirewallRuleName), + } + return fmt.Sprintf("Firewall Rule (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go new file mode 100644 index 000000000000..a6c5ab98447e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go @@ -0,0 +1,124 @@ +package firewallrules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = ServerId{} + +// ServerId is a struct representing the Resource ID for a Server +type ServerId struct { + SubscriptionId string + ResourceGroupName string + ServerName string +} + +// NewServerID returns a new ServerId struct +func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId { + return ServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + } +} + +// ParseServerID parses 'input' into a ServerId +func ParseServerID(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId +// note: this method should only be used for API response data and not user input +func ParseServerIDInsensitively(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateServerID checks that 'input' can be parsed as a Server ID +func ValidateServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Server ID +func (id ServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Server ID +func (id ServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + } +} + +// String returns a human-readable description of this Server ID +func (id ServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + } + return fmt.Sprintf("Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_createorupdate_autorest.go new file mode 100644 index 000000000000..0dfa761f1a0e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_createorupdate_autorest.go @@ -0,0 +1,79 @@ +package firewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// CreateOrUpdate ... +func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRuleId, input FirewallRule) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = c.senderForCreateOrUpdate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c FirewallRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id FirewallRuleId, input FirewallRule) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c FirewallRulesClient) preparerForCreateOrUpdate(ctx context.Context, id FirewallRuleId, input FirewallRule) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForCreateOrUpdate sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (c FirewallRulesClient) senderForCreateOrUpdate(ctx context.Context, req *http.Request) (future CreateOrUpdateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_delete_autorest.go new file mode 100644 index 000000000000..ec4b290ecddb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_delete_autorest.go @@ -0,0 +1,78 @@ +package firewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Delete ... +func (c FirewallRulesClient) Delete(ctx context.Context, id FirewallRuleId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = c.senderForDelete(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c FirewallRulesClient) DeleteThenPoll(ctx context.Context, id FirewallRuleId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} + +// preparerForDelete prepares the Delete request. +func (c FirewallRulesClient) preparerForDelete(ctx context.Context, id FirewallRuleId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForDelete sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (c FirewallRulesClient) senderForDelete(ctx context.Context, req *http.Request) (future DeleteOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_get_autorest.go new file mode 100644 index 000000000000..1391c01ba1a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_get_autorest.go @@ -0,0 +1,68 @@ +package firewallrules + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *FirewallRule +} + +// Get ... +func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c FirewallRulesClient) preparerForGet(ctx context.Context, id FirewallRuleId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c FirewallRulesClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver_autorest.go new file mode 100644 index 000000000000..70624d92ee85 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver_autorest.go @@ -0,0 +1,69 @@ +package firewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + Model *FirewallRuleListResult +} + +// ListByServer ... +func (c FirewallRulesClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error) { + req, err := c.preparerForListByServer(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "ListByServer", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "ListByServer", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByServer(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "firewallrules.FirewallRulesClient", "ListByServer", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListByServer prepares the ListByServer request. +func (c FirewallRulesClient) preparerForListByServer(ctx context.Context, id ServerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/firewallRules", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByServer handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (c FirewallRulesClient) responderForListByServer(resp *http.Response) (result ListByServerOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrule.go new file mode 100644 index 000000000000..3178a13ed2c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrule.go @@ -0,0 +1,11 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRule struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties FirewallRuleProperties `json:"properties"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrulelistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrulelistresult.go new file mode 100644 index 000000000000..c01e91fae564 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallrulelistresult.go @@ -0,0 +1,8 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRuleListResult struct { + Value *[]FirewallRule `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallruleproperties.go new file mode 100644 index 000000000000..fca4e1c3684b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/model_firewallruleproperties.go @@ -0,0 +1,9 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRuleProperties struct { + EndIPAddress string `json:"endIpAddress"` + StartIPAddress string `json:"startIpAddress"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/version.go new file mode 100644 index 000000000000..50bf96272aeb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/version.go @@ -0,0 +1,12 @@ +package firewallrules + +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 = "2018-06-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/README.md new file mode 100644 index 000000000000..69d2b94e329e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/README.md @@ -0,0 +1,114 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers` Documentation + +The `servers` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-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/mariadb/2018-06-01/servers" +``` + + +### Client Initialization + +```go +client := servers.NewServersClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServersClient.Create` + +```go +ctx := context.TODO() +id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := servers.ServerForCreate{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServersClient.Delete` + +```go +ctx := context.TODO() +id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServersClient.Get` + +```go +ctx := context.TODO() +id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +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: `ServersClient.List` + +```go +ctx := context.TODO() +id := servers.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +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 +} +``` + + +### Example Usage: `ServersClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := servers.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +read, err := client.ListByResourceGroup(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServersClient.Update` + +```go +ctx := context.TODO() +id := servers.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +payload := servers.ServerUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/client.go new file mode 100644 index 000000000000..fd9e02ba599f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/client.go @@ -0,0 +1,18 @@ +package servers + +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 ServersClient struct { + Client autorest.Client + baseUri string +} + +func NewServersClientWithBaseURI(endpoint string) ServersClient { + return ServersClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/constants.go new file mode 100644 index 000000000000..7f3894de004e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/constants.go @@ -0,0 +1,372 @@ +package servers + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateMode string + +const ( + CreateModeDefault CreateMode = "Default" + CreateModeGeoRestore CreateMode = "GeoRestore" + CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" + CreateModeReplica CreateMode = "Replica" +) + +func PossibleValuesForCreateMode() []string { + return []string{ + string(CreateModeDefault), + string(CreateModeGeoRestore), + string(CreateModePointInTimeRestore), + string(CreateModeReplica), + } +} + +func parseCreateMode(input string) (*CreateMode, error) { + vals := map[string]CreateMode{ + "default": CreateModeDefault, + "georestore": CreateModeGeoRestore, + "pointintimerestore": CreateModePointInTimeRestore, + "replica": CreateModeReplica, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CreateMode(input) + return &out, nil +} + +type GeoRedundantBackup string + +const ( + GeoRedundantBackupDisabled GeoRedundantBackup = "Disabled" + GeoRedundantBackupEnabled GeoRedundantBackup = "Enabled" +) + +func PossibleValuesForGeoRedundantBackup() []string { + return []string{ + string(GeoRedundantBackupDisabled), + string(GeoRedundantBackupEnabled), + } +} + +func parseGeoRedundantBackup(input string) (*GeoRedundantBackup, error) { + vals := map[string]GeoRedundantBackup{ + "disabled": GeoRedundantBackupDisabled, + "enabled": GeoRedundantBackupEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GeoRedundantBackup(input) + return &out, nil +} + +type MinimalTlsVersionEnum string + +const ( + MinimalTlsVersionEnumTLSEnforcementDisabled MinimalTlsVersionEnum = "TLSEnforcementDisabled" + MinimalTlsVersionEnumTLSOneOne MinimalTlsVersionEnum = "TLS1_1" + MinimalTlsVersionEnumTLSOneTwo MinimalTlsVersionEnum = "TLS1_2" + MinimalTlsVersionEnumTLSOneZero MinimalTlsVersionEnum = "TLS1_0" +) + +func PossibleValuesForMinimalTlsVersionEnum() []string { + return []string{ + string(MinimalTlsVersionEnumTLSEnforcementDisabled), + string(MinimalTlsVersionEnumTLSOneOne), + string(MinimalTlsVersionEnumTLSOneTwo), + string(MinimalTlsVersionEnumTLSOneZero), + } +} + +func parseMinimalTlsVersionEnum(input string) (*MinimalTlsVersionEnum, error) { + vals := map[string]MinimalTlsVersionEnum{ + "tlsenforcementdisabled": MinimalTlsVersionEnumTLSEnforcementDisabled, + "tls1_1": MinimalTlsVersionEnumTLSOneOne, + "tls1_2": MinimalTlsVersionEnumTLSOneTwo, + "tls1_0": MinimalTlsVersionEnumTLSOneZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MinimalTlsVersionEnum(input) + return &out, nil +} + +type PrivateEndpointProvisioningState string + +const ( + PrivateEndpointProvisioningStateApproving PrivateEndpointProvisioningState = "Approving" + PrivateEndpointProvisioningStateDropping PrivateEndpointProvisioningState = "Dropping" + PrivateEndpointProvisioningStateFailed PrivateEndpointProvisioningState = "Failed" + PrivateEndpointProvisioningStateReady PrivateEndpointProvisioningState = "Ready" + PrivateEndpointProvisioningStateRejecting PrivateEndpointProvisioningState = "Rejecting" +) + +func PossibleValuesForPrivateEndpointProvisioningState() []string { + return []string{ + string(PrivateEndpointProvisioningStateApproving), + string(PrivateEndpointProvisioningStateDropping), + string(PrivateEndpointProvisioningStateFailed), + string(PrivateEndpointProvisioningStateReady), + string(PrivateEndpointProvisioningStateRejecting), + } +} + +func parsePrivateEndpointProvisioningState(input string) (*PrivateEndpointProvisioningState, error) { + vals := map[string]PrivateEndpointProvisioningState{ + "approving": PrivateEndpointProvisioningStateApproving, + "dropping": PrivateEndpointProvisioningStateDropping, + "failed": PrivateEndpointProvisioningStateFailed, + "ready": PrivateEndpointProvisioningStateReady, + "rejecting": PrivateEndpointProvisioningStateRejecting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointProvisioningState(input) + return &out, nil +} + +type PrivateLinkServiceConnectionStateActionsRequire string + +const ( + PrivateLinkServiceConnectionStateActionsRequireNone PrivateLinkServiceConnectionStateActionsRequire = "None" +) + +func PossibleValuesForPrivateLinkServiceConnectionStateActionsRequire() []string { + return []string{ + string(PrivateLinkServiceConnectionStateActionsRequireNone), + } +} + +func parsePrivateLinkServiceConnectionStateActionsRequire(input string) (*PrivateLinkServiceConnectionStateActionsRequire, error) { + vals := map[string]PrivateLinkServiceConnectionStateActionsRequire{ + "none": PrivateLinkServiceConnectionStateActionsRequireNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateLinkServiceConnectionStateActionsRequire(input) + return &out, nil +} + +type PrivateLinkServiceConnectionStateStatus string + +const ( + PrivateLinkServiceConnectionStateStatusApproved PrivateLinkServiceConnectionStateStatus = "Approved" + PrivateLinkServiceConnectionStateStatusDisconnected PrivateLinkServiceConnectionStateStatus = "Disconnected" + PrivateLinkServiceConnectionStateStatusPending PrivateLinkServiceConnectionStateStatus = "Pending" + PrivateLinkServiceConnectionStateStatusRejected PrivateLinkServiceConnectionStateStatus = "Rejected" +) + +func PossibleValuesForPrivateLinkServiceConnectionStateStatus() []string { + return []string{ + string(PrivateLinkServiceConnectionStateStatusApproved), + string(PrivateLinkServiceConnectionStateStatusDisconnected), + string(PrivateLinkServiceConnectionStateStatusPending), + string(PrivateLinkServiceConnectionStateStatusRejected), + } +} + +func parsePrivateLinkServiceConnectionStateStatus(input string) (*PrivateLinkServiceConnectionStateStatus, error) { + vals := map[string]PrivateLinkServiceConnectionStateStatus{ + "approved": PrivateLinkServiceConnectionStateStatusApproved, + "disconnected": PrivateLinkServiceConnectionStateStatusDisconnected, + "pending": PrivateLinkServiceConnectionStateStatusPending, + "rejected": PrivateLinkServiceConnectionStateStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateLinkServiceConnectionStateStatus(input) + return &out, nil +} + +type PublicNetworkAccessEnum string + +const ( + PublicNetworkAccessEnumDisabled PublicNetworkAccessEnum = "Disabled" + PublicNetworkAccessEnumEnabled PublicNetworkAccessEnum = "Enabled" +) + +func PossibleValuesForPublicNetworkAccessEnum() []string { + return []string{ + string(PublicNetworkAccessEnumDisabled), + string(PublicNetworkAccessEnumEnabled), + } +} + +func parsePublicNetworkAccessEnum(input string) (*PublicNetworkAccessEnum, error) { + vals := map[string]PublicNetworkAccessEnum{ + "disabled": PublicNetworkAccessEnumDisabled, + "enabled": PublicNetworkAccessEnumEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicNetworkAccessEnum(input) + return &out, nil +} + +type ServerState string + +const ( + ServerStateDisabled ServerState = "Disabled" + ServerStateDropping ServerState = "Dropping" + ServerStateReady ServerState = "Ready" +) + +func PossibleValuesForServerState() []string { + return []string{ + string(ServerStateDisabled), + string(ServerStateDropping), + string(ServerStateReady), + } +} + +func parseServerState(input string) (*ServerState, error) { + vals := map[string]ServerState{ + "disabled": ServerStateDisabled, + "dropping": ServerStateDropping, + "ready": ServerStateReady, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerState(input) + return &out, nil +} + +type ServerVersion string + +const ( + ServerVersionOneZeroPointThree ServerVersion = "10.3" + ServerVersionOneZeroPointTwo ServerVersion = "10.2" +) + +func PossibleValuesForServerVersion() []string { + return []string{ + string(ServerVersionOneZeroPointThree), + string(ServerVersionOneZeroPointTwo), + } +} + +func parseServerVersion(input string) (*ServerVersion, error) { + vals := map[string]ServerVersion{ + "10.3": ServerVersionOneZeroPointThree, + "10.2": ServerVersionOneZeroPointTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerVersion(input) + return &out, nil +} + +type SkuTier string + +const ( + SkuTierBasic SkuTier = "Basic" + SkuTierGeneralPurpose SkuTier = "GeneralPurpose" + SkuTierMemoryOptimized SkuTier = "MemoryOptimized" +) + +func PossibleValuesForSkuTier() []string { + return []string{ + string(SkuTierBasic), + string(SkuTierGeneralPurpose), + string(SkuTierMemoryOptimized), + } +} + +func parseSkuTier(input string) (*SkuTier, error) { + vals := map[string]SkuTier{ + "basic": SkuTierBasic, + "generalpurpose": SkuTierGeneralPurpose, + "memoryoptimized": SkuTierMemoryOptimized, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuTier(input) + return &out, nil +} + +type SslEnforcementEnum string + +const ( + SslEnforcementEnumDisabled SslEnforcementEnum = "Disabled" + SslEnforcementEnumEnabled SslEnforcementEnum = "Enabled" +) + +func PossibleValuesForSslEnforcementEnum() []string { + return []string{ + string(SslEnforcementEnumDisabled), + string(SslEnforcementEnumEnabled), + } +} + +func parseSslEnforcementEnum(input string) (*SslEnforcementEnum, error) { + vals := map[string]SslEnforcementEnum{ + "disabled": SslEnforcementEnumDisabled, + "enabled": SslEnforcementEnumEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SslEnforcementEnum(input) + return &out, nil +} + +type StorageAutogrow string + +const ( + StorageAutogrowDisabled StorageAutogrow = "Disabled" + StorageAutogrowEnabled StorageAutogrow = "Enabled" +) + +func PossibleValuesForStorageAutogrow() []string { + return []string{ + string(StorageAutogrowDisabled), + string(StorageAutogrowEnabled), + } +} + +func parseStorageAutogrow(input string) (*StorageAutogrow, error) { + vals := map[string]StorageAutogrow{ + "disabled": StorageAutogrowDisabled, + "enabled": StorageAutogrowEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StorageAutogrow(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/id_server.go new file mode 100644 index 000000000000..378e3ccace4b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/id_server.go @@ -0,0 +1,124 @@ +package servers + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = ServerId{} + +// ServerId is a struct representing the Resource ID for a Server +type ServerId struct { + SubscriptionId string + ResourceGroupName string + ServerName string +} + +// NewServerID returns a new ServerId struct +func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId { + return ServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + } +} + +// ParseServerID parses 'input' into a ServerId +func ParseServerID(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId +// note: this method should only be used for API response data and not user input +func ParseServerIDInsensitively(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateServerID checks that 'input' can be parsed as a Server ID +func ValidateServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Server ID +func (id ServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Server ID +func (id ServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + } +} + +// String returns a human-readable description of this Server ID +func (id ServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + } + return fmt.Sprintf("Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_create_autorest.go new file mode 100644 index 000000000000..e4d6bd5d7313 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_create_autorest.go @@ -0,0 +1,79 @@ +package servers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Create ... +func (c ServersClient) Create(ctx context.Context, id ServerId, input ServerForCreate) (result CreateOperationResponse, err error) { + req, err := c.preparerForCreate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "Create", nil, "Failure preparing request") + return + } + + result, err = c.senderForCreate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "Create", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c ServersClient) CreateThenPoll(ctx context.Context, id ServerId, input ServerForCreate) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} + +// preparerForCreate prepares the Create request. +func (c ServersClient) preparerForCreate(ctx context.Context, id ServerId, input ServerForCreate) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForCreate sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (c ServersClient) senderForCreate(ctx context.Context, req *http.Request) (future CreateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_delete_autorest.go new file mode 100644 index 000000000000..f4e5bea63be1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_delete_autorest.go @@ -0,0 +1,78 @@ +package servers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Delete ... +func (c ServersClient) Delete(ctx context.Context, id ServerId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = c.senderForDelete(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ServersClient) DeleteThenPoll(ctx context.Context, id ServerId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} + +// preparerForDelete prepares the Delete request. +func (c ServersClient) preparerForDelete(ctx context.Context, id ServerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForDelete sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (c ServersClient) senderForDelete(ctx context.Context, req *http.Request) (future DeleteOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_get_autorest.go new file mode 100644 index 000000000000..5c54dc25354a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_get_autorest.go @@ -0,0 +1,68 @@ +package servers + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *Server +} + +// Get ... +func (c ServersClient) Get(ctx context.Context, id ServerId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c ServersClient) preparerForGet(ctx context.Context, id ServerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c ServersClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_list_autorest.go new file mode 100644 index 000000000000..7d167a9a18c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_list_autorest.go @@ -0,0 +1,70 @@ +package servers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// 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 *ServerListResult +} + +// List ... +func (c ServersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForList prepares the List request. +func (c ServersClient) preparerForList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.DBforMariaDB/servers", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c ServersClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_listbyresourcegroup_autorest.go new file mode 100644 index 000000000000..28e8fc0a4dfe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_listbyresourcegroup_autorest.go @@ -0,0 +1,70 @@ +package servers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + Model *ServerListResult +} + +// ListByResourceGroup ... +func (c ServersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroup(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "ListByResourceGroup", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByResourceGroup(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "ListByResourceGroup", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListByResourceGroup prepares the ListByResourceGroup request. +func (c ServersClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.DBforMariaDB/servers", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByResourceGroup handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (c ServersClient) responderForListByResourceGroup(resp *http.Response) (result ListByResourceGroupOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_update_autorest.go new file mode 100644 index 000000000000..62f5524b57a9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/method_update_autorest.go @@ -0,0 +1,79 @@ +package servers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Update ... +func (c ServersClient) Update(ctx context.Context, id ServerId, input ServerUpdateParameters) (result UpdateOperationResponse, err error) { + req, err := c.preparerForUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "Update", nil, "Failure preparing request") + return + } + + result, err = c.senderForUpdate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "servers.ServersClient", "Update", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c ServersClient) UpdateThenPoll(ctx context.Context, id ServerId, input ServerUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} + +// preparerForUpdate prepares the Update request. +func (c ServersClient) preparerForUpdate(ctx context.Context, id ServerId, input ServerUpdateParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForUpdate sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (c ServersClient) senderForUpdate(ctx context.Context, req *http.Request) (future UpdateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_privateendpointproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_privateendpointproperty.go new file mode 100644 index 000000000000..6b1eab772d2d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_privateendpointproperty.go @@ -0,0 +1,8 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointProperty struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_server.go new file mode 100644 index 000000000000..547e413d481a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_server.go @@ -0,0 +1,14 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Server struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *ServerProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverforcreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverforcreate.go new file mode 100644 index 000000000000..fd8d204648e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverforcreate.go @@ -0,0 +1,44 @@ +package servers + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerForCreate struct { + Location string `json:"location"` + Properties ServerPropertiesForCreate `json:"properties"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +var _ json.Unmarshaler = &ServerForCreate{} + +func (s *ServerForCreate) UnmarshalJSON(bytes []byte) error { + type alias ServerForCreate + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ServerForCreate: %+v", err) + } + + s.Location = decoded.Location + s.Sku = decoded.Sku + s.Tags = decoded.Tags + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ServerForCreate into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalServerPropertiesForCreateImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'ServerForCreate': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverlistresult.go new file mode 100644 index 000000000000..ccf6bd242703 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverlistresult.go @@ -0,0 +1,8 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerListResult struct { + Value *[]Server `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivateendpointconnection.go new file mode 100644 index 000000000000..9979a7cec1df --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivateendpointconnection.go @@ -0,0 +1,9 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerPrivateEndpointConnection struct { + Id *string `json:"id,omitempty"` + Properties *ServerPrivateEndpointConnectionProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivateendpointconnectionproperties.go new file mode 100644 index 000000000000..c30676397ef4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivateendpointconnectionproperties.go @@ -0,0 +1,10 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerPrivateEndpointConnectionProperties struct { + PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState *ServerPrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` + ProvisioningState *PrivateEndpointProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivatelinkserviceconnectionstateproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivatelinkserviceconnectionstateproperty.go new file mode 100644 index 000000000000..05d887b1bc6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverprivatelinkserviceconnectionstateproperty.go @@ -0,0 +1,10 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerPrivateLinkServiceConnectionStateProperty struct { + ActionsRequired *PrivateLinkServiceConnectionStateActionsRequire `json:"actionsRequired,omitempty"` + Description string `json:"description"` + Status PrivateLinkServiceConnectionStateStatus `json:"status"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverproperties.go new file mode 100644 index 000000000000..a056ea8f16cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverproperties.go @@ -0,0 +1,38 @@ +package servers + +import ( + "time" + + "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 ServerProperties struct { + AdministratorLogin *string `json:"administratorLogin,omitempty"` + EarliestRestoreDate *string `json:"earliestRestoreDate,omitempty"` + FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` + MasterServerId *string `json:"masterServerId,omitempty"` + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + PrivateEndpointConnections *[]ServerPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + ReplicaCapacity *int64 `json:"replicaCapacity,omitempty"` + ReplicationRole *string `json:"replicationRole,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + UserVisibleState *ServerState `json:"userVisibleState,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +func (o *ServerProperties) GetEarliestRestoreDateAsTime() (*time.Time, error) { + if o.EarliestRestoreDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EarliestRestoreDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ServerProperties) SetEarliestRestoreDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EarliestRestoreDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforcreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforcreate.go new file mode 100644 index 000000000000..ef35f7ee261f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforcreate.go @@ -0,0 +1,72 @@ +package servers + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerPropertiesForCreate interface { +} + +func unmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPropertiesForCreate, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling ServerPropertiesForCreate into map[string]interface: %+v", err) + } + + value, ok := temp["createMode"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Default") { + var out ServerPropertiesForDefaultCreate + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServerPropertiesForDefaultCreate: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GeoRestore") { + var out ServerPropertiesForGeoRestore + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServerPropertiesForGeoRestore: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Replica") { + var out ServerPropertiesForReplica + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServerPropertiesForReplica: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PointInTimeRestore") { + var out ServerPropertiesForRestore + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServerPropertiesForRestore: %+v", err) + } + return out, nil + } + + type RawServerPropertiesForCreateImpl struct { + Type string `json:"-"` + Values map[string]interface{} `json:"-"` + } + out := RawServerPropertiesForCreateImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesfordefaultcreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesfordefaultcreate.go new file mode 100644 index 000000000000..8311c1ef672c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesfordefaultcreate.go @@ -0,0 +1,47 @@ +package servers + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ServerPropertiesForCreate = ServerPropertiesForDefaultCreate{} + +type ServerPropertiesForDefaultCreate struct { + AdministratorLogin string `json:"administratorLogin"` + AdministratorLoginPassword string `json:"administratorLoginPassword"` + + // Fields inherited from ServerPropertiesForCreate + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +var _ json.Marshaler = ServerPropertiesForDefaultCreate{} + +func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { + type wrapper ServerPropertiesForDefaultCreate + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServerPropertiesForDefaultCreate: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServerPropertiesForDefaultCreate: %+v", err) + } + decoded["createMode"] = "Default" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServerPropertiesForDefaultCreate: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforgeorestore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforgeorestore.go new file mode 100644 index 000000000000..b57ee038d2a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforgeorestore.go @@ -0,0 +1,46 @@ +package servers + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ServerPropertiesForCreate = ServerPropertiesForGeoRestore{} + +type ServerPropertiesForGeoRestore struct { + SourceServerId string `json:"sourceServerId"` + + // Fields inherited from ServerPropertiesForCreate + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +var _ json.Marshaler = ServerPropertiesForGeoRestore{} + +func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { + type wrapper ServerPropertiesForGeoRestore + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServerPropertiesForGeoRestore: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServerPropertiesForGeoRestore: %+v", err) + } + decoded["createMode"] = "GeoRestore" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServerPropertiesForGeoRestore: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforreplica.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforreplica.go new file mode 100644 index 000000000000..58b5f5a7929c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforreplica.go @@ -0,0 +1,46 @@ +package servers + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ServerPropertiesForCreate = ServerPropertiesForReplica{} + +type ServerPropertiesForReplica struct { + SourceServerId string `json:"sourceServerId"` + + // Fields inherited from ServerPropertiesForCreate + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +var _ json.Marshaler = ServerPropertiesForReplica{} + +func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { + type wrapper ServerPropertiesForReplica + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServerPropertiesForReplica: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServerPropertiesForReplica: %+v", err) + } + decoded["createMode"] = "Replica" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServerPropertiesForReplica: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforrestore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforrestore.go new file mode 100644 index 000000000000..c60b9f368029 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforrestore.go @@ -0,0 +1,47 @@ +package servers + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ServerPropertiesForCreate = ServerPropertiesForRestore{} + +type ServerPropertiesForRestore struct { + RestorePointInTime string `json:"restorePointInTime"` + SourceServerId string `json:"sourceServerId"` + + // Fields inherited from ServerPropertiesForCreate + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +var _ json.Marshaler = ServerPropertiesForRestore{} + +func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { + type wrapper ServerPropertiesForRestore + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServerPropertiesForRestore: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServerPropertiesForRestore: %+v", err) + } + decoded["createMode"] = "PointInTimeRestore" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServerPropertiesForRestore: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverupdateparameters.go new file mode 100644 index 000000000000..b7088edafbe2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverupdateparameters.go @@ -0,0 +1,10 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerUpdateParameters struct { + Properties *ServerUpdateParametersProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverupdateparametersproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverupdateparametersproperties.go new file mode 100644 index 000000000000..8557ea727527 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_serverupdateparametersproperties.go @@ -0,0 +1,14 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerUpdateParametersProperties struct { + AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + ReplicationRole *string `json:"replicationRole,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_sku.go new file mode 100644 index 000000000000..8bb23cf521d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_sku.go @@ -0,0 +1,12 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Capacity *int64 `json:"capacity,omitempty"` + Family *string `json:"family,omitempty"` + Name string `json:"name"` + Size *string `json:"size,omitempty"` + Tier *SkuTier `json:"tier,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_storageprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_storageprofile.go new file mode 100644 index 000000000000..ecb9b55edb0b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/model_storageprofile.go @@ -0,0 +1,11 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageProfile struct { + BackupRetentionDays *int64 `json:"backupRetentionDays,omitempty"` + GeoRedundantBackup *GeoRedundantBackup `json:"geoRedundantBackup,omitempty"` + StorageAutogrow *StorageAutogrow `json:"storageAutogrow,omitempty"` + StorageMB *int64 `json:"storageMB,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/version.go new file mode 100644 index 000000000000..2e8ea1568854 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/version.go @@ -0,0 +1,12 @@ +package servers + +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 = "2018-06-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md new file mode 100644 index 000000000000..9660b52a520f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules` Documentation + +The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-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/mariadb/2018-06-01/virtualnetworkrules" +``` + + +### Client Initialization + +```go +client := virtualnetworkrules.NewVirtualNetworkRulesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `VirtualNetworkRulesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := virtualnetworkrules.NewVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "virtualNetworkRuleValue") + +payload := virtualnetworkrules.VirtualNetworkRule{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualNetworkRulesClient.Delete` + +```go +ctx := context.TODO() +id := virtualnetworkrules.NewVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "virtualNetworkRuleValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualNetworkRulesClient.Get` + +```go +ctx := context.TODO() +id := virtualnetworkrules.NewVirtualNetworkRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "virtualNetworkRuleValue") + +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: `VirtualNetworkRulesClient.ListByServer` + +```go +ctx := context.TODO() +id := virtualnetworkrules.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue") + +// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go new file mode 100644 index 000000000000..c5bb4f331d33 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go @@ -0,0 +1,18 @@ +package virtualnetworkrules + +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 VirtualNetworkRulesClient struct { + Client autorest.Client + baseUri string +} + +func NewVirtualNetworkRulesClientWithBaseURI(endpoint string) VirtualNetworkRulesClient { + return VirtualNetworkRulesClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/constants.go new file mode 100644 index 000000000000..686ce6f868d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/constants.go @@ -0,0 +1,43 @@ +package virtualnetworkrules + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualNetworkRuleState string + +const ( + VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" + VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" + VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" + VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" + VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" +) + +func PossibleValuesForVirtualNetworkRuleState() []string { + return []string{ + string(VirtualNetworkRuleStateDeleting), + string(VirtualNetworkRuleStateInProgress), + string(VirtualNetworkRuleStateInitializing), + string(VirtualNetworkRuleStateReady), + string(VirtualNetworkRuleStateUnknown), + } +} + +func parseVirtualNetworkRuleState(input string) (*VirtualNetworkRuleState, error) { + vals := map[string]VirtualNetworkRuleState{ + "deleting": VirtualNetworkRuleStateDeleting, + "inprogress": VirtualNetworkRuleStateInProgress, + "initializing": VirtualNetworkRuleStateInitializing, + "ready": VirtualNetworkRuleStateReady, + "unknown": VirtualNetworkRuleStateUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VirtualNetworkRuleState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go new file mode 100644 index 000000000000..6fafcfc6fba1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go @@ -0,0 +1,124 @@ +package virtualnetworkrules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = ServerId{} + +// ServerId is a struct representing the Resource ID for a Server +type ServerId struct { + SubscriptionId string + ResourceGroupName string + ServerName string +} + +// NewServerID returns a new ServerId struct +func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId { + return ServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + } +} + +// ParseServerID parses 'input' into a ServerId +func ParseServerID(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseServerIDInsensitively parses 'input' case-insensitively into a ServerId +// note: this method should only be used for API response data and not user input +func ParseServerIDInsensitively(input string) (*ServerId, error) { + parser := resourceids.NewParserFromResourceIdType(ServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ServerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateServerID checks that 'input' can be parsed as a Server ID +func ValidateServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Server ID +func (id ServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Server ID +func (id ServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + } +} + +// String returns a human-readable description of this Server ID +func (id ServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + } + return fmt.Sprintf("Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go new file mode 100644 index 000000000000..9a5d5dba67e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go @@ -0,0 +1,137 @@ +package virtualnetworkrules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = VirtualNetworkRuleId{} + +// VirtualNetworkRuleId is a struct representing the Resource ID for a Virtual Network Rule +type VirtualNetworkRuleId struct { + SubscriptionId string + ResourceGroupName string + ServerName string + VirtualNetworkRuleName string +} + +// NewVirtualNetworkRuleID returns a new VirtualNetworkRuleId struct +func NewVirtualNetworkRuleID(subscriptionId string, resourceGroupName string, serverName string, virtualNetworkRuleName string) VirtualNetworkRuleId { + return VirtualNetworkRuleId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ServerName: serverName, + VirtualNetworkRuleName: virtualNetworkRuleName, + } +} + +// ParseVirtualNetworkRuleID parses 'input' into a VirtualNetworkRuleId +func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(VirtualNetworkRuleId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := VirtualNetworkRuleId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + if id.VirtualNetworkRuleName, ok = parsed.Parsed["virtualNetworkRuleName"]; !ok { + return nil, fmt.Errorf("the segment 'virtualNetworkRuleName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseVirtualNetworkRuleIDInsensitively parses 'input' case-insensitively into a VirtualNetworkRuleId +// note: this method should only be used for API response data and not user input +func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(VirtualNetworkRuleId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := VirtualNetworkRuleId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { + return nil, fmt.Errorf("the segment 'serverName' was not found in the resource id %q", input) + } + + if id.VirtualNetworkRuleName, ok = parsed.Parsed["virtualNetworkRuleName"]; !ok { + return nil, fmt.Errorf("the segment 'virtualNetworkRuleName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateVirtualNetworkRuleID checks that 'input' can be parsed as a Virtual Network Rule ID +func ValidateVirtualNetworkRuleID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseVirtualNetworkRuleID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Virtual Network Rule ID +func (id VirtualNetworkRuleId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMariaDB/servers/%s/virtualNetworkRules/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServerName, id.VirtualNetworkRuleName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Virtual Network Rule ID +func (id VirtualNetworkRuleId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMariaDB", "Microsoft.DBforMariaDB", "Microsoft.DBforMariaDB"), + resourceids.StaticSegment("staticServers", "servers", "servers"), + resourceids.UserSpecifiedSegment("serverName", "serverValue"), + resourceids.StaticSegment("staticVirtualNetworkRules", "virtualNetworkRules", "virtualNetworkRules"), + resourceids.UserSpecifiedSegment("virtualNetworkRuleName", "virtualNetworkRuleValue"), + } +} + +// String returns a human-readable description of this Virtual Network Rule ID +func (id VirtualNetworkRuleId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Server Name: %q", id.ServerName), + fmt.Sprintf("Virtual Network Rule Name: %q", id.VirtualNetworkRuleName), + } + return fmt.Sprintf("Virtual Network Rule (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_createorupdate_autorest.go new file mode 100644 index 000000000000..1246bc0f90f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_createorupdate_autorest.go @@ -0,0 +1,79 @@ +package virtualnetworkrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// CreateOrUpdate ... +func (c VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, id VirtualNetworkRuleId, input VirtualNetworkRule) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = c.senderForCreateOrUpdate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c VirtualNetworkRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkRuleId, input VirtualNetworkRule) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c VirtualNetworkRulesClient) preparerForCreateOrUpdate(ctx context.Context, id VirtualNetworkRuleId, input VirtualNetworkRule) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForCreateOrUpdate sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (c VirtualNetworkRulesClient) senderForCreateOrUpdate(ctx context.Context, req *http.Request) (future CreateOrUpdateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_delete_autorest.go new file mode 100644 index 000000000000..631aa2a88565 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_delete_autorest.go @@ -0,0 +1,78 @@ +package virtualnetworkrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Delete ... +func (c VirtualNetworkRulesClient) Delete(ctx context.Context, id VirtualNetworkRuleId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = c.senderForDelete(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c VirtualNetworkRulesClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkRuleId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} + +// preparerForDelete prepares the Delete request. +func (c VirtualNetworkRulesClient) preparerForDelete(ctx context.Context, id VirtualNetworkRuleId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForDelete sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (c VirtualNetworkRulesClient) senderForDelete(ctx context.Context, req *http.Request) (future DeleteOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get_autorest.go new file mode 100644 index 000000000000..f105c5887a74 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get_autorest.go @@ -0,0 +1,68 @@ +package virtualnetworkrules + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *VirtualNetworkRule +} + +// Get ... +func (c VirtualNetworkRulesClient) Get(ctx context.Context, id VirtualNetworkRuleId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c VirtualNetworkRulesClient) preparerForGet(ctx context.Context, id VirtualNetworkRuleId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c VirtualNetworkRulesClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_listbyserver_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_listbyserver_autorest.go new file mode 100644 index 000000000000..73136508fcb4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_listbyserver_autorest.go @@ -0,0 +1,186 @@ +package virtualnetworkrules + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByServerOperationResponse struct { + HttpResponse *http.Response + Model *[]VirtualNetworkRule + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListByServerOperationResponse, error) +} + +type ListByServerCompleteResult struct { + Items []VirtualNetworkRule +} + +func (r ListByServerOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListByServerOperationResponse) LoadMore(ctx context.Context) (resp ListByServerOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// ListByServer ... +func (c VirtualNetworkRulesClient) ListByServer(ctx context.Context, id ServerId) (resp ListByServerOperationResponse, err error) { + req, err := c.preparerForListByServer(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "ListByServer", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListByServer(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "ListByServer", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListByServer prepares the ListByServer request. +func (c VirtualNetworkRulesClient) preparerForListByServer(ctx context.Context, id ServerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/virtualNetworkRules", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListByServerWithNextLink prepares the ListByServer request with the given nextLink token. +func (c VirtualNetworkRulesClient) preparerForListByServerWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByServer handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (c VirtualNetworkRulesClient) responderForListByServer(resp *http.Response) (result ListByServerOperationResponse, err error) { + type page struct { + Values []VirtualNetworkRule `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListByServerOperationResponse, err error) { + req, err := c.preparerForListByServerWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "ListByServer", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "ListByServer", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByServer(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "virtualnetworkrules.VirtualNetworkRulesClient", "ListByServer", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListByServerComplete retrieves all of the results into a single object +func (c VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, id ServerId) (ListByServerCompleteResult, error) { + return c.ListByServerCompleteMatchingPredicate(ctx, id, VirtualNetworkRuleOperationPredicate{}) +} + +// ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c VirtualNetworkRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate VirtualNetworkRuleOperationPredicate) (resp ListByServerCompleteResult, err error) { + items := make([]VirtualNetworkRule, 0) + + page, err := c.ListByServer(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByServerCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkrule.go new file mode 100644 index 000000000000..16850c4e56f2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkrule.go @@ -0,0 +1,11 @@ +package virtualnetworkrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualNetworkRule struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *VirtualNetworkRuleProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkruleproperties.go new file mode 100644 index 000000000000..40e8ec8d2417 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/model_virtualnetworkruleproperties.go @@ -0,0 +1,10 @@ +package virtualnetworkrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualNetworkRuleProperties struct { + IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` + State *VirtualNetworkRuleState `json:"state,omitempty"` + VirtualNetworkSubnetId string `json:"virtualNetworkSubnetId"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/predicates.go new file mode 100644 index 000000000000..ef565fb31031 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/predicates.go @@ -0,0 +1,24 @@ +package virtualnetworkrules + +type VirtualNetworkRuleOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p VirtualNetworkRuleOperationPredicate) Matches(input VirtualNetworkRule) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go new file mode 100644 index 000000000000..0e53377c7b58 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go @@ -0,0 +1,12 @@ +package virtualnetworkrules + +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 = "2018-06-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index acd4583f2050..09e742f23a67 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -36,7 +36,6 @@ github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic github.com/Azure/azure-sdk-for-go/services/logz/mgmt/2020-10-01/logz github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2021-07-01/machinelearningservices github.com/Azure/azure-sdk-for-go/services/maintenance/mgmt/2021-05-01/maintenance -github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb github.com/Azure/azure-sdk-for-go/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering github.com/Azure/azure-sdk-for-go/services/mediaservices/mgmt/2021-05-01/media github.com/Azure/azure-sdk-for-go/services/monitor/mgmt/2020-10-01/insights @@ -240,6 +239,11 @@ github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/re github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators +github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations +github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases +github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules +github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers +github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/capacitypools github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2021-10-01/netappaccounts From fc8ea921a04ad9e803d657d0c0290445989406a8 Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Fri, 12 Aug 2022 20:10:14 +0300 Subject: [PATCH 096/100] Add data sources for every type of public DNS record (#17477) * Add data sources for every type of public DNS record * Fix tests * Fix Azure tests * Update docs as per review * Update timeouts url --- .../services/dns/dns_a_record_data_source.go | 104 +++++++++++++++ .../dns/dns_a_record_data_source_test.go | 44 ++++++ .../dns/dns_aaaa_record_data_source.go | 105 +++++++++++++++ .../dns/dns_aaaa_record_data_source_test.go | 44 ++++++ .../dns/dns_caa_record_data_source.go | 110 +++++++++++++++ .../dns/dns_caa_record_data_source_test.go | 43 ++++++ .../dns/dns_cname_record_data_source.go | 106 +++++++++++++++ .../dns/dns_cname_record_data_source_test.go | 43 ++++++ .../services/dns/dns_mx_record_data_source.go | 106 +++++++++++++++ .../dns/dns_mx_record_data_source_test.go | 43 ++++++ .../services/dns/dns_ns_record_data_source.go | 94 +++++++++++++ .../dns/dns_ns_record_data_source_test.go | 43 ++++++ .../dns/dns_ptr_record_data_source.go | 93 +++++++++++++ .../dns/dns_ptr_record_data_source_test.go | 43 ++++++ .../dns/dns_soa_record_data_source.go | 126 ++++++++++++++++++ .../dns/dns_soa_record_data_source_test.go | 72 ++++++++++ .../dns/dns_srv_record_data_source.go | 115 ++++++++++++++++ .../dns/dns_srv_record_data_source_test.go | 43 ++++++ .../dns/dns_txt_record_data_source.go | 99 ++++++++++++++ .../dns/dns_txt_record_data_source_test.go | 43 ++++++ internal/services/dns/parse/soa_record.go | 75 +++++++++++ internal/services/dns/registration.go | 12 +- website/docs/d/dns_a_record.html.markdown | 55 ++++++++ website/docs/d/dns_aaaa_record.html.markdown | 55 ++++++++ website/docs/d/dns_caa_record.html.markdown | 63 +++++++++ website/docs/d/dns_cname_record.html.markdown | 55 ++++++++ website/docs/d/dns_mx_record.html.markdown | 61 +++++++++ website/docs/d/dns_ns_record.html.markdown | 53 ++++++++ website/docs/d/dns_ptr_record.html.markdown | 53 ++++++++ website/docs/d/dns_soa_record.html.markdown | 64 +++++++++ website/docs/d/dns_srv_record.html.markdown | 65 +++++++++ website/docs/d/dns_txt_record.html.markdown | 59 ++++++++ website/docs/d/dns_zone.html.markdown | 6 +- website/docs/r/dns_a_record.html.markdown | 8 +- website/docs/r/dns_aaaa_record.html.markdown | 10 +- website/docs/r/dns_caa_record.html.markdown | 11 +- website/docs/r/dns_cname_record.html.markdown | 18 +-- website/docs/r/dns_mx_record.html.markdown | 9 +- website/docs/r/dns_ns_record.html.markdown | 9 +- website/docs/r/dns_ptr_record.html.markdown | 6 +- website/docs/r/dns_srv_record.html.markdown | 10 +- website/docs/r/dns_txt_record.html.markdown | 9 +- website/docs/r/dns_zone.html.markdown | 9 +- 43 files changed, 2260 insertions(+), 34 deletions(-) create mode 100644 internal/services/dns/dns_a_record_data_source.go create mode 100644 internal/services/dns/dns_a_record_data_source_test.go create mode 100644 internal/services/dns/dns_aaaa_record_data_source.go create mode 100644 internal/services/dns/dns_aaaa_record_data_source_test.go create mode 100644 internal/services/dns/dns_caa_record_data_source.go create mode 100644 internal/services/dns/dns_caa_record_data_source_test.go create mode 100644 internal/services/dns/dns_cname_record_data_source.go create mode 100644 internal/services/dns/dns_cname_record_data_source_test.go create mode 100644 internal/services/dns/dns_mx_record_data_source.go create mode 100644 internal/services/dns/dns_mx_record_data_source_test.go create mode 100644 internal/services/dns/dns_ns_record_data_source.go create mode 100644 internal/services/dns/dns_ns_record_data_source_test.go create mode 100644 internal/services/dns/dns_ptr_record_data_source.go create mode 100644 internal/services/dns/dns_ptr_record_data_source_test.go create mode 100644 internal/services/dns/dns_soa_record_data_source.go create mode 100644 internal/services/dns/dns_soa_record_data_source_test.go create mode 100644 internal/services/dns/dns_srv_record_data_source.go create mode 100644 internal/services/dns/dns_srv_record_data_source_test.go create mode 100644 internal/services/dns/dns_txt_record_data_source.go create mode 100644 internal/services/dns/dns_txt_record_data_source_test.go create mode 100644 internal/services/dns/parse/soa_record.go create mode 100644 website/docs/d/dns_a_record.html.markdown create mode 100644 website/docs/d/dns_aaaa_record.html.markdown create mode 100644 website/docs/d/dns_caa_record.html.markdown create mode 100644 website/docs/d/dns_cname_record.html.markdown create mode 100644 website/docs/d/dns_mx_record.html.markdown create mode 100644 website/docs/d/dns_ns_record.html.markdown create mode 100644 website/docs/d/dns_ptr_record.html.markdown create mode 100644 website/docs/d/dns_soa_record.html.markdown create mode 100644 website/docs/d/dns_srv_record.html.markdown create mode 100644 website/docs/d/dns_txt_record.html.markdown diff --git a/internal/services/dns/dns_a_record_data_source.go b/internal/services/dns/dns_a_record_data_source.go new file mode 100644 index 000000000000..e28f79570eaf --- /dev/null +++ b/internal/services/dns/dns_a_record_data_source.go @@ -0,0 +1,104 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsARecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsARecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "records": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Schema{Type: pluginsdk.TypeString}, + Set: pluginsdk.HashString, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "target_resource_id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsARecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, name, dns.A) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS A record %s: (zone %s) was not found", name, zoneName) + } + return fmt.Errorf("reading DNS A record %s (zone %s): %+v", name, zoneName, err) + } + + resourceId := parse.NewARecordID(subscriptionId, resourceGroup, zoneName, name) + d.SetId(resourceId.ID()) + + d.Set("name", name) + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if err := d.Set("records", flattenAzureRmDnsARecords(resp.ARecords)); err != nil { + return fmt.Errorf("setting `records`: %+v", err) + } + + targetResourceId := "" + if resp.TargetResource != nil && resp.TargetResource.ID != nil { + targetResourceId = *resp.TargetResource.ID + } + d.Set("target_resource_id", targetResourceId) + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_a_record_data_source_test.go b/internal/services/dns/dns_a_record_data_source_test.go new file mode 100644 index 000000000000..26f2d0631c37 --- /dev/null +++ b/internal/services/dns/dns_a_record_data_source_test.go @@ -0,0 +1,44 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type TestAccDnsARecordDataSource struct{} + +func TestAccDataSourceDnsARecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_a_record", "test") + r := TestAccDnsARecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("records.#").HasValue("2"), + check.That(data.ResourceName).Key("ttl").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + check.That(data.ResourceName).Key("target_resource_id").HasValue(""), + ), + }, + }) +} + +func (TestAccDnsARecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_dns_a_record" "test" { + name = azurerm_dns_a_record.test.name + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, TestAccDnsARecordResource{}.basic(data)) +} diff --git a/internal/services/dns/dns_aaaa_record_data_source.go b/internal/services/dns/dns_aaaa_record_data_source.go new file mode 100644 index 000000000000..cec8d0957089 --- /dev/null +++ b/internal/services/dns/dns_aaaa_record_data_source.go @@ -0,0 +1,105 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/set" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsAAAARecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsAAAARecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "records": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Schema{Type: pluginsdk.TypeString}, + Set: set.HashIPv6Address, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "target_resource_id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsAAAARecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, name, dns.AAAA) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS AAAA record %s: (zone %s) was not found", name, zoneName) + } + return fmt.Errorf("reading DNS AAAA record %s (zone %s): %+v", name, zoneName, err) + } + + resourceId := parse.NewAaaaRecordID(subscriptionId, resourceGroup, zoneName, name) + d.SetId(resourceId.ID()) + + d.Set("name", name) + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if err := d.Set("records", flattenAzureRmDnsAaaaRecords(resp.AaaaRecords)); err != nil { + return fmt.Errorf("setting `records`: %+v", err) + } + + targetResourceId := "" + if resp.TargetResource != nil && resp.TargetResource.ID != nil { + targetResourceId = *resp.TargetResource.ID + } + d.Set("target_resource_id", targetResourceId) + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_aaaa_record_data_source_test.go b/internal/services/dns/dns_aaaa_record_data_source_test.go new file mode 100644 index 000000000000..5707601fe17f --- /dev/null +++ b/internal/services/dns/dns_aaaa_record_data_source_test.go @@ -0,0 +1,44 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type DnsAAAARecordDataSource struct{} + +func TestAccDataSourceDnsAAAARecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_aaaa_record", "test") + r := DnsAAAARecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("records.#").HasValue("2"), + check.That(data.ResourceName).Key("ttl").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + check.That(data.ResourceName).Key("target_resource_id").HasValue(""), + ), + }, + }) +} + +func (DnsAAAARecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_dns_aaaa_record" "test" { + name = azurerm_dns_aaaa_record.test.name + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, DnsAAAARecordResource{}.basic(data)) +} diff --git a/internal/services/dns/dns_caa_record_data_source.go b/internal/services/dns/dns_caa_record_data_source.go new file mode 100644 index 000000000000..760e2fb4fb9c --- /dev/null +++ b/internal/services/dns/dns_caa_record_data_source.go @@ -0,0 +1,110 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsCaaRecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsCaaRecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "record": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "flags": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "tag": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "value": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + Set: resourceDnsCaaRecordHash, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsCaaRecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, name, dns.CAA) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS CAA record %s: (zone %s) was not found", name, zoneName) + } + return fmt.Errorf("reading DNS CAA record %s (zone %s): %+v", name, zoneName, err) + } + + resourceId := parse.NewCaaRecordID(subscriptionId, resourceGroup, zoneName, name) + d.SetId(resourceId.ID()) + + d.Set("name", name) + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if err := d.Set("record", flattenAzureRmDnsCaaRecords(resp.CaaRecords)); err != nil { + return err + } + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_caa_record_data_source_test.go b/internal/services/dns/dns_caa_record_data_source_test.go new file mode 100644 index 000000000000..4d1574cf9961 --- /dev/null +++ b/internal/services/dns/dns_caa_record_data_source_test.go @@ -0,0 +1,43 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type DnsCaaRecordDataSource struct{} + +func TestAccDataSourceDnsCaaRecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_caa_record", "test") + r := DnsCaaRecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("record.#").HasValue("4"), + check.That(data.ResourceName).Key("ttl").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + ), + }, + }) +} + +func (DnsCaaRecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_dns_caa_record" "test" { + name = azurerm_dns_caa_record.test.name + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, DnsCaaRecordResource{}.basic(data)) +} diff --git a/internal/services/dns/dns_cname_record_data_source.go b/internal/services/dns/dns_cname_record_data_source.go new file mode 100644 index 000000000000..c0c82681857a --- /dev/null +++ b/internal/services/dns/dns_cname_record_data_source.go @@ -0,0 +1,106 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsCNameRecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsCNameRecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "record": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "target_resource_id": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsCNameRecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, name, dns.CNAME) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS CNAME record %s: (zone %s) was not found", name, zoneName) + } + return fmt.Errorf("reading DNS CNAME record %s (zone %s): %+v", name, zoneName, err) + } + + resourceId := parse.NewCnameRecordID(subscriptionId, resourceGroup, zoneName, name) + d.SetId(resourceId.ID()) + + d.Set("name", name) + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if props := resp.RecordSetProperties; props != nil { + cname := "" + if props.CnameRecord != nil && props.CnameRecord.Cname != nil { + cname = *props.CnameRecord.Cname + } + d.Set("record", cname) + + targetResourceId := "" + if props.TargetResource != nil && props.TargetResource.ID != nil { + targetResourceId = *props.TargetResource.ID + } + d.Set("target_resource_id", targetResourceId) + } + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_cname_record_data_source_test.go b/internal/services/dns/dns_cname_record_data_source_test.go new file mode 100644 index 000000000000..aba24f4ed012 --- /dev/null +++ b/internal/services/dns/dns_cname_record_data_source_test.go @@ -0,0 +1,43 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type DnsCNameRecordDataSource struct{} + +func TestAccDataSourceDnsCNameRecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_cname_record", "test") + r := DnsCNameRecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("record").HasValue("contoso.com"), + check.That(data.ResourceName).Key("ttl").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + ), + }, + }) +} + +func (DnsCNameRecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_dns_cname_record" "test" { + name = azurerm_dns_cname_record.test.name + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, DnsCNameRecordResource{}.basic(data)) +} diff --git a/internal/services/dns/dns_mx_record_data_source.go b/internal/services/dns/dns_mx_record_data_source.go new file mode 100644 index 000000000000..d94bff0ecef2 --- /dev/null +++ b/internal/services/dns/dns_mx_record_data_source.go @@ -0,0 +1,106 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsMxRecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsMxRecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Optional: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "record": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "preference": { + // TODO: this should become an Int + Type: pluginsdk.TypeString, + Computed: true, + }, + + "exchange": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + Set: resourceDnsMxRecordHash, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsMxRecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, name, dns.MX) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS MX record %s: (zone %s) was not found", name, zoneName) + } + return fmt.Errorf("reading DNS MX record %s (zone %s): %+v", name, zoneName, err) + } + + resourceId := parse.NewMxRecordID(subscriptionId, resourceGroup, zoneName, name) + d.SetId(resourceId.ID()) + + d.Set("name", name) + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if err := d.Set("record", flattenAzureRmDnsMxRecords(resp.MxRecords)); err != nil { + return err + } + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_mx_record_data_source_test.go b/internal/services/dns/dns_mx_record_data_source_test.go new file mode 100644 index 000000000000..d9e2747a3cc5 --- /dev/null +++ b/internal/services/dns/dns_mx_record_data_source_test.go @@ -0,0 +1,43 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type DnsMxRecordDataSource struct{} + +func TestAccDataSourceDnsMxRecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_mx_record", "test") + r := DnsMxRecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("record.#").HasValue("2"), + check.That(data.ResourceName).Key("ttl").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + ), + }, + }) +} + +func (DnsMxRecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_dns_mx_record" "test" { + name = azurerm_dns_mx_record.test.name + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, DnsMxRecordResource{}.basic(data)) +} diff --git a/internal/services/dns/dns_ns_record_data_source.go b/internal/services/dns/dns_ns_record_data_source.go new file mode 100644 index 000000000000..32021e082d36 --- /dev/null +++ b/internal/services/dns/dns_ns_record_data_source.go @@ -0,0 +1,94 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsNsRecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsNsRecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "records": { + Type: pluginsdk.TypeList, + Computed: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsNsRecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, name, dns.NS) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS NS record %s: (zone %s) was not found", name, zoneName) + } + return fmt.Errorf("reading DNS NS record %s (zone %s): %+v", name, zoneName, err) + } + + resourceId := parse.NewNsRecordID(subscriptionId, resourceGroup, zoneName, name) + d.SetId(resourceId.ID()) + + d.Set("name", name) + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if err := d.Set("records", flattenAzureRmDnsNsRecords(resp.NsRecords)); err != nil { + return fmt.Errorf("settings `records`: %+v", err) + } + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_ns_record_data_source_test.go b/internal/services/dns/dns_ns_record_data_source_test.go new file mode 100644 index 000000000000..2c19ae637224 --- /dev/null +++ b/internal/services/dns/dns_ns_record_data_source_test.go @@ -0,0 +1,43 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type DnsNsRecordDataSource struct{} + +func TestAccDataSourceDnsNsRecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_ns_record", "test") + r := DnsNsRecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("records.#").HasValue("2"), + check.That(data.ResourceName).Key("ttl").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + ), + }, + }) +} + +func (DnsNsRecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_dns_ns_record" "test" { + name = azurerm_dns_ns_record.test.name + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, DnsNsRecordResource{}.basic(data)) +} diff --git a/internal/services/dns/dns_ptr_record_data_source.go b/internal/services/dns/dns_ptr_record_data_source.go new file mode 100644 index 000000000000..0fb1a5183de8 --- /dev/null +++ b/internal/services/dns/dns_ptr_record_data_source.go @@ -0,0 +1,93 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsPtrRecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsPtrRecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "records": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Schema{Type: pluginsdk.TypeString}, + Set: pluginsdk.HashString, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsPtrRecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, name, dns.PTR) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS PTR record %s: (zone %s) was not found", name, zoneName) + } + return fmt.Errorf("reading DNS PTR record %s (zone %s): %+v", name, zoneName, err) + } + + resourceId := parse.NewPtrRecordID(subscriptionId, resourceGroup, zoneName, name) + d.SetId(resourceId.ID()) + + d.Set("name", name) + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if err := d.Set("records", flattenAzureRmDnsPtrRecords(resp.PtrRecords)); err != nil { + return err + } + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_ptr_record_data_source_test.go b/internal/services/dns/dns_ptr_record_data_source_test.go new file mode 100644 index 000000000000..289069ad6dac --- /dev/null +++ b/internal/services/dns/dns_ptr_record_data_source_test.go @@ -0,0 +1,43 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type DnsPtrRecordDataSource struct{} + +func TestAccDataSourceDnsPtrRecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_ptr_record", "test") + r := DnsPtrRecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("records.#").HasValue("2"), + check.That(data.ResourceName).Key("ttl").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + ), + }, + }) +} + +func (DnsPtrRecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_dns_ptr_record" "test" { + name = azurerm_dns_ptr_record.test.name + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, DnsPtrRecordResource{}.basic(data)) +} diff --git a/internal/services/dns/dns_soa_record_data_source.go b/internal/services/dns/dns_soa_record_data_source.go new file mode 100644 index 000000000000..8e2c37e2552e --- /dev/null +++ b/internal/services/dns/dns_soa_record_data_source.go @@ -0,0 +1,126 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsSoaRecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsSoaRecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Optional: true, + Default: "@", + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "email": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "host_name": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "expire_time": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "minimum_ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "refresh_time": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "retry_time": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "serial_number": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsSoaRecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, "@", dns.SOA) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS SOA record (zone %s) was not found", zoneName) + } + return fmt.Errorf("reading DNS SOA record (zone %s): %+v", zoneName, err) + } + + resourceId := parse.NewSoaRecordID(subscriptionId, resourceGroup, zoneName, "@") + d.SetId(resourceId.ID()) + + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if soaRecord := resp.SoaRecord; soaRecord != nil { + d.Set("email", soaRecord.Email) + d.Set("host_name", soaRecord.Host) + d.Set("expire_time", soaRecord.ExpireTime) + d.Set("minimum_ttl", soaRecord.MinimumTTL) + d.Set("refresh_time", soaRecord.RefreshTime) + d.Set("retry_time", soaRecord.RetryTime) + d.Set("serial_number", soaRecord.SerialNumber) + } + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_soa_record_data_source_test.go b/internal/services/dns/dns_soa_record_data_source_test.go new file mode 100644 index 000000000000..21272538a98d --- /dev/null +++ b/internal/services/dns/dns_soa_record_data_source_test.go @@ -0,0 +1,72 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type DnsSoaRecordDataSource struct{} + +func TestAccDataSourceDnsSoaRecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_soa_record", "test") + r := DnsSoaRecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basicWithDataSource(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("name").HasValue("@"), + check.That(data.ResourceName).Key("email").HasValue("testemail.com"), + check.That(data.ResourceName).Key("host_name").HasValue("testhost.contoso.com"), + check.That(data.ResourceName).Key("expire_time").HasValue("2419200"), + check.That(data.ResourceName).Key("minimum_ttl").HasValue("300"), + check.That(data.ResourceName).Key("refresh_time").HasValue("3600"), + check.That(data.ResourceName).Key("retry_time").HasValue("300"), + check.That(data.ResourceName).Key("serial_number").HasValue("1"), + check.That(data.ResourceName).Key("ttl").HasValue("3600"), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + ), + }, + }) +} + +func (DnsSoaRecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_dns_zone" "test" { + name = "acctestzone%d.com" + resource_group_name = azurerm_resource_group.test.name + + soa_record { + email = "testemail.com" + host_name = "testhost.contoso.com" + } +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) +} + +func (d DnsSoaRecordDataSource) basicWithDataSource(data acceptance.TestData) string { + config := d.basic(data) + return fmt.Sprintf(` +%s + +data "azurerm_dns_soa_record" "test" { + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, config) +} diff --git a/internal/services/dns/dns_srv_record_data_source.go b/internal/services/dns/dns_srv_record_data_source.go new file mode 100644 index 000000000000..2b990f8c7b0c --- /dev/null +++ b/internal/services/dns/dns_srv_record_data_source.go @@ -0,0 +1,115 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsSrvRecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsSrvRecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "record": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "priority": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "weight": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "port": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "target": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + Set: resourceDnsSrvRecordHash, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsSrvRecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, name, dns.SRV) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS SRV record %s: (zone %s) was not found", name, zoneName) + } + return fmt.Errorf("reading DNS SRV record %s (zone %s): %+v", name, zoneName, err) + } + + resourceId := parse.NewSrvRecordID(subscriptionId, resourceGroup, zoneName, name) + d.SetId(resourceId.ID()) + + d.Set("name", name) + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if err := d.Set("record", flattenAzureRmDnsSrvRecords(resp.SrvRecords)); err != nil { + return err + } + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_srv_record_data_source_test.go b/internal/services/dns/dns_srv_record_data_source_test.go new file mode 100644 index 000000000000..0383638279b9 --- /dev/null +++ b/internal/services/dns/dns_srv_record_data_source_test.go @@ -0,0 +1,43 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type DnsSrvRecordDataSource struct{} + +func TestAccDataSourceDnsSrvRecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_srv_record", "test") + r := DnsSrvRecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("record.#").HasValue("2"), + check.That(data.ResourceName).Key("ttl").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + ), + }, + }) +} + +func (DnsSrvRecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_dns_srv_record" "test" { + name = azurerm_dns_srv_record.test.name + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, DnsSrvRecordResource{}.basic(data)) +} diff --git a/internal/services/dns/dns_txt_record_data_source.go b/internal/services/dns/dns_txt_record_data_source.go new file mode 100644 index 000000000000..11bb141a27e4 --- /dev/null +++ b/internal/services/dns/dns_txt_record_data_source.go @@ -0,0 +1,99 @@ +package dns + +import ( + "fmt" + "time" + + "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tags" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +func dataSourceDnsTxtRecord() *pluginsdk.Resource { + return &pluginsdk.Resource{ + Read: dataSourceDnsTxtRecordRead, + + Timeouts: &pluginsdk.ResourceTimeout{ + Read: pluginsdk.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "resource_group_name": commonschema.ResourceGroupNameForDataSource(), + + "zone_name": { + Type: pluginsdk.TypeString, + Required: true, + }, + + "record": { + Type: pluginsdk.TypeSet, + Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "value": { + Type: pluginsdk.TypeString, + Computed: true, + }, + }, + }, + }, + + "ttl": { + Type: pluginsdk.TypeInt, + Computed: true, + }, + + "fqdn": { + Type: pluginsdk.TypeString, + Computed: true, + }, + + "tags": tags.Schema(), + }, + } +} + +func dataSourceDnsTxtRecordRead(d *pluginsdk.ResourceData, meta interface{}) error { + recordSetsClient := meta.(*clients.Client).Dns.RecordSetsClient + ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) + defer cancel() + subscriptionId := meta.(*clients.Client).Account.SubscriptionId + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + zoneName := d.Get("zone_name").(string) + + resp, err := recordSetsClient.Get(ctx, resourceGroup, zoneName, name, dns.TXT) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Error: DNS TXT record %s: (zone %s) was not found", name, zoneName) + } + return fmt.Errorf("reading DNS TXT record %s (zone %s): %+v", name, zoneName, err) + } + + resourceId := parse.NewTxtRecordID(subscriptionId, resourceGroup, zoneName, name) + d.SetId(resourceId.ID()) + + d.Set("name", name) + d.Set("resource_group_name", resourceGroup) + d.Set("zone_name", zoneName) + + d.Set("ttl", resp.TTL) + d.Set("fqdn", resp.Fqdn) + + if err := d.Set("record", flattenAzureRmDnsTxtRecords(resp.TxtRecords)); err != nil { + return err + } + + return tags.FlattenAndSet(d, resp.Metadata) +} diff --git a/internal/services/dns/dns_txt_record_data_source_test.go b/internal/services/dns/dns_txt_record_data_source_test.go new file mode 100644 index 000000000000..34937ee4f2ab --- /dev/null +++ b/internal/services/dns/dns_txt_record_data_source_test.go @@ -0,0 +1,43 @@ +package dns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" +) + +type DnsTxtRecordDataSource struct{} + +func TestAccDataSourceDnsTxtRecord_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "data.azurerm_dns_txt_record", "test") + r := DnsTxtRecordDataSource{} + + data.DataSourceTest(t, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).Key("name").Exists(), + check.That(data.ResourceName).Key("resource_group_name").Exists(), + check.That(data.ResourceName).Key("zone_name").Exists(), + check.That(data.ResourceName).Key("record.#").HasValue("2"), + check.That(data.ResourceName).Key("ttl").Exists(), + check.That(data.ResourceName).Key("fqdn").Exists(), + check.That(data.ResourceName).Key("tags.%").HasValue("0"), + ), + }, + }) +} + +func (DnsTxtRecordDataSource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +data "azurerm_dns_txt_record" "test" { + name = azurerm_dns_txt_record.test.name + resource_group_name = azurerm_resource_group.test.name + zone_name = azurerm_dns_zone.test.name +} +`, DnsTxtRecordResource{}.basic(data)) +} diff --git a/internal/services/dns/parse/soa_record.go b/internal/services/dns/parse/soa_record.go new file mode 100644 index 000000000000..350c5604a64a --- /dev/null +++ b/internal/services/dns/parse/soa_record.go @@ -0,0 +1,75 @@ +package parse + +// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +type SoaRecordId struct { + SubscriptionId string + ResourceGroup string + DnszoneName string + SOAName string +} + +func NewSoaRecordID(subscriptionId, resourceGroup, dnszoneName, sOAName string) SoaRecordId { + return SoaRecordId{ + SubscriptionId: subscriptionId, + ResourceGroup: resourceGroup, + DnszoneName: dnszoneName, + SOAName: sOAName, + } +} + +func (id SoaRecordId) String() string { + segments := []string{ + fmt.Sprintf("SOA Name %q", id.SOAName), + fmt.Sprintf("Dnszone Name %q", id.DnszoneName), + fmt.Sprintf("Resource Group %q", id.ResourceGroup), + } + segmentsStr := strings.Join(segments, " / ") + return fmt.Sprintf("%s: (%s)", "SOA Record", segmentsStr) +} + +func (id SoaRecordId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/dnszones/%s/SOA/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.DnszoneName, id.SOAName) +} + +// SoaRecordID parses a SOARecord ID into an SoaRecordId struct +func SoaRecordID(input string) (*SoaRecordId, error) { + id, err := resourceids.ParseAzureResourceID(input) + if err != nil { + return nil, err + } + + resourceId := SoaRecordId{ + SubscriptionId: id.SubscriptionID, + ResourceGroup: id.ResourceGroup, + } + + if resourceId.SubscriptionId == "" { + return nil, fmt.Errorf("ID was missing the 'subscriptions' element") + } + + if resourceId.ResourceGroup == "" { + return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") + } + + if resourceId.DnszoneName, err = id.PopSegment("dnszones"); err != nil { + return nil, err + } + if resourceId.SOAName, err = id.PopSegment("SOA"); err != nil { + return nil, err + } + + if err := id.ValidateNoEmptySegments(input); err != nil { + return nil, err + } + + return &resourceId, nil +} diff --git a/internal/services/dns/registration.go b/internal/services/dns/registration.go index 4316c2bb110b..34bd173367d4 100644 --- a/internal/services/dns/registration.go +++ b/internal/services/dns/registration.go @@ -28,7 +28,17 @@ func (r Registration) WebsiteCategories() []string { // SupportedDataSources returns the supported Data Sources supported by this Service func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { return map[string]*pluginsdk.Resource{ - "azurerm_dns_zone": dataSourceDnsZone(), + "azurerm_dns_a_record": dataSourceDnsARecord(), + "azurerm_dns_aaaa_record": dataSourceDnsAAAARecord(), + "azurerm_dns_caa_record": dataSourceDnsCaaRecord(), + "azurerm_dns_cname_record": dataSourceDnsCNameRecord(), + "azurerm_dns_mx_record": dataSourceDnsMxRecord(), + "azurerm_dns_ns_record": dataSourceDnsNsRecord(), + "azurerm_dns_ptr_record": dataSourceDnsPtrRecord(), + "azurerm_dns_soa_record": dataSourceDnsSoaRecord(), + "azurerm_dns_srv_record": dataSourceDnsSrvRecord(), + "azurerm_dns_txt_record": dataSourceDnsTxtRecord(), + "azurerm_dns_zone": dataSourceDnsZone(), } } diff --git a/website/docs/d/dns_a_record.html.markdown b/website/docs/d/dns_a_record.html.markdown new file mode 100644 index 000000000000..127923338701 --- /dev/null +++ b/website/docs/d/dns_a_record.html.markdown @@ -0,0 +1,55 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_a_record" +description: |- + Gets information about an existing DNS A Record. +--- + +# Data Source: azurerm_dns_a_record + +Use this data source to access information about an existing DNS A Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +data "azurerm_dns_a_record" "example" { + name = "test" + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_a_record_id" { + value = data.azurerm_dns_a_record.example.id +} +``` + +## Argument Reference + +* `name` - The name of the DNS A Record. + +* `resource_group_name` - Specifies the resource group where the DNS Zone (parent resource) exists. + +* `zone_name` - Specifies the DNS Zone where the resource exists. + +## Attributes Reference + +* `id` - The DNS A Record ID. + +* `fqdn` - The FQDN of the DNS A Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `records` - List of IPv4 Addresses. + +* `target_resource_id` - The Azure resource id of the target object from where the dns resource value is taken. + +* `tags` - A mapping of tags assigned to the DNS A Record. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS A Record. diff --git a/website/docs/d/dns_aaaa_record.html.markdown b/website/docs/d/dns_aaaa_record.html.markdown new file mode 100644 index 000000000000..0a8cc3760893 --- /dev/null +++ b/website/docs/d/dns_aaaa_record.html.markdown @@ -0,0 +1,55 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_aaaa_record" +description: |- + Gets information about an existing DNS AAAA Record. +--- + +# Data Source: azurerm_dns_aaaa_record + +Use this data source to access information about an existing DNS AAAA Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +resource "azurerm_dns_aaaa_record" "example" { + name = "test" + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_aaaa_record_id" { + value = data.azurerm_dns_aaaa_record.example.id +} +``` + +## Argument Reference + +* `name` - The name of the DNS AAAA Record. + +* `resource_group_name` - Specifies the resource group where the DNS Zone (parent resource) exists. + +* `zone_name` - Specifies the DNS Zone where the resource exists. + +## Attributes Reference + +* `id` - The DNS AAAA Record ID. + +* `fqdn` - The FQDN of the DNS AAAA Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `records` - List of IPv6 Addresses. + +* `target_resource_id` - The Azure resource id of the target object from where the dns resource value is taken. + +* `tags` - A mapping of tags assigned to the resource. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS AAAA Record. diff --git a/website/docs/d/dns_caa_record.html.markdown b/website/docs/d/dns_caa_record.html.markdown new file mode 100644 index 000000000000..285b001babe9 --- /dev/null +++ b/website/docs/d/dns_caa_record.html.markdown @@ -0,0 +1,63 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_caa_record" +description: |- + Gets information about an existing DNS CAA Record. +--- + +# Data Source: azurerm_dns_caa_record + +Use this data source to access information about an existing DNS CAA Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +resource "azurerm_dns_caa_record" "example" { + name = "test" + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_caa_record_id" { + value = data.azurerm_dns_caa_record.example.id +} +``` + +## Argument Reference + +* `name` - The name of the DNS CAA Record. + +* `resource_group_name` - Specifies the resource group where the DNS Zone (parent resource) exists. + +* `zone_name` - Specifies the DNS Zone where the resource exists. + +## Attributes Reference + +* `id` - The DNS CAA Record ID. + +* `fqdn` - The FQDN of the DNS CAA Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `record` - A list of values that make up the CAA record. Each `record` block supports fields documented below. + +* `tags` - A mapping of tags assigned to the resource. + +--- + +The `record` block supports: + +* `flags` - Extensible CAA flags, currently only 1 is implemented to set the issuer critical flag. + +* `tag` - A property tag, options are `issue`, `issuewild` and `iodef`. + +* `value` - A property value such as a registrar domain. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS CAA Record. diff --git a/website/docs/d/dns_cname_record.html.markdown b/website/docs/d/dns_cname_record.html.markdown new file mode 100644 index 000000000000..5cd3990947d1 --- /dev/null +++ b/website/docs/d/dns_cname_record.html.markdown @@ -0,0 +1,55 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_cname_record" +description: |- + Gets information about an existing DNS CNAME Record. +--- + +# Data Source: azurerm_dns_cname_record + +Use this data source to access information about an existing DNS CNAME Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +resource "azurerm_dns_cname_record" "example" { + name = "test" + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_cname_record_id" { + value = data.azurerm_dns_cname_record.example.id +} +``` + +## Argument Reference + +* `name` - The name of the DNS CNAME Record. + +* `resource_group_name` - Specifies the resource group where the DNS Zone (parent resource) exists. + +* `zone_name` - Specifies the DNS Zone where the resource exists. + +## Attributes Reference + +* `id` - The DNS CName Record ID. + +* `fqdn` - The FQDN of the DNS CName Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `record` - The target of the CNAME. + +* `target_resource_id` - The Azure resource id of the target object from where the dns resource value is taken. + +* `tags` - A mapping of tags assigned to the resource. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS CNAME Record. diff --git a/website/docs/d/dns_mx_record.html.markdown b/website/docs/d/dns_mx_record.html.markdown new file mode 100644 index 000000000000..de7221ddeec3 --- /dev/null +++ b/website/docs/d/dns_mx_record.html.markdown @@ -0,0 +1,61 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_mx_record" +description: |- + Gets information about an existing DNS MX Record. +--- + +# Data Source: azurerm_dns_mx_record + +Use this data source to access information about an existing DNS MX Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +resource "azurerm_dns_mx_record" "example" { + name = "test" + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_mx_record_id" { + value = data.azurerm_dns_mx_record.example.id +} +``` + +## Argument Reference + +* `name` - The name of the DNS MX Record. + +* `resource_group_name` - Specifies the resource group where the resource exists. + +* `zone_name` - Specifies the DNS Zone where the DNS Zone (parent resource) exists. + +## Attributes Reference + +* `id` - The DNS MX Record ID. + +* `fqdn` - The FQDN of the DNS MX Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `record` - A list of values that make up the MX record. Each `record` block supports fields documented below. + +* `tags` - A mapping of tags assigned to the resource. + +--- + +The `record` block supports: + +* `preference` - String representing the "preference” value of the MX records. Records with lower preference value take priority. + +* `exchange` - The mail server responsible for the domain covered by the MX record. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS MX Record. diff --git a/website/docs/d/dns_ns_record.html.markdown b/website/docs/d/dns_ns_record.html.markdown new file mode 100644 index 000000000000..d7e130c7b9d6 --- /dev/null +++ b/website/docs/d/dns_ns_record.html.markdown @@ -0,0 +1,53 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_ns_record" +description: |- + Gets information about an existing DNS NS Record. +--- + +# Data Source: azurerm_dns_ns_record + +Use this data source to access information about an existing DNS NS Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +resource "azurerm_dns_ns_record" "example" { + name = "test" + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_ns_record_id" { + value = data.azurerm_dns_ns_record.example.id +} +``` + +## Argument Reference + +* `name` - The name of the DNS NS Record. + +* `resource_group_name` - Specifies the resource group where the resource exists. + +* `zone_name` - Specifies the DNS Zone where the DNS Zone (parent resource) exists. + +## Attributes Reference + +* `id` - The DNS NS Record ID. + +* `fqdn` - The FQDN of the DNS NS Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `records` - A list of values that make up the NS record. + +* `tags` - A mapping of tags assigned to the resource. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS NS Record. diff --git a/website/docs/d/dns_ptr_record.html.markdown b/website/docs/d/dns_ptr_record.html.markdown new file mode 100644 index 000000000000..0b55582f1da1 --- /dev/null +++ b/website/docs/d/dns_ptr_record.html.markdown @@ -0,0 +1,53 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_ptr_record" +description: |- + Gets information about an existing DNS PTR Record. +--- + +# Data Source: azurerm_dns_ptr_record + +Use this data source to access information about an existing DNS PTR Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +resource "azurerm_dns_ptr_record" "example" { + name = "test" + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_ptr_record_id" { + value = data.azurerm_dns_ptr_record.example.id +} +``` + +## Argument Reference + +* `name` - The name of the DNS PTR Record. + +* `resource_group_name` - Specifies the resource group where the resource exists. + +* `zone_name` - Specifies the DNS Zone where the DNS Zone (parent resource) exists. + +## Attributes Reference + +* `id` - The DNS PTR Record ID. + +* `fqdn` - The FQDN of the DNS PTR Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `records` - List of Fully Qualified Domain Names. + +* `tags` - A mapping of tags assigned to the resource. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS PTR Record. diff --git a/website/docs/d/dns_soa_record.html.markdown b/website/docs/d/dns_soa_record.html.markdown new file mode 100644 index 000000000000..c4c5211af4e9 --- /dev/null +++ b/website/docs/d/dns_soa_record.html.markdown @@ -0,0 +1,64 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_soa_record" +description: |- + Gets information about an existing DNS SOA Record. +--- + +# Data Source: azurerm_dns_soa_record + +Use this data source to access information about an existing DNS SOA Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +resource "azurerm_dns_soa_record" "example" { + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_soa_record_id" { + value = data.azurerm_dns_soa_record.example.id +} +``` + +## Argument Reference + +* `resource_group_name` - Specifies the resource group where the resource exists. + +* `zone_name` - Specifies the DNS Zone where the DNS Zone (parent resource) exists. + +## Attributes Reference + +* `id` - The DNS SOA Record ID. + +* `name` - The name of the DNS SOA Record. + +* `fqdn` - The FQDN of the DNS SOA Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `email` - The email contact for the SOA record. + +* `host_name` - The domain name of the authoritative name server for the SOA record. + +* `expire_time` - The expire time for the SOA record. + +* `minimum_ttl` - The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. + +* `refresh_time` - The refresh time for the SOA record. + +* `retry_time` - The retry time for the SOA record. + +* `serial_number` - The serial number for the SOA record. + +* `tags` - A mapping of tags assigned to the resource. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS SOA Record. diff --git a/website/docs/d/dns_srv_record.html.markdown b/website/docs/d/dns_srv_record.html.markdown new file mode 100644 index 000000000000..3b944c3f4611 --- /dev/null +++ b/website/docs/d/dns_srv_record.html.markdown @@ -0,0 +1,65 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_srv_record" +description: |- + Gets information about an existing DNS SRV Record. +--- + +# Data Source: azurerm_dns_srv_record + +Use this data source to access information about an existing DNS SRV Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +resource "azurerm_dns_srv_record" "example" { + name = "test" + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_srv_record_id" { + value = data.azurerm_dns_srv_record.example.id +} +``` + +## Argument Reference + +* `name` - The name of the DNS SRV Record. + +* `resource_group_name` - Specifies the resource group where the resource exists. + +* `zone_name` - Specifies the DNS Zone where the DNS Zone (parent resource) exists. + +## Attributes Reference + +* `id` - The DNS SRV Record ID. + +* `fqdn` - The FQDN of the DNS SRV Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `record` - A list of values that make up the SRV record. Each `record` block supports fields documented below. + +* `tags` - A mapping of tags assigned to the resource. + +--- + +The `record` block supports: + +* `priority` - Priority of the SRV record. + +* `weight` - Weight of the SRV record. + +* `port` - Port the service is listening on. + +* `target` - FQDN of the service. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS SRV Record. diff --git a/website/docs/d/dns_txt_record.html.markdown b/website/docs/d/dns_txt_record.html.markdown new file mode 100644 index 000000000000..4542899126f7 --- /dev/null +++ b/website/docs/d/dns_txt_record.html.markdown @@ -0,0 +1,59 @@ +--- +subcategory: "DNS" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_dns_txt_record" +description: |- + Gets information about an existing DNS TXT Record. +--- + +# Data Source: azurerm_dns_txt_record + +Use this data source to access information about an existing DNS TXT Record within Azure DNS. + +~> **Note:** [The Azure DNS API has a throttle limit of 500 read (GET) operations per 5 minutes](https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling#network-throttling) - whilst the default read timeouts will work for most cases - in larger configurations you may need to set a larger [read timeout](https://www.terraform.io/language/resources/syntax#operation-timeouts) then the default 5min. Although, we'd generally recommend that you split the resources out into smaller Terraform configurations to avoid the problem entirely. + +## Example Usage + +```hcl +resource "azurerm_dns_txt_record" "example" { + name = "test" + zone_name = "test-zone" + resource_group_name = "test-rg" +} + +output "dns_txt_record_id" { + value = data.azurerm_dns_txt_record.example.id +} +``` + +## Argument Reference + +* `name` - The name of the DNS TXT Record. + +* `resource_group_name` - Specifies the resource group where the resource exists. + +* `zone_name` - Specifies the DNS Zone where the DNS Zone (parent resource) exists. + +## Attributes Reference + +* `id` - The DNS TXT Record ID. + +* `fqdn` - The FQDN of the DNS TXT Record. + +* `ttl` - The Time To Live (TTL) of the DNS record in seconds. + +* `record` - A list of values that make up the txt record. Each `record` block supports fields documented below. + +* `tags` - A mapping of tags assigned to the resource. + +--- + +The `record` block supports: + +* `value` - The value of the record. Max length: 1024 characters + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS TXT Record. diff --git a/website/docs/d/dns_zone.html.markdown b/website/docs/d/dns_zone.html.markdown index 4310dd339764..ca1a88f1bcf4 100644 --- a/website/docs/d/dns_zone.html.markdown +++ b/website/docs/d/dns_zone.html.markdown @@ -27,6 +27,7 @@ output "dns_zone_id" { ## Argument Reference * `name` - The name of the DNS Zone. + * `resource_group_name` - (Optional) The Name of the Resource Group where the DNS Zone exists. If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones in your subscription that matches `name` will be returned. @@ -36,9 +37,12 @@ in your subscription that matches `name` will be returned. * `id` - The ID of the DNS Zone. * `max_number_of_record_sets` - Maximum number of Records in the zone. + * `number_of_record_sets` - The number of records already in the zone. + * `name_servers` - A list of values that make up the NS record for the zone. -* `tags` - A mapping of tags to assign to the EventHub Namespace. + +* `tags` - A mapping of tags assigned to the DNS Zone. ## Timeouts diff --git a/website/docs/r/dns_a_record.html.markdown b/website/docs/r/dns_a_record.html.markdown index b608f4556694..b3c7d0fd59f7 100644 --- a/website/docs/r/dns_a_record.html.markdown +++ b/website/docs/r/dns_a_record.html.markdown @@ -78,7 +78,7 @@ The following arguments are supported: * `records` - (Optional) List of IPv4 Addresses. Conflicts with `target_resource_id`. -* `target_resource_id` - (Optional) The Azure resource id of the target object. Conflicts with `records` +* `target_resource_id` - (Optional) The Azure resource id of the target object. Conflicts with `records`. * `tags` - (Optional) A mapping of tags to assign to the resource. @@ -89,19 +89,21 @@ The following arguments are supported: The following attributes are exported: * `id` - The DNS A Record ID. + * `fqdn` - The FQDN of the DNS A Record. ~> **Note:** The FQDN of the DNS A Record which has a full-stop at the end is by design. Please [see the documentation](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) for more information. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the DNS A Record. + * `update` - (Defaults to 30 minutes) Used when updating the DNS A Record. + * `read` - (Defaults to 5 minutes) Used when retrieving the DNS A Record. + * `delete` - (Defaults to 30 minutes) Used when deleting the DNS A Record. ## Import diff --git a/website/docs/r/dns_aaaa_record.html.markdown b/website/docs/r/dns_aaaa_record.html.markdown index 95e0752113c0..69b4df3369c8 100644 --- a/website/docs/r/dns_aaaa_record.html.markdown +++ b/website/docs/r/dns_aaaa_record.html.markdown @@ -74,11 +74,11 @@ The following arguments are supported: * `zone_name` - (Required) Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. -* `TTL` - (Required) The Time To Live (TTL) of the DNS record in seconds. +* `ttl` - (Required) The Time To Live (TTL) of the DNS record in seconds. * `records` - (Optional) List of IPv6 Addresses. Conflicts with `target_resource_id`. -* `target_resource_id` - (Optional) The Azure resource id of the target object. Conflicts with `records` +* `target_resource_id` - (Optional) The Azure resource id of the target object. Conflicts with `records`. * `tags` - (Optional) A mapping of tags to assign to the resource. @@ -89,17 +89,19 @@ The following arguments are supported: The following attributes are exported: * `id` - The DNS AAAA Record ID. + * `fqdn` - The FQDN of the DNS AAAA Record. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the DNS AAAA Record. + * `update` - (Defaults to 30 minutes) Used when updating the DNS AAAA Record. + * `read` - (Defaults to 5 minutes) Used when retrieving the DNS AAAA Record. + * `delete` - (Defaults to 30 minutes) Used when deleting the DNS AAAA Record. ## Import diff --git a/website/docs/r/dns_caa_record.html.markdown b/website/docs/r/dns_caa_record.html.markdown index 7174a6187b55..2d8af9682649 100644 --- a/website/docs/r/dns_caa_record.html.markdown +++ b/website/docs/r/dns_caa_record.html.markdown @@ -60,6 +60,7 @@ resource "azurerm_dns_caa_record" "example" { } } ``` + ## Argument Reference The following arguments are supported: @@ -76,11 +77,13 @@ The following arguments are supported: * `tags` - (Optional) A mapping of tags to assign to the resource. +--- + The `record` block supports: * `flags` - (Required) Extensible CAA flags, currently only 1 is implemented to set the issuer critical flag. -* `tag` - (Required) A property tag, options are issue, issuewild and iodef. +* `tag` - (Required) A property tag, options are `issue`, `issuewild` and `iodef`. * `value` - (Required) A property value such as a registrar domain. @@ -89,17 +92,19 @@ The `record` block supports: The following attributes are exported: * `id` - The DNS CAA Record ID. + * `fqdn` - The FQDN of the DNS CAA Record. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the DNS CAA Record. + * `update` - (Defaults to 30 minutes) Used when updating the DNS CAA Record. + * `read` - (Defaults to 5 minutes) Used when retrieving the DNS CAA Record. + * `delete` - (Defaults to 30 minutes) Used when deleting the DNS CAA Record. ## Import diff --git a/website/docs/r/dns_cname_record.html.markdown b/website/docs/r/dns_cname_record.html.markdown index 02b173f12721..86c181010ddb 100644 --- a/website/docs/r/dns_cname_record.html.markdown +++ b/website/docs/r/dns_cname_record.html.markdown @@ -74,11 +74,11 @@ The following arguments are supported: * `zone_name` - (Required) Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. -* `TTL` - (Required) The Time To Live (TTL) of the DNS record in seconds. +* `ttl` - (Required) The Time To Live (TTL) of the DNS record in seconds. * `record` - (Required) The target of the CNAME. -* `target_resource_id` - (Optional) The Azure resource id of the target object. Conflicts with `records` +* `target_resource_id` - (Optional) The Azure resource id of the target object. Conflicts with `record`. * `tags` - (Optional) A mapping of tags to assign to the resource. @@ -89,20 +89,22 @@ The following arguments are supported: The following attributes are exported: * `id` - The DNS CName Record ID. + * `fqdn` - The FQDN of the DNS CName Record. -~> Note: The FQDN of the DNS CNAME Record which has a full-stop at the end is by design. Please see the documentation for more information. +~> **Note:** The FQDN of the DNS CNAME Record which has a full-stop at the end is by design. Please see the documentation for more information. ## Timeouts +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating the DNS CNAME Record. +* `update` - (Defaults to 30 minutes) Used when updating the DNS CNAME Record. -The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: +* `read` - (Defaults to 5 minutes) Used when retrieving the DNS CNAME Record. -* `create` - (Defaults to 30 minutes) Used when creating the DNS CName Record. -* `update` - (Defaults to 30 minutes) Used when updating the DNS CName Record. -* `read` - (Defaults to 5 minutes) Used when retrieving the DNS CName Record. -* `delete` - (Defaults to 30 minutes) Used when deleting the DNS CName Record. +* `delete` - (Defaults to 30 minutes) Used when deleting the DNS CNAME Record. ## Import diff --git a/website/docs/r/dns_mx_record.html.markdown b/website/docs/r/dns_mx_record.html.markdown index 9de7ecbcdfae..1c5dc6d885c6 100644 --- a/website/docs/r/dns_mx_record.html.markdown +++ b/website/docs/r/dns_mx_record.html.markdown @@ -46,6 +46,7 @@ resource "azurerm_dns_mx_record" "example" { } } ``` + ## Argument Reference The following arguments are supported: @@ -62,6 +63,8 @@ The following arguments are supported: * `tags` - (Optional) A mapping of tags to assign to the resource. +--- + The `record` block supports: * `preference` - (Required) String representing the "preference” value of the MX records. Records with lower preference value take priority. @@ -73,17 +76,19 @@ The `record` block supports: The following attributes are exported: * `id` - The DNS MX Record ID. + * `fqdn` - The FQDN of the DNS MX Record. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the DNS MX Record. + * `update` - (Defaults to 30 minutes) Used when updating the DNS MX Record. + * `read` - (Defaults to 5 minutes) Used when retrieving the DNS MX Record. + * `delete` - (Defaults to 30 minutes) Used when deleting the DNS MX Record. ## Import diff --git a/website/docs/r/dns_ns_record.html.markdown b/website/docs/r/dns_ns_record.html.markdown index 436f87b3a8ba..89897e8dc6af 100644 --- a/website/docs/r/dns_ns_record.html.markdown +++ b/website/docs/r/dns_ns_record.html.markdown @@ -38,6 +38,7 @@ resource "azurerm_dns_ns_record" "example" { } } ``` + ## Argument Reference The following arguments are supported: @@ -50,7 +51,7 @@ The following arguments are supported: * `ttl` - (Required) The Time To Live (TTL) of the DNS record in seconds. -* `records` - (Required) A list of values that make up the NS record. +* `records` - (Required) A list of values that make up the NS record. * `tags` - (Optional) A mapping of tags to assign to the resource. @@ -59,17 +60,19 @@ The following arguments are supported: The following attributes are exported: * `id` - The DNS NS Record ID. + * `fqdn` - The FQDN of the DNS NS Record. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the DNS NS Record. + * `update` - (Defaults to 30 minutes) Used when updating the DNS NS Record. + * `read` - (Defaults to 5 minutes) Used when retrieving the DNS NS Record. + * `delete` - (Defaults to 30 minutes) Used when deleting the DNS NS Record. ## Import diff --git a/website/docs/r/dns_ptr_record.html.markdown b/website/docs/r/dns_ptr_record.html.markdown index 592be2072acd..bbd893170fe6 100644 --- a/website/docs/r/dns_ptr_record.html.markdown +++ b/website/docs/r/dns_ptr_record.html.markdown @@ -55,17 +55,19 @@ The following arguments are supported: The following attributes are exported: * `id` - The DNS PTR Record ID. + * `fqdn` - The FQDN of the DNS PTR Record. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the DNS PTR Record. + * `update` - (Defaults to 30 minutes) Used when updating the DNS PTR Record. + * `read` - (Defaults to 5 minutes) Used when retrieving the DNS PTR Record. + * `delete` - (Defaults to 30 minutes) Used when deleting the DNS PTR Record. ## Import diff --git a/website/docs/r/dns_srv_record.html.markdown b/website/docs/r/dns_srv_record.html.markdown index d37e26ba5b45..06098dd64ecc 100644 --- a/website/docs/r/dns_srv_record.html.markdown +++ b/website/docs/r/dns_srv_record.html.markdown @@ -43,6 +43,7 @@ resource "azurerm_dns_srv_record" "example" { } } ``` + ## Argument Reference The following arguments are supported: @@ -59,6 +60,8 @@ The following arguments are supported: * `tags` - (Optional) A mapping of tags to assign to the resource. +--- + The `record` block supports: * `priority` - (Required) Priority of the SRV record. @@ -69,23 +72,24 @@ The `record` block supports: * `target` - (Required) FQDN of the service. - ## Attributes Reference The following attributes are exported: * `id` - The DNS SRV Record ID. + * `fqdn` - The FQDN of the DNS SRV Record. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the DNS SRV Record. + * `update` - (Defaults to 30 minutes) Used when updating the DNS SRV Record. + * `read` - (Defaults to 5 minutes) Used when retrieving the DNS SRV Record. + * `delete` - (Defaults to 30 minutes) Used when deleting the DNS SRV Record. ## Import diff --git a/website/docs/r/dns_txt_record.html.markdown b/website/docs/r/dns_txt_record.html.markdown index 45bf512fe160..f495a79db5dd 100644 --- a/website/docs/r/dns_txt_record.html.markdown +++ b/website/docs/r/dns_txt_record.html.markdown @@ -44,6 +44,7 @@ resource "azurerm_dns_txt_record" "example" { } } ``` + ## Argument Reference The following arguments are supported: @@ -60,6 +61,8 @@ The following arguments are supported: * `tags` - (Optional) A mapping of tags to assign to the resource. +--- + The `record` block supports: * `value` - (Required) The value of the record. Max length: 1024 characters @@ -69,17 +72,19 @@ The `record` block supports: The following attributes are exported: * `id` - The DNS TXT Record ID. + * `fqdn` - The FQDN of the DNS TXT Record. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the DNS TXT Record. + * `update` - (Defaults to 30 minutes) Used when updating the DNS TXT Record. + * `read` - (Defaults to 5 minutes) Used when retrieving the DNS TXT Record. + * `delete` - (Defaults to 30 minutes) Used when deleting the DNS TXT Record. ## Import diff --git a/website/docs/r/dns_zone.html.markdown b/website/docs/r/dns_zone.html.markdown index b3f775c177e7..9be07c8f034b 100644 --- a/website/docs/r/dns_zone.html.markdown +++ b/website/docs/r/dns_zone.html.markdown @@ -23,6 +23,7 @@ resource "azurerm_dns_zone" "example-public" { resource_group_name = azurerm_resource_group.example.name } ``` + ## Argument Reference The following arguments are supported: @@ -62,19 +63,23 @@ The `soa_record` block supports: The following attributes are exported: * `id` - The DNS Zone ID. + * `max_number_of_record_sets` - (Optional) Maximum number of Records in the zone. Defaults to `1000`. + * `number_of_record_sets` - (Optional) The number of records already in the zone. + * `name_servers` - (Optional) A list of values that make up the NS record for the zone. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the DNS Zone. + * `update` - (Defaults to 30 minutes) Used when updating the DNS Zone. + * `read` - (Defaults to 5 minutes) Used when retrieving the DNS Zone. + * `delete` - (Defaults to 30 minutes) Used when deleting the DNS Zone. ## Import From e4b4c025d455afa6245d567e51b9618f3e1e23a5 Mon Sep 17 00:00:00 2001 From: kt Date: Fri, 12 Aug 2022 10:16:03 -0700 Subject: [PATCH 097/100] CHANGELOG #17477 --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08d7a5548328..325d8d83dc2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ ## 3.19.0 (Unreleased) +FEATURES: + +* **New Data Source**: `azurerm_dns_a_record` [GH-17477] +* **New Data Source**: `azurerm_dns_aaaa_record` [GH-17477] +* **New Data Source**: `azurerm_dns_caa_record` [GH-17477] +* **New Data Source**: `azurerm_dns_cname_record` [GH-17477] +* **New Data Source**: `azurerm_dns_mx_record` [GH-17477] +* **New Data Source**: `azurerm_dns_ns_record` [GH-17477] +* **New Data Source**: `azurerm_dns_ptr_record` [GH-17477] +* **New Data Source**: `azurerm_dns_soa_record` [GH-17477] +* **New Data Source**: `azurerm_dns_srv_record` [GH-17477] +* **New Data Source**: `azurerm_dns_txt_record` [GH-17477] + ENHANCEMENTS: * Data Source: `azurerm_images` - now uses a logical id [GH-17766] From bfff31e78123fa755818326414551e6b64f2acae Mon Sep 17 00:00:00 2001 From: catriona-m <86247157+catriona-m@users.noreply.github.com> Date: Fri, 12 Aug 2022 18:18:36 +0100 Subject: [PATCH 098/100] gha - allow waiting-response to be added/removed from forked repo prs (#17985) --- .../workflows/pull-request-new-commit.yaml | 7 ++- .../pull-request-reviewed-workflow.yaml | 48 +++++++++++++++++++ .github/workflows/pull-request-reviewed.yaml | 34 ++++++++----- 3 files changed, 75 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/pull-request-reviewed-workflow.yaml diff --git a/.github/workflows/pull-request-new-commit.yaml b/.github/workflows/pull-request-new-commit.yaml index a9e993c0353b..9cbc43c001ba 100644 --- a/.github/workflows/pull-request-new-commit.yaml +++ b/.github/workflows/pull-request-new-commit.yaml @@ -2,9 +2,12 @@ name: Pull Request New Commit on: - pull_request: + pull_request_target: types: [synchronize] +permissions: + pull-requests: write + jobs: issue_comment_triage: runs-on: ubuntu-latest @@ -12,4 +15,4 @@ jobs: - uses: actions-ecosystem/action-remove-labels@v1 with: github_token: "${{ secrets.GITHUB_TOKEN }}" - labels: waiting-response \ No newline at end of file + labels: waiting-response diff --git a/.github/workflows/pull-request-reviewed-workflow.yaml b/.github/workflows/pull-request-reviewed-workflow.yaml new file mode 100644 index 000000000000..64f9da723f54 --- /dev/null +++ b/.github/workflows/pull-request-reviewed-workflow.yaml @@ -0,0 +1,48 @@ +--- +name: "Pull Request Reviewed Workflow" + +on: + workflow_run: + workflows: + - "Pull Request Reviewed" + types: + - completed + +permissions: + pull-requests: write + +jobs: + add-or-remove-waiting-response: + runs-on: ubuntu-latest + outputs: + ghrepo: ${{ steps.env_vars.outputs.ghrepo }} + ghowner: ${{ steps.env_vars.outputs.ghowner }} + prnumber: ${{ steps.env_vars.outputs.prnumber }} + action: ${{ steps.env_vars.outputs.action }} + steps: + - name: Get Artifact + id: get_artifact + continue-on-error: true + uses: dawidd6/action-download-artifact@v2 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + workflow: pull-request-reviewed.yaml + + - name: env_vars + id: env_vars + if: steps.get_artifact.outcome == 'success' + run: | + echo "::set-output name=ghrepo::$(cat artifact/ghrepo.txt)" + echo "::set-output name=ghowner::$(cat artifact/ghowner.txt)" + echo "::set-output name=prnumber::$(cat artifact/prnumber.txt)" + echo "::set-output name=action::$(cat artifact/action.txt)" + + - name: add waiting-reponse + if: steps.get_artifact.outcome == 'success' && steps.env_vars.outputs.action == 'add-waiting-response' + run: | + curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos${{ steps.env_vars.outputs.ghowner }}/${{ steps.env_vars.outputs.ghrepo }}/issues/${{ steps.env_vars.outputs.prnumber }}/labels" -d '{"labels":["waiting-response"]}' + + - name: remove waiting-reponse + if: steps.get_artifact.outcome == 'success' && steps.env_vars.outputs.action == 'remove-waiting-response' + run: | + curl -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos${{ steps.env_vars.outputs.ghowner }}/${{ steps.env_vars.outputs.ghrepo }}/issues/${{ steps.env_vars.outputs.prnumber }}/labels/waiting-response" diff --git a/.github/workflows/pull-request-reviewed.yaml b/.github/workflows/pull-request-reviewed.yaml index 0598a737c0b7..691170a65157 100644 --- a/.github/workflows/pull-request-reviewed.yaml +++ b/.github/workflows/pull-request-reviewed.yaml @@ -6,21 +6,31 @@ on: types: [submitted] permissions: - pull-requests: write + pull-requests: read jobs: - add-waiting-response: - if: github.event.review.state != 'approved' && github.actor != github.event.pull_request.user.login + add-or-remove-waiting-response: runs-on: ubuntu-latest steps: - - shell: bash + - name: "Set Artifacts for add-waiting-response" + if: github.event.review.state != 'approved' && github.actor != github.event.pull_request.user.login + shell: bash run: | - curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos${{ github.owner }}/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" -d '{"labels":["waiting-response"]}' - remove-waiting-response: - if: github.actor == github.event.pull_request.user.login - runs-on: ubuntu-latest - steps: - - uses: actions-ecosystem/action-remove-labels@v1 + mkdir -p wr_actions + echo ${{ github.owner }} > wr_actions/ghowner.txt + echo ${{ github.repository }} > wr_actions/ghrepo.txt + echo ${{ github.event.pull_request.number }} > wr_actions/prnumber.txt + echo "add-waiting-response" > wr_actions/action.txt + - name: "Set Artifacts for remove-waiting-response" + if: github.actor == github.event.pull_request.user.login + shell: bash + run: | + mkdir -p wr_actions + echo ${{ github.owner }} > wr_actions/ghowner.txt + echo ${{ github.repository }} > wr_actions/ghrepo.txt + echo ${{ github.event.pull_request.number }} > wr_actions/prnumber.txt + echo "remove-waiting-response" > wr_actions/action.txt + - uses: actions/upload-artifact@v3 with: - github_token: "${{ secrets.GITHUB_TOKEN }}" - labels: waiting-response + name: artifact + path: wr_actions From fe8d1f63ef2d2d77600058cf3afacef78d4f4b2a Mon Sep 17 00:00:00 2001 From: Tom Harvey Date: Sat, 13 Aug 2022 02:01:11 +0200 Subject: [PATCH 099/100] dedicated hosts: refactoring to use `hashicorp/go-azure-sdk` (#17616) --- internal/services/compute/client/client.go | 10 +- .../compute/dedicated_host_data_source.go | 27 ++- .../dedicated_host_group_data_source.go | 33 ++-- .../compute/dedicated_host_group_resource.go | 106 +++++----- .../dedicated_host_group_resource_test.go | 9 +- .../compute/dedicated_host_resource.go | 158 +++++++-------- .../compute/dedicated_host_resource_test.go | 9 +- .../compute/linux_virtual_machine_resource.go | 6 +- .../services/compute/parse/dedicated_host.go | 75 ------- .../compute/parse/dedicated_host_group.go | 69 ------- .../parse/dedicated_host_group_test.go | 112 ----------- .../compute/parse/dedicated_host_test.go | 128 ------------ internal/services/compute/resourceids.go | 2 - .../validate/dedicated_host_group_id.go | 23 --- .../validate/dedicated_host_group_id_test.go | 76 ------- .../compute/validate/dedicated_host_id.go | 23 --- .../validate/dedicated_host_id_test.go | 88 --------- .../windows_virtual_machine_resource.go | 6 +- ...ance_assignment_dedicated_host_resource.go | 25 +-- ...assignment_dedicated_host_resource_test.go | 2 +- .../maintenance_assignment_dedicated_host.go | 8 +- ...ntenance_assignment_dedicated_host_test.go | 12 +- .../2021-11-01/dedicatedhostgroups/README.md | 128 ++++++++++++ .../2021-11-01/dedicatedhostgroups/client.go | 18 ++ .../dedicatedhostgroups/constants.go | 65 ++++++ .../dedicatedhostgroups/id_hostgroup.go | 124 ++++++++++++ .../method_createorupdate_autorest.go | 69 +++++++ .../method_delete_autorest.go | 66 +++++++ .../method_get_autorest.go | 97 +++++++++ .../method_listbyresourcegroup_autorest.go | 187 ++++++++++++++++++ .../method_listbysubscription_autorest.go | 187 ++++++++++++++++++ .../method_update_autorest.go | 69 +++++++ .../model_dedicatedhostallocatablevm.go | 9 + .../model_dedicatedhostavailablecapacity.go | 8 + .../model_dedicatedhostgroup.go | 14 ++ .../model_dedicatedhostgroupinstanceview.go | 8 + .../model_dedicatedhostgroupproperties.go | 11 ++ .../model_dedicatedhostgroupupdate.go | 10 + ...model_dedicatedhostinstanceviewwithname.go | 11 ++ .../model_instanceviewstatus.go | 30 +++ .../model_subresourcereadonly.go | 8 + .../dedicatedhostgroups/predicates.go | 29 +++ .../2021-11-01/dedicatedhostgroups/version.go | 12 ++ .../2021-11-01/dedicatedhosts/README.md | 82 ++++++++ .../2021-11-01/dedicatedhosts/client.go | 18 ++ .../2021-11-01/dedicatedhosts/constants.go | 96 +++++++++ .../2021-11-01/dedicatedhosts/id_host.go | 137 +++++++++++++ .../method_createorupdate_autorest.go | 79 ++++++++ .../dedicatedhosts/method_delete_autorest.go | 78 ++++++++ .../dedicatedhosts/method_get_autorest.go | 97 +++++++++ .../dedicatedhosts/method_update_autorest.go | 79 ++++++++ .../dedicatedhosts/model_dedicatedhost.go | 14 ++ .../model_dedicatedhostallocatablevm.go | 9 + .../model_dedicatedhostavailablecapacity.go | 8 + .../model_dedicatedhostinstanceview.go | 10 + .../model_dedicatedhostproperties.go | 46 +++++ .../model_dedicatedhostupdate.go | 9 + .../model_instanceviewstatus.go | 30 +++ .../2021-11-01/dedicatedhosts/model_sku.go | 10 + .../model_subresourcereadonly.go | 8 + .../2021-11-01/dedicatedhosts/version.go | 12 ++ vendor/modules.txt | 2 + 62 files changed, 2187 insertions(+), 804 deletions(-) delete mode 100644 internal/services/compute/parse/dedicated_host.go delete mode 100644 internal/services/compute/parse/dedicated_host_group.go delete mode 100644 internal/services/compute/parse/dedicated_host_group_test.go delete mode 100644 internal/services/compute/parse/dedicated_host_test.go delete mode 100644 internal/services/compute/validate/dedicated_host_group_id.go delete mode 100644 internal/services/compute/validate/dedicated_host_group_id_test.go delete mode 100644 internal/services/compute/validate/dedicated_host_id.go delete mode 100644 internal/services/compute/validate/dedicated_host_id_test.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/id_hostgroup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_createorupdate_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_delete_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_get_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_listbyresourcegroup_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_listbysubscription_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_update_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostallocatablevm.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostavailablecapacity.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupinstanceview.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostinstanceviewwithname.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_instanceviewstatus.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_subresourcereadonly.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/id_host.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_createorupdate_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_delete_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_get_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_update_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhost.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostallocatablevm.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostavailablecapacity.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostinstanceview.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_instanceviewstatus.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_sku.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_subresourcereadonly.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/version.go diff --git a/internal/services/compute/client/client.go b/internal/services/compute/client/client.go index 074e7e24e663..d3cf4358d2d0 100644 --- a/internal/services/compute/client/client.go +++ b/internal/services/compute/client/client.go @@ -4,6 +4,8 @@ import ( "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-11-01/compute" "github.com/Azure/azure-sdk-for-go/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys" "github.com/hashicorp/terraform-provider-azurerm/internal/common" @@ -13,8 +15,8 @@ type Client struct { AvailabilitySetsClient *availabilitysets.AvailabilitySetsClient CapacityReservationsClient *compute.CapacityReservationsClient CapacityReservationGroupsClient *compute.CapacityReservationGroupsClient - DedicatedHostsClient *compute.DedicatedHostsClient - DedicatedHostGroupsClient *compute.DedicatedHostGroupsClient + DedicatedHostsClient *dedicatedhosts.DedicatedHostsClient + DedicatedHostGroupsClient *dedicatedhostgroups.DedicatedHostGroupsClient DisksClient *compute.DisksClient DiskAccessClient *compute.DiskAccessesClient DiskEncryptionSetsClient *compute.DiskEncryptionSetsClient @@ -49,10 +51,10 @@ func NewClient(o *common.ClientOptions) *Client { capacityReservationGroupsClient := compute.NewCapacityReservationGroupsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) o.ConfigureClient(&capacityReservationGroupsClient.Client, o.ResourceManagerAuthorizer) - dedicatedHostsClient := compute.NewDedicatedHostsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + dedicatedHostsClient := dedicatedhosts.NewDedicatedHostsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&dedicatedHostsClient.Client, o.ResourceManagerAuthorizer) - dedicatedHostGroupsClient := compute.NewDedicatedHostGroupsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + dedicatedHostGroupsClient := dedicatedhostgroups.NewDedicatedHostGroupsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&dedicatedHostGroupsClient.Client, o.ResourceManagerAuthorizer) disksClient := compute.NewDisksClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) diff --git a/internal/services/compute/dedicated_host_data_source.go b/internal/services/compute/dedicated_host_data_source.go index 6b2f2ff5c865..04b8ec950f04 100644 --- a/internal/services/compute/dedicated_host_data_source.go +++ b/internal/services/compute/dedicated_host_data_source.go @@ -4,15 +4,15 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func dataSourceDedicatedHost() *pluginsdk.Resource { @@ -40,7 +40,7 @@ func dataSourceDedicatedHost() *pluginsdk.Resource { "location": commonschema.LocationComputed(), - "tags": tags.SchemaDataSource(), + "tags": commonschema.TagsDataSource(), }, } } @@ -51,22 +51,29 @@ func dataSourceDedicatedHostRead(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewDedicatedHostID(subscriptionId, d.Get("resource_group_name").(string), d.Get("dedicated_host_group_name").(string), d.Get("name").(string)) + id := dedicatedhosts.NewHostID(subscriptionId, d.Get("resource_group_name").(string), d.Get("dedicated_host_group_name").(string), d.Get("name").(string)) - resp, err := client.Get(ctx, id.ResourceGroup, id.HostGroupName, id.HostName, "") + resp, err := client.Get(ctx, id, dedicatedhosts.DefaultGetOperationOptions()) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return fmt.Errorf("%s was not found", id) } + return fmt.Errorf("reading %s: %+v", id, err) } d.SetId(id.ID()) d.Set("name", id.HostName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("dedicated_host_group_name", id.HostGroupName) - d.Set("location", location.NormalizeNilable(resp.Location)) + if model := resp.Model; model != nil { + d.Set("location", location.Normalize(model.Location)) + + if err := tags.FlattenAndSet(d, model.Tags); err != nil { + return err + } + } - return tags.FlattenAndSet(d, resp.Tags) + return nil } diff --git a/internal/services/compute/dedicated_host_group_data_source.go b/internal/services/compute/dedicated_host_group_data_source.go index 322429c23bf0..0446ea8c1a9f 100644 --- a/internal/services/compute/dedicated_host_group_data_source.go +++ b/internal/services/compute/dedicated_host_group_data_source.go @@ -5,16 +5,16 @@ import ( "regexp" "time" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func dataSourceDedicatedHostGroup() *pluginsdk.Resource { @@ -59,10 +59,10 @@ func dataSourceDedicatedHostGroupRead(d *pluginsdk.ResourceData, meta interface{ ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewDedicatedHostGroupID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - resp, err := client.Get(ctx, id.ResourceGroup, id.HostGroupName, "") + id := dedicatedhostgroups.NewHostGroupID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) + resp, err := client.Get(ctx, id, dedicatedhostgroups.DefaultGetOperationOptions()) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return fmt.Errorf("%s was not found", id) } return fmt.Errorf("reading %s: %+v", id, err) @@ -71,20 +71,21 @@ func dataSourceDedicatedHostGroupRead(d *pluginsdk.ResourceData, meta interface{ d.SetId(id.ID()) d.Set("name", id.HostGroupName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) - d.Set("location", location.NormalizeNilable(resp.Location)) - d.Set("zones", zones.Flatten(resp.Zones)) + if model := resp.Model; model != nil { + d.Set("location", location.Normalize(model.Location)) + d.Set("zones", zones.Flatten(model.Zones)) - if props := resp.DedicatedHostGroupProperties; props != nil { - d.Set("automatic_placement_enabled", props.SupportAutomaticPlacement) + if props := model.Properties; props != nil { + d.Set("automatic_placement_enabled", props.SupportAutomaticPlacement) + d.Set("platform_fault_domain_count", props.PlatformFaultDomainCount) + } - platformFaultDomainCount := 0 - if props.PlatformFaultDomainCount != nil { - platformFaultDomainCount = int(*props.PlatformFaultDomainCount) + if err := tags.FlattenAndSet(d, model.Tags); err != nil { + return err } - d.Set("platform_fault_domain_count", platformFaultDomainCount) } - return tags.FlattenAndSet(d, resp.Tags) + return nil } diff --git a/internal/services/compute/dedicated_host_group_resource.go b/internal/services/compute/dedicated_host_group_resource.go index 06de97bed5f0..f8eba877674f 100644 --- a/internal/services/compute/dedicated_host_group_resource.go +++ b/internal/services/compute/dedicated_host_group_resource.go @@ -5,15 +5,14 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-11-01/compute" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -28,7 +27,7 @@ func resourceDedicatedHostGroup() *pluginsdk.Resource { Delete: resourceDedicatedHostGroupDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.HostGroupID(id) + _, err := dedicatedhostgroups.ParseHostGroupID(id) return err }), @@ -47,11 +46,9 @@ func resourceDedicatedHostGroup() *pluginsdk.Resource { ValidateFunc: validate.DedicatedHostGroupName(), }, - "location": azure.SchemaLocation(), + "resource_group_name": commonschema.ResourceGroupName(), - // There's a bug in the Azure API where this is returned in upper-case - // BUG: https://github.com/Azure/azure-rest-api-specs/issues/8068 - "resource_group_name": azure.SchemaResourceGroupNameDiffSuppress(), + "location": commonschema.Location(), "platform_fault_domain_count": { Type: pluginsdk.TypeInt, @@ -68,7 +65,7 @@ func resourceDedicatedHostGroup() *pluginsdk.Resource { }, "zone": commonschema.ZoneSingleOptionalForceNew(), - "tags": tags.Schema(), + "tags": commonschema.Tags(), }, } } @@ -79,48 +76,45 @@ func resourceDedicatedHostGroupCreate(d *pluginsdk.ResourceData, meta interface{ ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewHostGroupID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - + id := dedicatedhostgroups.NewHostGroupID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.Name, "") + existing, err := client.Get(ctx, id, dedicatedhostgroups.DefaultGetOperationOptions()) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_dedicated_host_group", id.ID()) } } - location := azure.NormalizeLocation(d.Get("location").(string)) platformFaultDomainCount := d.Get("platform_fault_domain_count").(int) t := d.Get("tags").(map[string]interface{}) - parameters := compute.DedicatedHostGroup{ - Location: utils.String(location), - DedicatedHostGroupProperties: &compute.DedicatedHostGroupProperties{ - PlatformFaultDomainCount: utils.Int32(int32(platformFaultDomainCount)), + payload := dedicatedhostgroups.DedicatedHostGroup{ + Location: location.Normalize(d.Get("location").(string)), + Properties: &dedicatedhostgroups.DedicatedHostGroupProperties{ + PlatformFaultDomainCount: int64(platformFaultDomainCount), }, Tags: tags.Expand(t), } if zone, ok := d.GetOk("zone"); ok { - parameters.Zones = &[]string{ + payload.Zones = &[]string{ zone.(string), } } if v, ok := d.GetOk("automatic_placement_enabled"); ok { - parameters.DedicatedHostGroupProperties.SupportAutomaticPlacement = utils.Bool(v.(bool)) + payload.Properties.SupportAutomaticPlacement = utils.Bool(v.(bool)) } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, parameters); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, payload); err != nil { return fmt.Errorf("creating %s: %+v", id, err) } d.SetId(id.ID()) - return resourceDedicatedHostGroupRead(d, meta) } @@ -129,44 +123,45 @@ func resourceDedicatedHostGroupRead(d *pluginsdk.ResourceData, meta interface{}) ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.HostGroupID(d.Id()) + id, err := dedicatedhostgroups.ParseHostGroupID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.Name, "") + resp, err := client.Get(ctx, *id, dedicatedhostgroups.DefaultGetOperationOptions()) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] Dedicated Host Group %q does not exist - removing from state", d.Id()) + if response.WasNotFound(resp.HttpResponse) { + log.Printf("[INFO] %q was not found - removing from state", *id) d.SetId("") return nil } - return fmt.Errorf("reading Dedicated Host Group %q (: %+v", id.String(), err) + return fmt.Errorf("retrieving %s: %+v", *id, err) } - d.Set("name", id.Name) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("name", id.HostGroupName) + d.Set("resource_group_name", id.ResourceGroupName) - d.Set("location", location.NormalizeNilable(resp.Location)) + if model := resp.Model; model != nil { + d.Set("location", location.Normalize(model.Location)) - zone := "" - if resp.Zones != nil && len(*resp.Zones) > 0 { - z := *resp.Zones - zone = z[0] - } - d.Set("zone", zone) + zone := "" + if model.Zones != nil && len(*model.Zones) > 0 { + z := *model.Zones + zone = z[0] + } + d.Set("zone", zone) - if props := resp.DedicatedHostGroupProperties; props != nil { - platformFaultDomainCount := 0 - if props.PlatformFaultDomainCount != nil { - platformFaultDomainCount = int(*props.PlatformFaultDomainCount) + if props := model.Properties; props != nil { + d.Set("platform_fault_domain_count", props.PlatformFaultDomainCount) + d.Set("automatic_placement_enabled", props.SupportAutomaticPlacement) } - d.Set("platform_fault_domain_count", platformFaultDomainCount) - d.Set("automatic_placement_enabled", props.SupportAutomaticPlacement) + if err := tags.FlattenAndSet(d, model.Tags); err != nil { + return err + } } - return tags.FlattenAndSet(d, resp.Tags) + return nil } func resourceDedicatedHostGroupUpdate(d *pluginsdk.ResourceData, meta interface{}) error { @@ -174,16 +169,17 @@ func resourceDedicatedHostGroupUpdate(d *pluginsdk.ResourceData, meta interface{ ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - name := d.Get("name").(string) - resourceGroupName := d.Get("resource_group_name").(string) - t := d.Get("tags").(map[string]interface{}) + id, err := dedicatedhostgroups.ParseHostGroupID(d.Id()) + if err != nil { + return err + } - parameters := compute.DedicatedHostGroupUpdate{ - Tags: tags.Expand(t), + payload := dedicatedhostgroups.DedicatedHostGroupUpdate{ + Tags: tags.Expand(d.Get("tags").(map[string]interface{})), } - if _, err := client.Update(ctx, resourceGroupName, name, parameters); err != nil { - return fmt.Errorf("updating Dedicated Host Group %q (Resource Group %q): %+v", name, resourceGroupName, err) + if _, err := client.Update(ctx, *id, payload); err != nil { + return fmt.Errorf("updating %s: %+v", *id, err) } return resourceDedicatedHostGroupRead(d, meta) @@ -194,13 +190,13 @@ func resourceDedicatedHostGroupDelete(d *pluginsdk.ResourceData, meta interface{ ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.HostGroupID(d.Id()) + id, err := dedicatedhostgroups.ParseHostGroupID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.Name); err != nil { - return fmt.Errorf("deleting Dedicated Host Group %q : %+v", id.String(), err) + if _, err := client.Delete(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", *id, err) } return nil diff --git a/internal/services/compute/dedicated_host_group_resource_test.go b/internal/services/compute/dedicated_host_group_resource_test.go index 1abe0a0aac07..0fac0d29f4ed 100644 --- a/internal/services/compute/dedicated_host_group_resource_test.go +++ b/internal/services/compute/dedicated_host_group_resource_test.go @@ -5,10 +5,11 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -78,17 +79,17 @@ func TestAccDedicatedHostGroup_complete(t *testing.T) { } func (r DedicatedHostGroupResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.HostGroupID(state.ID) + id, err := dedicatedhostgroups.ParseHostGroupID(state.ID) if err != nil { return nil, err } - resp, err := clients.Compute.DedicatedHostGroupsClient.Get(ctx, id.ResourceGroup, id.Name, "") + resp, err := clients.Compute.DedicatedHostGroupsClient.Get(ctx, *id, dedicatedhostgroups.DefaultGetOperationOptions()) if err != nil { return nil, fmt.Errorf("retrieving Compute Dedicated Host Group %q", id) } - return utils.Bool(resp.ID != nil), nil + return utils.Bool(resp.Model != nil), nil } func (DedicatedHostGroupResource) basic(data acceptance.TestData) string { diff --git a/internal/services/compute/dedicated_host_resource.go b/internal/services/compute/dedicated_host_resource.go index 41dc03fec72a..2dc6307bf4d9 100644 --- a/internal/services/compute/dedicated_host_resource.go +++ b/internal/services/compute/dedicated_host_resource.go @@ -6,14 +6,15 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-11-01/compute" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -28,7 +29,7 @@ func resourceDedicatedHost() *pluginsdk.Resource { Delete: resourceDedicatedHostDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.DedicatedHostID(id) + _, err := dedicatedhosts.ParseHostID(id) return err }), @@ -47,15 +48,15 @@ func resourceDedicatedHost() *pluginsdk.Resource { ValidateFunc: validate.DedicatedHostName(), }, - "location": azure.SchemaLocation(), - "dedicated_host_group_id": { Type: pluginsdk.TypeString, Required: true, ForceNew: true, - ValidateFunc: validate.DedicatedHostGroupID, + ValidateFunc: dedicatedhostgroups.ValidateHostGroupID, }, + "location": commonschema.Location(), + "sku_name": { Type: pluginsdk.TypeString, ForceNew: true, @@ -124,14 +125,15 @@ func resourceDedicatedHost() *pluginsdk.Resource { Type: pluginsdk.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{ - string(compute.DedicatedHostLicenseTypesNone), - string(compute.DedicatedHostLicenseTypesWindowsServerHybrid), - string(compute.DedicatedHostLicenseTypesWindowsServerPerpetual), + // TODO: remove `None` in 4.0 in favour of this field being set to an empty string (since it's optional) + string(dedicatedhosts.DedicatedHostLicenseTypesNone), + string(dedicatedhosts.DedicatedHostLicenseTypesWindowsServerHybrid), + string(dedicatedhosts.DedicatedHostLicenseTypesWindowsServerPerpetual), }, false), - Default: string(compute.DedicatedHostLicenseTypesNone), + Default: string(dedicatedhosts.DedicatedHostLicenseTypesNone), }, - "tags": tags.Schema(), + "tags": commonschema.Tags(), }, } } @@ -141,102 +143,90 @@ func resourceDedicatedHostCreate(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() - hostGroupId, err := parse.DedicatedHostGroupID(d.Get("dedicated_host_group_id").(string)) + hostGroupId, err := dedicatedhostgroups.ParseHostGroupID(d.Get("dedicated_host_group_id").(string)) if err != nil { return err } - id := parse.NewDedicatedHostID(hostGroupId.SubscriptionId, hostGroupId.ResourceGroup, hostGroupId.HostGroupName, d.Get("name").(string)) + id := dedicatedhosts.NewHostID(hostGroupId.SubscriptionId, hostGroupId.ResourceGroupName, hostGroupId.HostGroupName, d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.HostGroupName, id.HostName, "") + existing, err := client.Get(ctx, id, dedicatedhosts.DefaultGetOperationOptions()) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_dedicated_host", id.ID()) } } - parameters := compute.DedicatedHost{ - Location: utils.String(azure.NormalizeLocation(d.Get("location").(string))), - DedicatedHostProperties: &compute.DedicatedHostProperties{ + licenseType := dedicatedhosts.DedicatedHostLicenseTypes(d.Get("license_type").(string)) + payload := dedicatedhosts.DedicatedHost{ + Location: location.Normalize(d.Get("location").(string)), + Properties: &dedicatedhosts.DedicatedHostProperties{ AutoReplaceOnFailure: utils.Bool(d.Get("auto_replace_on_failure").(bool)), - LicenseType: compute.DedicatedHostLicenseTypes(d.Get("license_type").(string)), - PlatformFaultDomain: utils.Int32(int32(d.Get("platform_fault_domain").(int))), + LicenseType: &licenseType, + PlatformFaultDomain: utils.Int64(int64(d.Get("platform_fault_domain").(int))), }, - Sku: &compute.Sku{ + Sku: dedicatedhosts.Sku{ Name: utils.String(d.Get("sku_name").(string)), }, Tags: tags.Expand(d.Get("tags").(map[string]interface{})), } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.HostGroupName, id.HostName, parameters) - if err != nil { + if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { return fmt.Errorf("creating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for creation of %s: %+v", id, err) - } d.SetId(id.ID()) return resourceDedicatedHostRead(d, meta) } func resourceDedicatedHostRead(d *pluginsdk.ResourceData, meta interface{}) error { - groupsClient := meta.(*clients.Client).Compute.DedicatedHostGroupsClient hostsClient := meta.(*clients.Client).Compute.DedicatedHostsClient ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.DedicatedHostID(d.Id()) + id, err := dedicatedhosts.ParseHostID(d.Id()) if err != nil { return err } - hostGroupId := parse.NewDedicatedHostGroupID(id.SubscriptionId, id.ResourceGroup, id.HostGroupName) - group, err := groupsClient.Get(ctx, hostGroupId.ResourceGroup, hostGroupId.HostGroupName, "") + resp, err := hostsClient.Get(ctx, *id, dedicatedhosts.DefaultGetOperationOptions()) if err != nil { - if utils.ResponseWasNotFound(group.Response) { - log.Printf("[INFO] Parent %s does not exist - removing from state", hostGroupId) + if response.WasNotFound(resp.HttpResponse) { + log.Printf("[INFO] %s was not found - removing from state", *id) d.SetId("") return nil } - return fmt.Errorf("retrieving %s: %+v", hostGroupId, err) - } - - resp, err := hostsClient.Get(ctx, id.ResourceGroup, id.HostGroupName, id.HostName, "") - if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] Dedicated Host %q does not exist - removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("retrieving Dedicated Host %q (Host Group Name %q / Resource Group %q): %+v", id.HostName, id.HostGroupName, id.ResourceGroup, err) + return fmt.Errorf("retrieving %s: %+v", *id, err) } d.Set("name", id.HostName) - d.Set("dedicated_host_group_id", hostGroupId.ID()) + d.Set("dedicated_host_group_id", dedicatedhostgroups.NewHostGroupID(id.SubscriptionId, id.ResourceGroupName, id.HostGroupName).ID()) + + if model := resp.Model; model != nil { + d.Set("location", location.Normalize(model.Location)) + d.Set("sku_name", model.Sku.Name) + if props := model.Properties; props != nil { + d.Set("auto_replace_on_failure", props.AutoReplaceOnFailure) + d.Set("license_type", props.LicenseType) + + platformFaultDomain := 0 + if props.PlatformFaultDomain != nil { + platformFaultDomain = int(*props.PlatformFaultDomain) + } + d.Set("platform_fault_domain", platformFaultDomain) + } - if location := resp.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } - d.Set("sku_name", resp.Sku.Name) - if props := resp.DedicatedHostProperties; props != nil { - d.Set("auto_replace_on_failure", props.AutoReplaceOnFailure) - d.Set("license_type", props.LicenseType) - - platformFaultDomain := 0 - if props.PlatformFaultDomain != nil { - platformFaultDomain = int(*props.PlatformFaultDomain) + if err := tags.FlattenAndSet(d, model.Tags); err != nil { + return err } - d.Set("platform_fault_domain", platformFaultDomain) } - return tags.FlattenAndSet(d, resp.Tags) + return nil } func resourceDedicatedHostUpdate(d *pluginsdk.ResourceData, meta interface{}) error { @@ -244,25 +234,30 @@ func resourceDedicatedHostUpdate(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.DedicatedHostID(d.Id()) + id, err := dedicatedhosts.ParseHostID(d.Id()) if err != nil { return err } - parameters := compute.DedicatedHostUpdate{ - DedicatedHostProperties: &compute.DedicatedHostProperties{ - AutoReplaceOnFailure: utils.Bool(d.Get("auto_replace_on_failure").(bool)), - LicenseType: compute.DedicatedHostLicenseTypes(d.Get("license_type").(string)), - }, - Tags: tags.Expand(d.Get("tags").(map[string]interface{})), + payload := dedicatedhosts.DedicatedHostUpdate{} + + if d.HasChanges("auto_replace_on_failure", "license_type") { + payload.Properties = &dedicatedhosts.DedicatedHostProperties{} + if d.HasChange("auto_replace_on_failure") { + payload.Properties.AutoReplaceOnFailure = utils.Bool(d.Get("auto_replace_on_failure").(bool)) + } + if d.HasChange("license_type") { + licenseType := dedicatedhosts.DedicatedHostLicenseTypes(d.Get("license_type").(string)) + payload.Properties.LicenseType = &licenseType + } } - future, err := client.Update(ctx, id.ResourceGroup, id.HostGroupName, id.HostName, parameters) - if err != nil { - return fmt.Errorf("updating %s: %+v", *id, err) + if d.HasChange("tags") { + payload.Tags = tags.Expand(d.Get("tags").(map[string]interface{})) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for update of %s: %+v", *id, err) + + if err := client.UpdateThenPoll(ctx, *id, payload); err != nil { + return fmt.Errorf("updating %s: %+v", *id, err) } return resourceDedicatedHostRead(d, meta) @@ -273,22 +268,15 @@ func resourceDedicatedHostDelete(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.DedicatedHostID(d.Id()) + id, err := dedicatedhosts.ParseHostID(d.Id()) if err != nil { return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.HostGroupName, id.HostName) - if err != nil { + if err := client.DeleteThenPoll(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", *id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - if !response.WasNotFound(future.Response()) { - return fmt.Errorf("waiting for deletion of %s: %+v", *id, err) - } - } - // API has bug, which appears to be eventually consistent. Tracked by this issue: https://github.com/Azure/azure-rest-api-specs/issues/8137 log.Printf("[DEBUG] Waiting for %s to be fully deleted..", *id) stateConf := &pluginsdk.StateChangeConf{ @@ -307,11 +295,11 @@ func resourceDedicatedHostDelete(d *pluginsdk.ResourceData, meta interface{}) er return nil } -func dedicatedHostDeletedRefreshFunc(ctx context.Context, client *compute.DedicatedHostsClient, id parse.DedicatedHostId) pluginsdk.StateRefreshFunc { +func dedicatedHostDeletedRefreshFunc(ctx context.Context, client *dedicatedhosts.DedicatedHostsClient, id dedicatedhosts.HostId) pluginsdk.StateRefreshFunc { return func() (interface{}, string, error) { - res, err := client.Get(ctx, id.ResourceGroup, id.HostGroupName, id.HostName, "") + res, err := client.Get(ctx, id, dedicatedhosts.DefaultGetOperationOptions()) if err != nil { - if utils.ResponseWasNotFound(res.Response) { + if response.WasNotFound(res.HttpResponse) { return "NotFound", "NotFound", nil } diff --git a/internal/services/compute/dedicated_host_resource_test.go b/internal/services/compute/dedicated_host_resource_test.go index ddc6d6b2f091..09b33e7e0a84 100644 --- a/internal/services/compute/dedicated_host_resource_test.go +++ b/internal/services/compute/dedicated_host_resource_test.go @@ -5,10 +5,11 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -166,17 +167,17 @@ func TestAccDedicatedHost_requiresImport(t *testing.T) { } func (t DedicatedHostResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.DedicatedHostID(state.ID) + id, err := dedicatedhosts.ParseHostID(state.ID) if err != nil { return nil, err } - resp, err := clients.Compute.DedicatedHostsClient.Get(ctx, id.ResourceGroup, id.HostGroupName, id.HostName, "") + resp, err := clients.Compute.DedicatedHostsClient.Get(ctx, *id, dedicatedhosts.DefaultGetOperationOptions()) if err != nil { return nil, fmt.Errorf("retrieving Compute Dedicated Host %q", id.String()) } - return utils.Bool(resp.ID != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r DedicatedHostResource) basic(data acceptance.TestData) string { diff --git a/internal/services/compute/linux_virtual_machine_resource.go b/internal/services/compute/linux_virtual_machine_resource.go index e84df966ae16..efba27deba4a 100644 --- a/internal/services/compute/linux_virtual_machine_resource.go +++ b/internal/services/compute/linux_virtual_machine_resource.go @@ -12,6 +12,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" @@ -151,7 +153,7 @@ func resourceLinuxVirtualMachine() *pluginsdk.Resource { "dedicated_host_id": { Type: pluginsdk.TypeString, Optional: true, - ValidateFunc: computeValidate.DedicatedHostID, + ValidateFunc: dedicatedhosts.ValidateHostID, // the Compute/VM API is broken and returns the Resource Group name in UPPERCASE :shrug: // tracked by https://github.com/Azure/azure-rest-api-specs/issues/19424 DiffSuppressFunc: suppress.CaseDifference, @@ -163,7 +165,7 @@ func resourceLinuxVirtualMachine() *pluginsdk.Resource { "dedicated_host_group_id": { Type: pluginsdk.TypeString, Optional: true, - ValidateFunc: computeValidate.DedicatedHostGroupID, + ValidateFunc: dedicatedhostgroups.ValidateHostGroupID, // the Compute/VM API is broken and returns the Resource Group name in UPPERCASE // tracked by https://github.com/Azure/azure-rest-api-specs/issues/19424 DiffSuppressFunc: suppress.CaseDifference, diff --git a/internal/services/compute/parse/dedicated_host.go b/internal/services/compute/parse/dedicated_host.go deleted file mode 100644 index f9c7816b810b..000000000000 --- a/internal/services/compute/parse/dedicated_host.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type DedicatedHostId struct { - SubscriptionId string - ResourceGroup string - HostGroupName string - HostName string -} - -func NewDedicatedHostID(subscriptionId, resourceGroup, hostGroupName, hostName string) DedicatedHostId { - return DedicatedHostId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - HostGroupName: hostGroupName, - HostName: hostName, - } -} - -func (id DedicatedHostId) String() string { - segments := []string{ - fmt.Sprintf("Host Name %q", id.HostName), - fmt.Sprintf("Host Group Name %q", id.HostGroupName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Dedicated Host", segmentsStr) -} - -func (id DedicatedHostId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/hostGroups/%s/hosts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.HostGroupName, id.HostName) -} - -// DedicatedHostID parses a DedicatedHost ID into an DedicatedHostId struct -func DedicatedHostID(input string) (*DedicatedHostId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := DedicatedHostId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.HostGroupName, err = id.PopSegment("hostGroups"); err != nil { - return nil, err - } - if resourceId.HostName, err = id.PopSegment("hosts"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/compute/parse/dedicated_host_group.go b/internal/services/compute/parse/dedicated_host_group.go deleted file mode 100644 index 453a86e5019b..000000000000 --- a/internal/services/compute/parse/dedicated_host_group.go +++ /dev/null @@ -1,69 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type DedicatedHostGroupId struct { - SubscriptionId string - ResourceGroup string - HostGroupName string -} - -func NewDedicatedHostGroupID(subscriptionId, resourceGroup, hostGroupName string) DedicatedHostGroupId { - return DedicatedHostGroupId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - HostGroupName: hostGroupName, - } -} - -func (id DedicatedHostGroupId) String() string { - segments := []string{ - fmt.Sprintf("Host Group Name %q", id.HostGroupName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Dedicated Host Group", segmentsStr) -} - -func (id DedicatedHostGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/hostGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.HostGroupName) -} - -// DedicatedHostGroupID parses a DedicatedHostGroup ID into an DedicatedHostGroupId struct -func DedicatedHostGroupID(input string) (*DedicatedHostGroupId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := DedicatedHostGroupId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.HostGroupName, err = id.PopSegment("hostGroups"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/compute/parse/dedicated_host_group_test.go b/internal/services/compute/parse/dedicated_host_group_test.go deleted file mode 100644 index 0888e81b0477..000000000000 --- a/internal/services/compute/parse/dedicated_host_group_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = DedicatedHostGroupId{} - -func TestDedicatedHostGroupIDFormatter(t *testing.T) { - actual := NewDedicatedHostGroupID("12345678-1234-9876-4563-123456789012", "resGroup1", "hostGroup1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestDedicatedHostGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DedicatedHostGroupId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing HostGroupName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/", - Error: true, - }, - - { - // missing value for HostGroupName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1", - Expected: &DedicatedHostGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "resGroup1", - HostGroupName: "hostGroup1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.COMPUTE/HOSTGROUPS/HOSTGROUP1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := DedicatedHostGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", 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.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.HostGroupName != v.Expected.HostGroupName { - t.Fatalf("Expected %q but got %q for HostGroupName", v.Expected.HostGroupName, actual.HostGroupName) - } - } -} diff --git a/internal/services/compute/parse/dedicated_host_test.go b/internal/services/compute/parse/dedicated_host_test.go deleted file mode 100644 index 13475856972c..000000000000 --- a/internal/services/compute/parse/dedicated_host_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = DedicatedHostId{} - -func TestDedicatedHostIDFormatter(t *testing.T) { - actual := NewDedicatedHostID("12345678-1234-9876-4563-123456789012", "resGroup1", "hostGroup1", "host1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1/hosts/host1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestDedicatedHostID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DedicatedHostId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing HostGroupName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/", - Error: true, - }, - - { - // missing value for HostGroupName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/", - Error: true, - }, - - { - // missing HostName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1/", - Error: true, - }, - - { - // missing value for HostName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1/hosts/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1/hosts/host1", - Expected: &DedicatedHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "resGroup1", - HostGroupName: "hostGroup1", - HostName: "host1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.COMPUTE/HOSTGROUPS/HOSTGROUP1/HOSTS/HOST1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := DedicatedHostID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", 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.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.HostGroupName != v.Expected.HostGroupName { - t.Fatalf("Expected %q but got %q for HostGroupName", v.Expected.HostGroupName, actual.HostGroupName) - } - if actual.HostName != v.Expected.HostName { - t.Fatalf("Expected %q but got %q for HostName", v.Expected.HostName, actual.HostName) - } - } -} diff --git a/internal/services/compute/resourceids.go b/internal/services/compute/resourceids.go index 313b8fd3177c..b73834a598d2 100644 --- a/internal/services/compute/resourceids.go +++ b/internal/services/compute/resourceids.go @@ -2,8 +2,6 @@ package compute //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=CapacityReservationGroup -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/capacityReservationGroups/capacityReservationGroup1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=CapacityReservation -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/capacityReservationGroups/capacityReservationGroup1/capacityReservations/capacityReservation1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=DedicatedHostGroup -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=DedicatedHost -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1/hosts/host1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=DiskEncryptionSet -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/diskEncryptionSets/set1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=GalleryApplication -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/galleries/gallery1/applications/galleryApplication1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=GalleryApplicationVersion -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/galleries/gallery1/applications/galleryApplication1/versions/galleryApplicationVersion1 diff --git a/internal/services/compute/validate/dedicated_host_group_id.go b/internal/services/compute/validate/dedicated_host_group_id.go deleted file mode 100644 index 94f6c944dcca..000000000000 --- a/internal/services/compute/validate/dedicated_host_group_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" -) - -func DedicatedHostGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.DedicatedHostGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/compute/validate/dedicated_host_group_id_test.go b/internal/services/compute/validate/dedicated_host_group_id_test.go deleted file mode 100644 index 2c2af34a70c0..000000000000 --- a/internal/services/compute/validate/dedicated_host_group_id_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestDedicatedHostGroupID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing HostGroupName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/", - Valid: false, - }, - - { - // missing value for HostGroupName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.COMPUTE/HOSTGROUPS/HOSTGROUP1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := DedicatedHostGroupID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/compute/validate/dedicated_host_id.go b/internal/services/compute/validate/dedicated_host_id.go deleted file mode 100644 index 2aaf7be23fd5..000000000000 --- a/internal/services/compute/validate/dedicated_host_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" -) - -func DedicatedHostID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := parse.DedicatedHostID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/compute/validate/dedicated_host_id_test.go b/internal/services/compute/validate/dedicated_host_id_test.go deleted file mode 100644 index 359fdd9f7cad..000000000000 --- a/internal/services/compute/validate/dedicated_host_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestDedicatedHostID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing HostGroupName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/", - Valid: false, - }, - - { - // missing value for HostGroupName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/", - Valid: false, - }, - - { - // missing HostName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1/", - Valid: false, - }, - - { - // missing value for HostName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1/hosts/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/hostGroup1/hosts/host1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.COMPUTE/HOSTGROUPS/HOSTGROUP1/HOSTS/HOST1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := DedicatedHostID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/compute/windows_virtual_machine_resource.go b/internal/services/compute/windows_virtual_machine_resource.go index 80d99e387c07..2f10c12b2340 100644 --- a/internal/services/compute/windows_virtual_machine_resource.go +++ b/internal/services/compute/windows_virtual_machine_resource.go @@ -12,6 +12,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" @@ -152,7 +154,7 @@ func resourceWindowsVirtualMachine() *pluginsdk.Resource { "dedicated_host_id": { Type: pluginsdk.TypeString, Optional: true, - ValidateFunc: computeValidate.DedicatedHostID, + ValidateFunc: dedicatedhosts.ValidateHostID, // the Compute/VM API is broken and returns the Resource Group name in UPPERCASE :shrug: // tracked by https://github.com/Azure/azure-rest-api-specs/issues/19424 DiffSuppressFunc: suppress.CaseDifference, @@ -164,7 +166,7 @@ func resourceWindowsVirtualMachine() *pluginsdk.Resource { "dedicated_host_group_id": { Type: pluginsdk.TypeString, Optional: true, - ValidateFunc: computeValidate.DedicatedHostGroupID, + ValidateFunc: dedicatedhostgroups.ValidateHostGroupID, // the Compute/VM API is broken and returns the Resource Group name in UPPERCASE // tracked by https://github.com/Azure/azure-rest-api-specs/issues/19424 DiffSuppressFunc: suppress.CaseDifference, diff --git a/internal/services/maintenance/maintenance_assignment_dedicated_host_resource.go b/internal/services/maintenance/maintenance_assignment_dedicated_host_resource.go index 12959c05d2a7..24ffd6fe0623 100644 --- a/internal/services/maintenance/maintenance_assignment_dedicated_host_resource.go +++ b/internal/services/maintenance/maintenance_assignment_dedicated_host_resource.go @@ -8,11 +8,10 @@ import ( "github.com/Azure/azure-sdk-for-go/services/maintenance/mgmt/2021-05-01/maintenance" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - parseCompute "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" - validateCompute "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/services/maintenance/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/maintenance/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -52,7 +51,7 @@ func resourceArmMaintenanceAssignmentDedicatedHost() *pluginsdk.Resource { Type: pluginsdk.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateCompute.DedicatedHostID, + ValidateFunc: dedicatedhosts.ValidateHostID, DiffSuppressFunc: suppress.CaseDifference, }, }, @@ -65,9 +64,9 @@ func resourceArmMaintenanceAssignmentDedicatedHostCreate(d *pluginsdk.ResourceDa defer cancel() dedicatedHostIdRaw := d.Get("dedicated_host_id").(string) - dedicatedHostId, _ := parseCompute.DedicatedHostID(dedicatedHostIdRaw) + dedicatedHostId, _ := dedicatedhosts.ParseHostID(dedicatedHostIdRaw) - existingList, err := getMaintenanceAssignmentDedicatedHost(ctx, client, dedicatedHostId, dedicatedHostIdRaw) + existingList, err := getMaintenanceAssignmentDedicatedHost(ctx, client, *dedicatedHostId, dedicatedHostIdRaw) if err != nil { return err } @@ -94,7 +93,7 @@ func resourceArmMaintenanceAssignmentDedicatedHostCreate(d *pluginsdk.ResourceDa // It may take a few minutes after starting a VM for it to become available to assign to a configuration err = pluginsdk.Retry(d.Timeout(pluginsdk.TimeoutCreate), func() *pluginsdk.RetryError { - if _, err := client.CreateOrUpdateParent(ctx, dedicatedHostId.ResourceGroup, "Microsoft.Compute", "hostGroups", dedicatedHostId.HostGroupName, "hosts", dedicatedHostId.HostName, assignmentName, configurationAssignment); err != nil { + if _, err := client.CreateOrUpdateParent(ctx, dedicatedHostId.ResourceGroupName, "Microsoft.Compute", "hostGroups", dedicatedHostId.HostGroupName, "hosts", dedicatedHostId.HostName, assignmentName, configurationAssignment); err != nil { if strings.Contains(err.Error(), "It may take a few minutes after starting a VM for it to become available to assign to a configuration") { return pluginsdk.RetryableError(fmt.Errorf("expected VM is available to assign to a configuration but was in pending state, retrying")) } @@ -107,7 +106,7 @@ func resourceArmMaintenanceAssignmentDedicatedHostCreate(d *pluginsdk.ResourceDa return err } - resp, err := getMaintenanceAssignmentDedicatedHost(ctx, client, dedicatedHostId, dedicatedHostIdRaw) + resp, err := getMaintenanceAssignmentDedicatedHost(ctx, client, *dedicatedHostId, dedicatedHostIdRaw) if err != nil { return err } @@ -146,11 +145,7 @@ func resourceArmMaintenanceAssignmentDedicatedHostRead(d *pluginsdk.ResourceData return fmt.Errorf("empty or nil ID of Maintenance Assignment (Dedicated Host ID: %q", id.DedicatedHostIdRaw) } - dedicatedHostId := "" - if id.DedicatedHostId != nil { - dedicatedHostId = id.DedicatedHostId.ID() - } - d.Set("dedicated_host_id", dedicatedHostId) + d.Set("dedicated_host_id", id.DedicatedHostId.ID()) if props := assignment.ConfigurationAssignmentProperties; props != nil { d.Set("maintenance_configuration_id", props.MaintenanceConfigurationID) @@ -168,15 +163,15 @@ func resourceArmMaintenanceAssignmentDedicatedHostDelete(d *pluginsdk.ResourceDa return err } - if _, err := client.DeleteParent(ctx, id.DedicatedHostId.ResourceGroup, "Microsoft.Compute", "hostGroups", id.DedicatedHostId.HostGroupName, "hosts", id.DedicatedHostId.HostName, id.Name); err != nil { + if _, err := client.DeleteParent(ctx, id.DedicatedHostId.ResourceGroupName, "Microsoft.Compute", "hostGroups", id.DedicatedHostId.HostGroupName, "hosts", id.DedicatedHostId.HostName, id.Name); err != nil { return fmt.Errorf("deleting Maintenance Assignment to resource %q: %+v", id.DedicatedHostIdRaw, err) } return nil } -func getMaintenanceAssignmentDedicatedHost(ctx context.Context, client *maintenance.ConfigurationAssignmentsClient, id *parseCompute.DedicatedHostId, dedicatedHostId string) (result *[]maintenance.ConfigurationAssignment, err error) { - resp, err := client.ListParent(ctx, id.ResourceGroup, "Microsoft.Compute", "hostGroups", id.HostGroupName, "hosts", id.HostName) +func getMaintenanceAssignmentDedicatedHost(ctx context.Context, client *maintenance.ConfigurationAssignmentsClient, id dedicatedhosts.HostId, dedicatedHostId string) (result *[]maintenance.ConfigurationAssignment, err error) { + resp, err := client.ListParent(ctx, id.ResourceGroupName, "Microsoft.Compute", "hostGroups", id.HostGroupName, "hosts", id.HostName) if err != nil { if !utils.ResponseWasNotFound(resp.Response) { err = fmt.Errorf("checking for presence of existing Maintenance assignment (Dedicated Host ID %q): %+v", dedicatedHostId, err) diff --git a/internal/services/maintenance/maintenance_assignment_dedicated_host_resource_test.go b/internal/services/maintenance/maintenance_assignment_dedicated_host_resource_test.go index 7693b4b1b826..175e5841536a 100644 --- a/internal/services/maintenance/maintenance_assignment_dedicated_host_resource_test.go +++ b/internal/services/maintenance/maintenance_assignment_dedicated_host_resource_test.go @@ -51,7 +51,7 @@ func (MaintenanceAssignmentDedicatedHostResource) Exists(ctx context.Context, cl return nil, err } - resp, err := clients.Maintenance.ConfigurationAssignmentsClient.ListParent(ctx, id.DedicatedHostId.ResourceGroup, "Microsoft.Compute", "hostGroups", id.DedicatedHostId.HostGroupName, "hosts", id.DedicatedHostId.HostName) + resp, err := clients.Maintenance.ConfigurationAssignmentsClient.ListParent(ctx, id.DedicatedHostId.ResourceGroupName, "Microsoft.Compute", "hostGroups", id.DedicatedHostId.HostGroupName, "hosts", id.DedicatedHostId.HostName) if err != nil { return nil, fmt.Errorf("retrieving Maintenance Assignment Dedicated Host (target resource id: %q): %v", id.DedicatedHostIdRaw, err) } diff --git a/internal/services/maintenance/parse/maintenance_assignment_dedicated_host.go b/internal/services/maintenance/parse/maintenance_assignment_dedicated_host.go index 1aeb0b31897c..0335b7f1d436 100644 --- a/internal/services/maintenance/parse/maintenance_assignment_dedicated_host.go +++ b/internal/services/maintenance/parse/maintenance_assignment_dedicated_host.go @@ -4,11 +4,11 @@ import ( "fmt" "regexp" - parseCompute "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts" ) type MaintenanceAssignmentDedicatedHostId struct { - DedicatedHostId *parseCompute.DedicatedHostId + DedicatedHostId dedicatedhosts.HostId DedicatedHostIdRaw string Name string } @@ -20,13 +20,13 @@ func MaintenanceAssignmentDedicatedHostID(input string) (*MaintenanceAssignmentD } targetResourceId, name := groups[1], groups[2] - dedicatedHostID, err := parseCompute.DedicatedHostID(targetResourceId) + dedicatedHostID, err := dedicatedhosts.ParseHostIDInsensitively(targetResourceId) if err != nil { return nil, fmt.Errorf("parsing Maintenance Assignment Dedicated Host ID: %q: Expected valid Dedicated Host ID", input) } return &MaintenanceAssignmentDedicatedHostId{ - DedicatedHostId: dedicatedHostID, + DedicatedHostId: *dedicatedHostID, DedicatedHostIdRaw: targetResourceId, Name: name, }, nil diff --git a/internal/services/maintenance/parse/maintenance_assignment_dedicated_host_test.go b/internal/services/maintenance/parse/maintenance_assignment_dedicated_host_test.go index 2c47d2a31039..1ef18a12f9e6 100644 --- a/internal/services/maintenance/parse/maintenance_assignment_dedicated_host_test.go +++ b/internal/services/maintenance/parse/maintenance_assignment_dedicated_host_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - parseCompute "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/parse" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts" ) func TestMaintenanceAssignmentDedicatedHostID(t *testing.T) { @@ -55,11 +55,11 @@ func TestMaintenanceAssignmentDedicatedHostID(t *testing.T) { Error: false, Expect: &MaintenanceAssignmentDedicatedHostId{ DedicatedHostIdRaw: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resGroup1/providers/microsoft.compute/hostGroups/group1/hosts/host1", - DedicatedHostId: &parseCompute.DedicatedHostId{ - SubscriptionId: "00000000-0000-0000-0000-000000000000", - ResourceGroup: "resGroup1", - HostGroupName: "group1", - HostName: "host1", + DedicatedHostId: dedicatedhosts.HostId{ + SubscriptionId: "00000000-0000-0000-0000-000000000000", + ResourceGroupName: "resGroup1", + HostGroupName: "group1", + HostName: "host1", }, Name: "assign1", }, diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/README.md new file mode 100644 index 000000000000..37ae6ce25fea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/README.md @@ -0,0 +1,128 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups` Documentation + +The `dedicatedhostgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-11-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/compute/2021-11-01/dedicatedhostgroups" +``` + + +### Client Initialization + +```go +client := dedicatedhostgroups.NewDedicatedHostGroupsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DedicatedHostGroupsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := dedicatedhostgroups.NewHostGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue") + +payload := dedicatedhostgroups.DedicatedHostGroup{ + // ... +} + + +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: `DedicatedHostGroupsClient.Delete` + +```go +ctx := context.TODO() +id := dedicatedhostgroups.NewHostGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue") + +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: `DedicatedHostGroupsClient.Get` + +```go +ctx := context.TODO() +id := dedicatedhostgroups.NewHostGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue") + +read, err := client.Get(ctx, id, dedicatedhostgroups.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DedicatedHostGroupsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := dedicatedhostgroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `DedicatedHostGroupsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := dedicatedhostgroups.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `DedicatedHostGroupsClient.Update` + +```go +ctx := context.TODO() +id := dedicatedhostgroups.NewHostGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue") + +payload := dedicatedhostgroups.DedicatedHostGroupUpdate{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/client.go new file mode 100644 index 000000000000..134a20c571b2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/client.go @@ -0,0 +1,18 @@ +package dedicatedhostgroups + +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 DedicatedHostGroupsClient struct { + Client autorest.Client + baseUri string +} + +func NewDedicatedHostGroupsClientWithBaseURI(endpoint string) DedicatedHostGroupsClient { + return DedicatedHostGroupsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/constants.go new file mode 100644 index 000000000000..6800a48d60e7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/constants.go @@ -0,0 +1,65 @@ +package dedicatedhostgroups + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceViewTypes string + +const ( + InstanceViewTypesInstanceView InstanceViewTypes = "instanceView" + InstanceViewTypesUserData InstanceViewTypes = "userData" +) + +func PossibleValuesForInstanceViewTypes() []string { + return []string{ + string(InstanceViewTypesInstanceView), + string(InstanceViewTypesUserData), + } +} + +func parseInstanceViewTypes(input string) (*InstanceViewTypes, error) { + vals := map[string]InstanceViewTypes{ + "instanceview": InstanceViewTypesInstanceView, + "userdata": InstanceViewTypesUserData, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := InstanceViewTypes(input) + return &out, nil +} + +type StatusLevelTypes string + +const ( + StatusLevelTypesError StatusLevelTypes = "Error" + StatusLevelTypesInfo StatusLevelTypes = "Info" + StatusLevelTypesWarning StatusLevelTypes = "Warning" +) + +func PossibleValuesForStatusLevelTypes() []string { + return []string{ + string(StatusLevelTypesError), + string(StatusLevelTypesInfo), + string(StatusLevelTypesWarning), + } +} + +func parseStatusLevelTypes(input string) (*StatusLevelTypes, error) { + vals := map[string]StatusLevelTypes{ + "error": StatusLevelTypesError, + "info": StatusLevelTypesInfo, + "warning": StatusLevelTypesWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusLevelTypes(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/id_hostgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/id_hostgroup.go new file mode 100644 index 000000000000..e6f1f64a3743 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/id_hostgroup.go @@ -0,0 +1,124 @@ +package dedicatedhostgroups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = HostGroupId{} + +// HostGroupId is a struct representing the Resource ID for a Host Group +type HostGroupId struct { + SubscriptionId string + ResourceGroupName string + HostGroupName string +} + +// NewHostGroupID returns a new HostGroupId struct +func NewHostGroupID(subscriptionId string, resourceGroupName string, hostGroupName string) HostGroupId { + return HostGroupId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + HostGroupName: hostGroupName, + } +} + +// ParseHostGroupID parses 'input' into a HostGroupId +func ParseHostGroupID(input string) (*HostGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(HostGroupId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := HostGroupId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.HostGroupName, ok = parsed.Parsed["hostGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'hostGroupName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseHostGroupIDInsensitively parses 'input' case-insensitively into a HostGroupId +// note: this method should only be used for API response data and not user input +func ParseHostGroupIDInsensitively(input string) (*HostGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(HostGroupId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := HostGroupId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.HostGroupName, ok = parsed.Parsed["hostGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'hostGroupName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateHostGroupID checks that 'input' can be parsed as a Host Group ID +func ValidateHostGroupID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseHostGroupID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Host Group ID +func (id HostGroupId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/hostGroups/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.HostGroupName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Host Group ID +func (id HostGroupId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), + resourceids.StaticSegment("staticHostGroups", "hostGroups", "hostGroups"), + resourceids.UserSpecifiedSegment("hostGroupName", "hostGroupValue"), + } +} + +// String returns a human-readable description of this Host Group ID +func (id HostGroupId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Host Group Name: %q", id.HostGroupName), + } + return fmt.Sprintf("Host Group (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_createorupdate_autorest.go new file mode 100644 index 000000000000..43753ae8f7a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package dedicatedhostgroups + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *DedicatedHostGroup +} + +// CreateOrUpdate ... +func (c DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, id HostGroupId, input DedicatedHostGroup) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c DedicatedHostGroupsClient) preparerForCreateOrUpdate(ctx context.Context, id HostGroupId, input DedicatedHostGroup) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c DedicatedHostGroupsClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_delete_autorest.go new file mode 100644 index 000000000000..d8eead37c12a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_delete_autorest.go @@ -0,0 +1,66 @@ +package dedicatedhostgroups + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 DedicatedHostGroupsClient) Delete(ctx context.Context, id HostGroupId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c DedicatedHostGroupsClient) preparerForDelete(ctx context.Context, id HostGroupId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c DedicatedHostGroupsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_get_autorest.go new file mode 100644 index 000000000000..d100587d001b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_get_autorest.go @@ -0,0 +1,97 @@ +package dedicatedhostgroups + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *DedicatedHostGroup +} + +type GetOperationOptions struct { + Expand *InstanceViewTypes +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o GetOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Expand != nil { + out["$expand"] = *o.Expand + } + + return out +} + +// Get ... +func (c DedicatedHostGroupsClient) Get(ctx context.Context, id HostGroupId, options GetOperationOptions) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c DedicatedHostGroupsClient) preparerForGet(ctx context.Context, id HostGroupId, options GetOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c DedicatedHostGroupsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_listbyresourcegroup_autorest.go new file mode 100644 index 000000000000..95b5f55a2a85 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_listbyresourcegroup_autorest.go @@ -0,0 +1,187 @@ +package dedicatedhostgroups + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + Model *[]DedicatedHostGroup + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListByResourceGroupOperationResponse, error) +} + +type ListByResourceGroupCompleteResult struct { + Items []DedicatedHostGroup +} + +func (r ListByResourceGroupOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp ListByResourceGroupOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// ListByResourceGroup ... +func (c DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroup(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListByResourceGroup", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListByResourceGroup(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListByResourceGroup", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListByResourceGroup prepares the ListByResourceGroup request. +func (c DedicatedHostGroupsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Compute/hostGroups", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListByResourceGroupWithNextLink prepares the ListByResourceGroup request with the given nextLink token. +func (c DedicatedHostGroupsClient) preparerForListByResourceGroupWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByResourceGroup handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (c DedicatedHostGroupsClient) responderForListByResourceGroup(resp *http.Response) (result ListByResourceGroupOperationResponse, err error) { + type page struct { + Values []DedicatedHostGroup `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroupWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListByResourceGroup", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByResourceGroup(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListByResourceGroup", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c DedicatedHostGroupsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DedicatedHostGroupOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DedicatedHostGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DedicatedHostGroupOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]DedicatedHostGroup, 0) + + page, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_listbysubscription_autorest.go new file mode 100644 index 000000000000..d1bf92328bfb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_listbysubscription_autorest.go @@ -0,0 +1,187 @@ +package dedicatedhostgroups + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + Model *[]DedicatedHostGroup + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListBySubscriptionOperationResponse, error) +} + +type ListBySubscriptionCompleteResult struct { + Items []DedicatedHostGroup +} + +func (r ListBySubscriptionOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListBySubscriptionOperationResponse) LoadMore(ctx context.Context) (resp ListBySubscriptionOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// ListBySubscription ... +func (c DedicatedHostGroupsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscription(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListBySubscription", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListBySubscription(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListBySubscription", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListBySubscription prepares the ListBySubscription request. +func (c DedicatedHostGroupsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Compute/hostGroups", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListBySubscriptionWithNextLink prepares the ListBySubscription request with the given nextLink token. +func (c DedicatedHostGroupsClient) preparerForListBySubscriptionWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListBySubscription handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (c DedicatedHostGroupsClient) responderForListBySubscription(resp *http.Response) (result ListBySubscriptionOperationResponse, err error) { + type page struct { + Values []DedicatedHostGroup `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscriptionWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListBySubscription", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListBySubscription(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "ListBySubscription", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c DedicatedHostGroupsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, DedicatedHostGroupOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c DedicatedHostGroupsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DedicatedHostGroupOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]DedicatedHostGroup, 0) + + page, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_update_autorest.go new file mode 100644 index 000000000000..368f672222b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/method_update_autorest.go @@ -0,0 +1,69 @@ +package dedicatedhostgroups + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + Model *DedicatedHostGroup +} + +// Update ... +func (c DedicatedHostGroupsClient) Update(ctx context.Context, id HostGroupId, input DedicatedHostGroupUpdate) (result UpdateOperationResponse, err error) { + req, err := c.preparerForUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "Update", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "Update", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhostgroups.DedicatedHostGroupsClient", "Update", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForUpdate prepares the Update request. +func (c DedicatedHostGroupsClient) preparerForUpdate(ctx context.Context, id HostGroupId, input DedicatedHostGroupUpdate) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForUpdate handles the response to the Update request. The method always +// closes the http.Response Body. +func (c DedicatedHostGroupsClient) responderForUpdate(resp *http.Response) (result UpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostallocatablevm.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostallocatablevm.go new file mode 100644 index 000000000000..eb95a66408c2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostallocatablevm.go @@ -0,0 +1,9 @@ +package dedicatedhostgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostAllocatableVM struct { + Count *float64 `json:"count,omitempty"` + VmSize *string `json:"vmSize,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostavailablecapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostavailablecapacity.go new file mode 100644 index 000000000000..645a995fd14b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostavailablecapacity.go @@ -0,0 +1,8 @@ +package dedicatedhostgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostAvailableCapacity struct { + AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroup.go new file mode 100644 index 000000000000..3c175527c0e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroup.go @@ -0,0 +1,14 @@ +package dedicatedhostgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostGroup struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *DedicatedHostGroupProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Zones *[]string `json:"zones,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupinstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupinstanceview.go new file mode 100644 index 000000000000..4f3f4179ea88 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupinstanceview.go @@ -0,0 +1,8 @@ +package dedicatedhostgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostGroupInstanceView struct { + Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupproperties.go new file mode 100644 index 000000000000..57f37cb87a9d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupproperties.go @@ -0,0 +1,11 @@ +package dedicatedhostgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostGroupProperties struct { + Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"` + InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"` + PlatformFaultDomainCount int64 `json:"platformFaultDomainCount"` + SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupupdate.go new file mode 100644 index 000000000000..4630d43c8456 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostgroupupdate.go @@ -0,0 +1,10 @@ +package dedicatedhostgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostGroupUpdate struct { + Properties *DedicatedHostGroupProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Zones *[]string `json:"zones,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostinstanceviewwithname.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostinstanceviewwithname.go new file mode 100644 index 000000000000..e8c322787600 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_dedicatedhostinstanceviewwithname.go @@ -0,0 +1,11 @@ +package dedicatedhostgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostInstanceViewWithName struct { + AssetId *string `json:"assetId,omitempty"` + AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` + Name *string `json:"name,omitempty"` + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_instanceviewstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_instanceviewstatus.go new file mode 100644 index 000000000000..74b66b61bc6b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_instanceviewstatus.go @@ -0,0 +1,30 @@ +package dedicatedhostgroups + +import ( + "time" + + "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 InstanceViewStatus struct { + Code *string `json:"code,omitempty"` + DisplayStatus *string `json:"displayStatus,omitempty"` + Level *StatusLevelTypes `json:"level,omitempty"` + Message *string `json:"message,omitempty"` + Time *string `json:"time,omitempty"` +} + +func (o *InstanceViewStatus) GetTimeAsTime() (*time.Time, error) { + if o.Time == nil { + return nil, nil + } + return dates.ParseAsFormat(o.Time, "2006-01-02T15:04:05Z07:00") +} + +func (o *InstanceViewStatus) SetTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.Time = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_subresourcereadonly.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_subresourcereadonly.go new file mode 100644 index 000000000000..9c5ae8726a88 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/model_subresourcereadonly.go @@ -0,0 +1,8 @@ +package dedicatedhostgroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubResourceReadOnly struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/predicates.go new file mode 100644 index 000000000000..34bfe81b4587 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/predicates.go @@ -0,0 +1,29 @@ +package dedicatedhostgroups + +type DedicatedHostGroupOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p DedicatedHostGroupOperationPredicate) Matches(input DedicatedHostGroup) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/version.go new file mode 100644 index 000000000000..788e7707a6b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/version.go @@ -0,0 +1,12 @@ +package dedicatedhostgroups + +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-11-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhostgroups/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/README.md new file mode 100644 index 000000000000..da7c59d40644 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts` Documentation + +The `dedicatedhosts` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-11-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/compute/2021-11-01/dedicatedhosts" +``` + + +### Client Initialization + +```go +client := dedicatedhosts.NewDedicatedHostsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DedicatedHostsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := dedicatedhosts.NewHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue", "hostValue") + +payload := dedicatedhosts.DedicatedHost{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DedicatedHostsClient.Delete` + +```go +ctx := context.TODO() +id := dedicatedhosts.NewHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue", "hostValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `DedicatedHostsClient.Get` + +```go +ctx := context.TODO() +id := dedicatedhosts.NewHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue", "hostValue") + +read, err := client.Get(ctx, id, dedicatedhosts.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DedicatedHostsClient.Update` + +```go +ctx := context.TODO() +id := dedicatedhosts.NewHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue", "hostValue") + +payload := dedicatedhosts.DedicatedHostUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/client.go new file mode 100644 index 000000000000..23417d2b3cc2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/client.go @@ -0,0 +1,18 @@ +package dedicatedhosts + +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 DedicatedHostsClient struct { + Client autorest.Client + baseUri string +} + +func NewDedicatedHostsClientWithBaseURI(endpoint string) DedicatedHostsClient { + return DedicatedHostsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/constants.go new file mode 100644 index 000000000000..686182ccc3e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/constants.go @@ -0,0 +1,96 @@ +package dedicatedhosts + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostLicenseTypes string + +const ( + DedicatedHostLicenseTypesNone DedicatedHostLicenseTypes = "None" + DedicatedHostLicenseTypesWindowsServerHybrid DedicatedHostLicenseTypes = "Windows_Server_Hybrid" + DedicatedHostLicenseTypesWindowsServerPerpetual DedicatedHostLicenseTypes = "Windows_Server_Perpetual" +) + +func PossibleValuesForDedicatedHostLicenseTypes() []string { + return []string{ + string(DedicatedHostLicenseTypesNone), + string(DedicatedHostLicenseTypesWindowsServerHybrid), + string(DedicatedHostLicenseTypesWindowsServerPerpetual), + } +} + +func parseDedicatedHostLicenseTypes(input string) (*DedicatedHostLicenseTypes, error) { + vals := map[string]DedicatedHostLicenseTypes{ + "none": DedicatedHostLicenseTypesNone, + "windows_server_hybrid": DedicatedHostLicenseTypesWindowsServerHybrid, + "windows_server_perpetual": DedicatedHostLicenseTypesWindowsServerPerpetual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DedicatedHostLicenseTypes(input) + return &out, nil +} + +type InstanceViewTypes string + +const ( + InstanceViewTypesInstanceView InstanceViewTypes = "instanceView" + InstanceViewTypesUserData InstanceViewTypes = "userData" +) + +func PossibleValuesForInstanceViewTypes() []string { + return []string{ + string(InstanceViewTypesInstanceView), + string(InstanceViewTypesUserData), + } +} + +func parseInstanceViewTypes(input string) (*InstanceViewTypes, error) { + vals := map[string]InstanceViewTypes{ + "instanceview": InstanceViewTypesInstanceView, + "userdata": InstanceViewTypesUserData, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := InstanceViewTypes(input) + return &out, nil +} + +type StatusLevelTypes string + +const ( + StatusLevelTypesError StatusLevelTypes = "Error" + StatusLevelTypesInfo StatusLevelTypes = "Info" + StatusLevelTypesWarning StatusLevelTypes = "Warning" +) + +func PossibleValuesForStatusLevelTypes() []string { + return []string{ + string(StatusLevelTypesError), + string(StatusLevelTypesInfo), + string(StatusLevelTypesWarning), + } +} + +func parseStatusLevelTypes(input string) (*StatusLevelTypes, error) { + vals := map[string]StatusLevelTypes{ + "error": StatusLevelTypesError, + "info": StatusLevelTypesInfo, + "warning": StatusLevelTypesWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusLevelTypes(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/id_host.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/id_host.go new file mode 100644 index 000000000000..027aa1b4eb7a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/id_host.go @@ -0,0 +1,137 @@ +package dedicatedhosts + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = HostId{} + +// HostId is a struct representing the Resource ID for a Host +type HostId struct { + SubscriptionId string + ResourceGroupName string + HostGroupName string + HostName string +} + +// NewHostID returns a new HostId struct +func NewHostID(subscriptionId string, resourceGroupName string, hostGroupName string, hostName string) HostId { + return HostId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + HostGroupName: hostGroupName, + HostName: hostName, + } +} + +// ParseHostID parses 'input' into a HostId +func ParseHostID(input string) (*HostId, error) { + parser := resourceids.NewParserFromResourceIdType(HostId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := HostId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.HostGroupName, ok = parsed.Parsed["hostGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'hostGroupName' was not found in the resource id %q", input) + } + + if id.HostName, ok = parsed.Parsed["hostName"]; !ok { + return nil, fmt.Errorf("the segment 'hostName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseHostIDInsensitively parses 'input' case-insensitively into a HostId +// note: this method should only be used for API response data and not user input +func ParseHostIDInsensitively(input string) (*HostId, error) { + parser := resourceids.NewParserFromResourceIdType(HostId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := HostId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.HostGroupName, ok = parsed.Parsed["hostGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'hostGroupName' was not found in the resource id %q", input) + } + + if id.HostName, ok = parsed.Parsed["hostName"]; !ok { + return nil, fmt.Errorf("the segment 'hostName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateHostID checks that 'input' can be parsed as a Host ID +func ValidateHostID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseHostID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Host ID +func (id HostId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/hostGroups/%s/hosts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.HostGroupName, id.HostName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Host ID +func (id HostId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), + resourceids.StaticSegment("staticHostGroups", "hostGroups", "hostGroups"), + resourceids.UserSpecifiedSegment("hostGroupName", "hostGroupValue"), + resourceids.StaticSegment("staticHosts", "hosts", "hosts"), + resourceids.UserSpecifiedSegment("hostName", "hostValue"), + } +} + +// String returns a human-readable description of this Host ID +func (id HostId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Host Group Name: %q", id.HostGroupName), + fmt.Sprintf("Host Name: %q", id.HostName), + } + return fmt.Sprintf("Host (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_createorupdate_autorest.go new file mode 100644 index 000000000000..7a949f91c987 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_createorupdate_autorest.go @@ -0,0 +1,79 @@ +package dedicatedhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// CreateOrUpdate ... +func (c DedicatedHostsClient) CreateOrUpdate(ctx context.Context, id HostId, input DedicatedHost) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhosts.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = c.senderForCreateOrUpdate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhosts.DedicatedHostsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c DedicatedHostsClient) CreateOrUpdateThenPoll(ctx context.Context, id HostId, input DedicatedHost) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c DedicatedHostsClient) preparerForCreateOrUpdate(ctx context.Context, id HostId, input DedicatedHost) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForCreateOrUpdate sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (c DedicatedHostsClient) senderForCreateOrUpdate(ctx context.Context, req *http.Request) (future CreateOrUpdateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_delete_autorest.go new file mode 100644 index 000000000000..9730b615da41 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_delete_autorest.go @@ -0,0 +1,78 @@ +package dedicatedhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// 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 { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Delete ... +func (c DedicatedHostsClient) Delete(ctx context.Context, id HostId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhosts.DedicatedHostsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = c.senderForDelete(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhosts.DedicatedHostsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c DedicatedHostsClient) DeleteThenPoll(ctx context.Context, id HostId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} + +// preparerForDelete prepares the Delete request. +func (c DedicatedHostsClient) preparerForDelete(ctx context.Context, id HostId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForDelete sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (c DedicatedHostsClient) senderForDelete(ctx context.Context, req *http.Request) (future DeleteOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_get_autorest.go new file mode 100644 index 000000000000..ff03643bbe77 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_get_autorest.go @@ -0,0 +1,97 @@ +package dedicatedhosts + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// 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 *DedicatedHost +} + +type GetOperationOptions struct { + Expand *InstanceViewTypes +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o GetOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Expand != nil { + out["$expand"] = *o.Expand + } + + return out +} + +// Get ... +func (c DedicatedHostsClient) Get(ctx context.Context, id HostId, options GetOperationOptions) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhosts.DedicatedHostsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhosts.DedicatedHostsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhosts.DedicatedHostsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c DedicatedHostsClient) preparerForGet(ctx context.Context, id HostId, options GetOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c DedicatedHostsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_update_autorest.go new file mode 100644 index 000000000000..be212b805b90 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/method_update_autorest.go @@ -0,0 +1,79 @@ +package dedicatedhosts + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Update ... +func (c DedicatedHostsClient) Update(ctx context.Context, id HostId, input DedicatedHostUpdate) (result UpdateOperationResponse, err error) { + req, err := c.preparerForUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhosts.DedicatedHostsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = c.senderForUpdate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "dedicatedhosts.DedicatedHostsClient", "Update", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c DedicatedHostsClient) UpdateThenPoll(ctx context.Context, id HostId, input DedicatedHostUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} + +// preparerForUpdate prepares the Update request. +func (c DedicatedHostsClient) preparerForUpdate(ctx context.Context, id HostId, input DedicatedHostUpdate) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForUpdate sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (c DedicatedHostsClient) senderForUpdate(ctx context.Context, req *http.Request) (future UpdateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhost.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhost.go new file mode 100644 index 000000000000..c5b706c12d85 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhost.go @@ -0,0 +1,14 @@ +package dedicatedhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHost struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *DedicatedHostProperties `json:"properties,omitempty"` + Sku Sku `json:"sku"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostallocatablevm.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostallocatablevm.go new file mode 100644 index 000000000000..62a06248b736 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostallocatablevm.go @@ -0,0 +1,9 @@ +package dedicatedhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostAllocatableVM struct { + Count *float64 `json:"count,omitempty"` + VmSize *string `json:"vmSize,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostavailablecapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostavailablecapacity.go new file mode 100644 index 000000000000..4a815b0460c1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostavailablecapacity.go @@ -0,0 +1,8 @@ +package dedicatedhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostAvailableCapacity struct { + AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostinstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostinstanceview.go new file mode 100644 index 000000000000..7574083ca0d7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostinstanceview.go @@ -0,0 +1,10 @@ +package dedicatedhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostInstanceView struct { + AssetId *string `json:"assetId,omitempty"` + AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostproperties.go new file mode 100644 index 000000000000..067483736a4c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostproperties.go @@ -0,0 +1,46 @@ +package dedicatedhosts + +import ( + "time" + + "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 DedicatedHostProperties struct { + AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"` + HostId *string `json:"hostId,omitempty"` + InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"` + LicenseType *DedicatedHostLicenseTypes `json:"licenseType,omitempty"` + PlatformFaultDomain *int64 `json:"platformFaultDomain,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ProvisioningTime *string `json:"provisioningTime,omitempty"` + TimeCreated *string `json:"timeCreated,omitempty"` + VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"` +} + +func (o *DedicatedHostProperties) GetProvisioningTimeAsTime() (*time.Time, error) { + if o.ProvisioningTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ProvisioningTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *DedicatedHostProperties) SetProvisioningTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ProvisioningTime = &formatted +} + +func (o *DedicatedHostProperties) GetTimeCreatedAsTime() (*time.Time, error) { + if o.TimeCreated == nil { + return nil, nil + } + return dates.ParseAsFormat(o.TimeCreated, "2006-01-02T15:04:05Z07:00") +} + +func (o *DedicatedHostProperties) SetTimeCreatedAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.TimeCreated = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostupdate.go new file mode 100644 index 000000000000..c2a21bb93d1c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_dedicatedhostupdate.go @@ -0,0 +1,9 @@ +package dedicatedhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DedicatedHostUpdate struct { + Properties *DedicatedHostProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_instanceviewstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_instanceviewstatus.go new file mode 100644 index 000000000000..fe3a89546ec6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_instanceviewstatus.go @@ -0,0 +1,30 @@ +package dedicatedhosts + +import ( + "time" + + "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 InstanceViewStatus struct { + Code *string `json:"code,omitempty"` + DisplayStatus *string `json:"displayStatus,omitempty"` + Level *StatusLevelTypes `json:"level,omitempty"` + Message *string `json:"message,omitempty"` + Time *string `json:"time,omitempty"` +} + +func (o *InstanceViewStatus) GetTimeAsTime() (*time.Time, error) { + if o.Time == nil { + return nil, nil + } + return dates.ParseAsFormat(o.Time, "2006-01-02T15:04:05Z07:00") +} + +func (o *InstanceViewStatus) SetTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.Time = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_sku.go new file mode 100644 index 000000000000..ce3dda6ffbe5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_sku.go @@ -0,0 +1,10 @@ +package dedicatedhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Capacity *int64 `json:"capacity,omitempty"` + Name *string `json:"name,omitempty"` + Tier *string `json:"tier,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_subresourcereadonly.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_subresourcereadonly.go new file mode 100644 index 000000000000..91dea24f8e1a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/model_subresourcereadonly.go @@ -0,0 +1,8 @@ +package dedicatedhosts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubResourceReadOnly struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/version.go new file mode 100644 index 000000000000..74e63de99bd9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/version.go @@ -0,0 +1,12 @@ +package dedicatedhosts + +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-11-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhosts/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 09e742f23a67..5b11f82b5b86 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -203,6 +203,8 @@ github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clus github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2021-04-30/cognitiveservicesaccounts github.com/hashicorp/go-azure-sdk/resource-manager/communication/2020-08-20/communicationservice github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets +github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups +github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/proximityplacementgroups github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger From 773c3e9b79384174519f02a3edd18b6c9174d2cb Mon Sep 17 00:00:00 2001 From: Matthew Frahry Date: Fri, 12 Aug 2022 17:02:50 -0700 Subject: [PATCH 100/100] Updating changelog for #17616 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 325d8d83dc2a..afca97b149f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ FEATURES: ENHANCEMENTS: +* updating `dedicated_host_*` to use `hashicorp/go-azure-sdk` [GH-17616] * Data Source: `azurerm_images` - now uses a logical id [GH-17766] * `azurerm_key_vault` - support for the `public_network_access_enabled` property [GH-17552] * `azurerm_mssql_elastic_pool` - support for the `maintenance_configuration_name` property [GH-17790]