From f7d72d3fee5db5fad7463f3b8c37118f0e64fea4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 27 Jun 2023 18:30:03 +0000 Subject: [PATCH] CodeGen from PR 23918 in Azure/azure-rest-api-specs Merge 55ceb904084f3c172ea73f9fbab037b75f566cbe into bc3238712f07c24028adaa4c8d879cce39348d47 --- .../storage/armstorage/CHANGELOG.md | 21 +- .../storage/armstorage/accounts_client.go | 230 +- .../accounts_client_example_test.go | 3761 ---------- .../storage/armstorage/autorest.md | 6 +- .../armstorage/blobcontainers_client.go | 58 +- .../blobcontainers_client_example_test.go | 844 --- .../blobinventorypolicies_client.go | 16 +- ...obinventorypolicies_client_example_test.go | 711 -- .../storage/armstorage/blobservices_client.go | 12 +- .../blobservices_client_example_test.go | 441 -- .../storage/armstorage/constants.go | 77 +- .../armstorage/deletedaccounts_client.go | 8 +- .../deletedaccounts_client_example_test.go | 102 - .../armstorage/encryptionscopes_client.go | 16 +- .../encryptionscopes_client_example_test.go | 216 - .../armstorage/fake/accounts_server.go | 95 + .../storage/armstorage/fileservices_client.go | 12 +- .../fileservices_client_example_test.go | 408 -- .../storage/armstorage/fileshares_client.go | 28 +- .../fileshares_client_example_test.go | 512 -- sdk/resourcemanager/storage/armstorage/go.mod | 2 +- .../storage/armstorage/localusers_client.go | 24 +- .../localusers_client_example_test.go | 303 - .../armstorage/managementpolicies_client.go | 12 +- .../managementpolicies_client_example_test.go | 1032 --- .../storage/armstorage/models.go | 127 +- .../storage/armstorage/models_serde.go | 240 + .../objectreplicationpolicies_client.go | 16 +- ...replicationpolicies_client_example_test.go | 382 - .../storage/armstorage/operations_client.go | 4 +- .../operations_client_example_test.go | 498 -- .../privateendpointconnections_client.go | 16 +- ...endpointconnections_client_example_test.go | 175 - .../armstorage/privatelinkresources_client.go | 4 +- ...rivatelinkresources_client_example_test.go | 113 - .../storage/armstorage/queue_client.go | 20 +- .../armstorage/queue_client_example_test.go | 207 - .../armstorage/queueservices_client.go | 12 +- .../queueservices_client_example_test.go | 298 - .../storage/armstorage/response_types.go | 10 + .../storage/armstorage/skus_client.go | 4 +- .../armstorage/skus_client_example_test.go | 6238 ----------------- .../storage/armstorage/table_client.go | 20 +- .../armstorage/table_client_example_test.go | 232 - .../armstorage/tableservices_client.go | 12 +- .../tableservices_client_example_test.go | 298 - .../storage/armstorage/usages_client.go | 4 +- .../armstorage/usages_client_example_test.go | 55 - 48 files changed, 903 insertions(+), 17029 deletions(-) delete mode 100644 sdk/resourcemanager/storage/armstorage/accounts_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/blobcontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/blobservices_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/deletedaccounts_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/encryptionscopes_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/fileservices_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/fileshares_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/localusers_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/managementpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/operations_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/privateendpointconnections_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/privatelinkresources_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/queue_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/queueservices_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/skus_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/table_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/tableservices_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/usages_client_example_test.go diff --git a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md index f6bfb1fcb5f3..cf3f9f4efaa8 100644 --- a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md +++ b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md @@ -1,10 +1,25 @@ # Release History -## 1.4.0-beta.1 (2023-06-12) - +## 1.4.0 (2023-06-27) ### Features Added -- Support for test fakes and OpenTelemetry trace spans. +- New value `CorsRuleAllowedMethodsItemCONNECT`, `CorsRuleAllowedMethodsItemTRACE` added to enum type `CorsRuleAllowedMethodsItem` +- New enum type `MigrationName` with values `MigrationNameDefault` +- New enum type `MigrationStatus` with values `MigrationStatusComplete`, `MigrationStatusFailed`, `MigrationStatusInProgress`, `MigrationStatusInvalid`, `MigrationStatusSubmittedForConversion` +- New enum type `PostFailoverRedundancy` with values `PostFailoverRedundancyStandardLRS`, `PostFailoverRedundancyStandardZRS` +- New enum type `PostPlannedFailoverRedundancy` with values `PostPlannedFailoverRedundancyStandardGRS`, `PostPlannedFailoverRedundancyStandardGZRS`, `PostPlannedFailoverRedundancyStandardRAGRS`, `PostPlannedFailoverRedundancyStandardRAGZRS` +- New function `*AccountsClient.BeginCustomerInitiatedMigration(context.Context, string, string, AccountMigration, *AccountsClientBeginCustomerInitiatedMigrationOptions) (*runtime.Poller[AccountsClientCustomerInitiatedMigrationResponse], error)` +- New function `*AccountsClient.GetCustomerInitiatedMigration(context.Context, string, string, MigrationName, *AccountsClientGetCustomerInitiatedMigrationOptions) (AccountsClientGetCustomerInitiatedMigrationResponse, error)` +- New struct `AccountMigration` +- New struct `AccountMigrationProperties` +- New struct `BlobInventoryCreationTime` +- New struct `ErrorAdditionalInfo` +- New struct `ErrorDetail` +- New struct `ErrorResponseAutoGenerated` +- New field `AccountMigrationInProgress`, `IsSKUConversionBlocked` in struct `AccountProperties` +- New field `CreationTime` in struct `BlobInventoryPolicyFilter` +- New field `CanPlannedFailover`, `PostFailoverRedundancy`, `PostPlannedFailoverRedundancy` in struct `GeoReplicationStats` + ## 1.3.0 (2023-03-27) ### Features Added diff --git a/sdk/resourcemanager/storage/armstorage/accounts_client.go b/sdk/resourcemanager/storage/armstorage/accounts_client.go index 9e1f4d1d34a2..d135df24e7f2 100644 --- a/sdk/resourcemanager/storage/armstorage/accounts_client.go +++ b/sdk/resourcemanager/storage/armstorage/accounts_client.go @@ -46,7 +46,7 @@ func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, // BeginAbortHierarchicalNamespaceMigration - Abort live Migration of storage account to enable Hns // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -70,7 +70,7 @@ func (client *AccountsClient) BeginAbortHierarchicalNamespaceMigration(ctx conte // AbortHierarchicalNamespaceMigration - Abort live Migration of storage account to enable Hns // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *AccountsClient) abortHierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginAbortHierarchicalNamespaceMigration" @@ -112,7 +112,7 @@ func (client *AccountsClient) abortHierarchicalNamespaceMigrationCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -121,7 +121,7 @@ func (client *AccountsClient) abortHierarchicalNamespaceMigrationCreateRequest(c // CheckNameAvailability - Checks that the storage account name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. // - options - AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability @@ -160,7 +160,7 @@ func (client *AccountsClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, accountName); err != nil { @@ -184,7 +184,7 @@ func (client *AccountsClient) checkNameAvailabilityHandleResponse(resp *http.Res // set of properties, the request will succeed. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -209,7 +209,7 @@ func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName // set of properties, the request will succeed. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *AccountsClient) create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters, options *AccountsClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginCreate" @@ -251,7 +251,92 @@ func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginCustomerInitiatedMigration - Account Migration request can be triggered for a storage account to change its redundancy +// level. The migration updates the non-zonal redundant storage account to a zonal redundant account or +// vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account +// synchronously across three Azure availability zones in the primary region. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-01-01 +// - 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. +// - parameters - The request parameters required to perform storage account migration. +// - options - AccountsClientBeginCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.BeginCustomerInitiatedMigration +// method. +func (client *AccountsClient) BeginCustomerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, parameters AccountMigration, options *AccountsClientBeginCustomerInitiatedMigrationOptions) (*runtime.Poller[AccountsClientCustomerInitiatedMigrationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.customerInitiatedMigration(ctx, resourceGroupName, accountName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientCustomerInitiatedMigrationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken[AccountsClientCustomerInitiatedMigrationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// CustomerInitiatedMigration - Account Migration request can be triggered for a storage account to change its redundancy +// level. The migration updates the non-zonal redundant storage account to a zonal redundant account or +// vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account +// synchronously across three Azure availability zones in the primary region. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-01-01 +func (client *AccountsClient) customerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, parameters AccountMigration, options *AccountsClientBeginCustomerInitiatedMigrationOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginCustomerInitiatedMigration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.customerInitiatedMigrationCreateRequest(ctx, resourceGroupName, accountName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// customerInitiatedMigrationCreateRequest creates the CustomerInitiatedMigration request. +func (client *AccountsClient) customerInitiatedMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, parameters AccountMigration, options *AccountsClientBeginCustomerInitiatedMigrationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -263,7 +348,7 @@ func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceG // Delete - Deletes a storage account in Microsoft Azure. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -309,7 +394,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -325,7 +410,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG // 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -356,7 +441,7 @@ func (client *AccountsClient) BeginFailover(ctx context.Context, resourceGroupNa // 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *AccountsClient) failover(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginFailoverOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginFailover" @@ -398,7 +483,7 @@ func (client *AccountsClient) failoverCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.FailoverType != nil { reqQP.Set("failoverType", "Planned") } @@ -406,11 +491,82 @@ func (client *AccountsClient) failoverCreateRequest(ctx context.Context, resourc return req, nil } +// GetCustomerInitiatedMigration - Gets the status of the ongoing migration for the specified storage account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-01-01 +// - 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. +// - migrationName - The name of the Storage Account Migration. It should always be 'default' +// - options - AccountsClientGetCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.GetCustomerInitiatedMigration +// method. +func (client *AccountsClient) GetCustomerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, migrationName MigrationName, options *AccountsClientGetCustomerInitiatedMigrationOptions) (AccountsClientGetCustomerInitiatedMigrationResponse, error) { + var err error + const operationName = "AccountsClient.GetCustomerInitiatedMigration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCustomerInitiatedMigrationCreateRequest(ctx, resourceGroupName, accountName, migrationName, options) + if err != nil { + return AccountsClientGetCustomerInitiatedMigrationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AccountsClientGetCustomerInitiatedMigrationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientGetCustomerInitiatedMigrationResponse{}, err + } + resp, err := client.getCustomerInitiatedMigrationHandleResponse(httpResp) + return resp, err +} + +// getCustomerInitiatedMigrationCreateRequest creates the GetCustomerInitiatedMigration request. +func (client *AccountsClient) getCustomerInitiatedMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, migrationName MigrationName, options *AccountsClientGetCustomerInitiatedMigrationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/accountMigrations/{migrationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if migrationName == "" { + return nil, errors.New("parameter migrationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationName}", url.PathEscape(string(migrationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCustomerInitiatedMigrationHandleResponse handles the GetCustomerInitiatedMigration response. +func (client *AccountsClient) getCustomerInitiatedMigrationHandleResponse(resp *http.Response) (AccountsClientGetCustomerInitiatedMigrationResponse, error) { + result := AccountsClientGetCustomerInitiatedMigrationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AccountMigration); err != nil { + return AccountsClientGetCustomerInitiatedMigrationResponse{}, err + } + return result, nil +} + // GetProperties - Returns the properties for the specified storage account including but not limited to name, SKU name, location, // and account status. The ListKeys operation should be used to retrieve storage keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -457,7 +613,7 @@ func (client *AccountsClient) getPropertiesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", string(*options.Expand)) } @@ -478,7 +634,7 @@ func (client *AccountsClient) getPropertiesHandleResponse(resp *http.Response) ( // BeginHierarchicalNamespaceMigration - Live Migration of storage account to enable Hns // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -505,7 +661,7 @@ func (client *AccountsClient) BeginHierarchicalNamespaceMigration(ctx context.Co // HierarchicalNamespaceMigration - Live Migration of storage account to enable Hns // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *AccountsClient) hierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, requestType string, options *AccountsClientBeginHierarchicalNamespaceMigrationOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginHierarchicalNamespaceMigration" @@ -547,7 +703,7 @@ func (client *AccountsClient) hierarchicalNamespaceMigrationCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") reqQP.Set("requestType", requestType) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -557,7 +713,7 @@ func (client *AccountsClient) hierarchicalNamespaceMigrationCreateRequest(ctx co // NewListPager - Lists all the storage accounts available under the subscription. Note that storage keys are not returned; // use the ListKeys operation for this. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method. func (client *AccountsClient) NewListPager(options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AccountsClientListResponse]{ @@ -601,7 +757,7 @@ func (client *AccountsClient) listCreateRequest(ctx context.Context, options *Ac return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -619,7 +775,7 @@ func (client *AccountsClient) listHandleResponse(resp *http.Response) (AccountsC // ListAccountSAS - List SAS credentials of a storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -667,7 +823,7 @@ func (client *AccountsClient) listAccountSASCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -688,7 +844,7 @@ func (client *AccountsClient) listAccountSASHandleResponse(resp *http.Response) // NewListByResourceGroupPager - Lists all the storage accounts available under the given resource group. Note that storage // keys are not returned; use the ListKeys operation for this. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - options - AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager // method. @@ -738,7 +894,7 @@ func (client *AccountsClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -756,7 +912,7 @@ func (client *AccountsClient) listByResourceGroupHandleResponse(resp *http.Respo // ListKeys - Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -803,7 +959,7 @@ func (client *AccountsClient) listKeysCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", "kerb") } @@ -824,7 +980,7 @@ func (client *AccountsClient) listKeysHandleResponse(resp *http.Response) (Accou // ListServiceSAS - List service SAS credentials of a specific resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -872,7 +1028,7 @@ func (client *AccountsClient) listServiceSASCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -893,7 +1049,7 @@ func (client *AccountsClient) listServiceSASHandleResponse(resp *http.Response) // RegenerateKey - Regenerates one of the access keys or Kerberos keys for the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -941,7 +1097,7 @@ func (client *AccountsClient) regenerateKeyCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, regenerateKey); err != nil { @@ -962,7 +1118,7 @@ func (client *AccountsClient) regenerateKeyHandleResponse(resp *http.Response) ( // BeginRestoreBlobRanges - Restore blobs in the specified blob ranges // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -987,7 +1143,7 @@ func (client *AccountsClient) BeginRestoreBlobRanges(ctx context.Context, resour // RestoreBlobRanges - Restore blobs in the specified blob ranges // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *AccountsClient) restoreBlobRanges(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters, options *AccountsClientBeginRestoreBlobRangesOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginRestoreBlobRanges" @@ -1029,7 +1185,7 @@ func (client *AccountsClient) restoreBlobRangesCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1041,7 +1197,7 @@ func (client *AccountsClient) restoreBlobRangesCreateRequest(ctx context.Context // RevokeUserDelegationKeys - Revoke user delegation keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -1088,7 +1244,7 @@ func (client *AccountsClient) revokeUserDelegationKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -1102,7 +1258,7 @@ func (client *AccountsClient) revokeUserDelegationKeysCreateRequest(ctx context. // location and name of the storage account cannot be changed after creation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -1150,7 +1306,7 @@ func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/accounts_client_example_test.go b/sdk/resourcemanager/storage/armstorage/accounts_client_example_test.go deleted file mode 100644 index 997cdeff51b2..000000000000 --- a/sdk/resourcemanager/storage/armstorage/accounts_client_example_test.go +++ /dev/null @@ -1,3761 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCheckNameAvailability.json -func ExampleAccountsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().CheckNameAvailability(ctx, armstorage.AccountCheckNameAvailabilityParameters{ - Name: to.Ptr("sto3363"), - Type: to.Ptr("Microsoft.Storage/storageAccounts"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameAvailabilityResult = armstorage.CheckNameAvailabilityResult{ - // NameAvailable: to.Ptr(true), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/NfsV3AccountCreate.json -func ExampleAccountsClient_BeginCreate_nfsV3AccountCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Kind: to.Ptr(armstorage.KindBlockBlobStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - IsHnsEnabled: to.Ptr(true), - EnableNfsV3: to.Ptr(true), - NetworkRuleSet: &armstorage.NetworkRuleSet{ - Bypass: to.Ptr(armstorage.BypassAzureServices), - DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - IPRules: []*armstorage.IPRule{}, - VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - { - VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"), - }}, - }, - EnableHTTPSTrafficOnly: to.Ptr(false), - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNamePremiumLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Kind: to.Ptr(armstorage.KindBlockBlobStorage), - // Properties: &armstorage.AccountProperties{ - // IsHnsEnabled: to.Ptr(true), - // EnableNfsV3: to.Ptr(true), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // { - // VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"), - // }}, - // }, - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreate.json -func ExampleAccountsClient_BeginCreate_storageAccountCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - DefaultToOAuthAuthentication: to.Ptr(false), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - IsSftpEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSftpEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateAllowedCopyScopeToAAD.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateAllowedCopyScopeToAad() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateAllowedCopyScopeToPrivateLink.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateAllowedCopyScopeToPrivateLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopePrivateLink), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopePrivateLink), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateDisallowPublicNetworkAccess.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateDisallowPublicNetworkAccess() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateDnsEndpointTypeToAzureDnsZone() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - DefaultToOAuthAuthentication: to.Ptr(false), - DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeAzureDNSZone), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - IsSftpEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeAzureDNSZone), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSftpEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.z24.blob.storage.azure.net/"), - // Dfs: to.Ptr("https://sto4445.z24.dfs.storage.azure.net/"), - // File: to.Ptr("https://sto4445.z24.file.storage.azure.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.z24.blob.storage.azure.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.z24.dfs.storage.azure.net/"), - // File: to.Ptr("https://sto4445-internetrouting.z24.file.storage.azure.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.z24.web.storage.azure.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.z24.blob.storage.azure.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.z24.dfs.storage.azure.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.z24.file.storage.azure.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.z24.queue.storage.azure.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.z24.table.storage.azure.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.z24.web.storage.azure.net/"), - // }, - // Queue: to.Ptr("https://sto4445.z24.queue.storage.azure.net/"), - // Table: to.Ptr("https://sto4445.z24.table.storage.azure.net/"), - // Web: to.Ptr("https://sto4445.z24.web.storage.azure.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateDnsEndpointTypeToStandard.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateDnsEndpointTypeToStandard() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - DefaultToOAuthAuthentication: to.Ptr(false), - DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeStandard), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - IsSftpEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeStandard), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSftpEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateEnablePublicNetworkAccess.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateEnablePublicNetworkAccess() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessEnabled), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessEnabled), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreatePremiumBlockBlobStorage.json -func ExampleAccountsClient_BeginCreate_storageAccountCreatePremiumBlockBlobStorage() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Kind: to.Ptr(armstorage.KindBlockBlobStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowSharedKeyAccess: to.Ptr(true), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNamePremiumLRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierPremium), - // AllowBlobPublicAccess: to.Ptr(false), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateUserAssignedEncryptionIdentityWithCmk() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Identity: &armstorage.Identity{ - Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, - }, - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - Encryption: &armstorage.Encryption{ - EncryptionIdentity: &armstorage.EncryptionIdentity{ - EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - }, - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ - // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), - // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), - // }, - // }, - // }, - // Kind: to.Ptr(armstorage.KindStorageV2), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierHot), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.0839093Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // EncryptionIdentity: &armstorage.EncryptionIdentity{ - // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - // }, - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // }, - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res131918", "sto131918", armstorage.AccountCreateParameters{ - Identity: &armstorage.Identity{ - Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, - }, - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - Encryption: &armstorage.Encryption{ - EncryptionIdentity: &armstorage.EncryptionIdentity{ - EncryptionFederatedIdentityClientID: to.Ptr("f83c6b1b-4d34-47e4-bb34-9d83df58b540"), - EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - }, - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ - // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), - // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), - // }, - // }, - // }, - // Kind: to.Ptr(armstorage.KindStorageV2), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierHot), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.0839093Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // EncryptionIdentity: &armstorage.EncryptionIdentity{ - // EncryptionFederatedIdentityClientID: to.Ptr("f83c6b1b-4d34-47e4-bb34-9d83df58b540"), - // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - // }, - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // }, - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateWithImmutabilityPolicy.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateWithImmutabilityPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ - Enabled: to.Ptr(true), - ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ - AllowProtectedAppendWrites: to.Ptr(true), - ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), - State: to.Ptr(armstorage.AccountImmutabilityPolicyStateUnlocked), - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ - // Enabled: to.Ptr(true), - // ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ - // AllowProtectedAppendWrites: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), - // State: to.Ptr(armstorage.AccountImmutabilityPolicyStateUnlocked), - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountDelete.json -func ExampleAccountsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewAccountsClient().Delete(ctx, "res4228", "sto2434", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountGetAsyncSkuConversionStatus.json -func ExampleAccountsClient_GetProperties_storageAccountGetAsyncSkuConversionStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus"), - // Kind: to.Ptr(armstorage.KindStorageV2), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // StorageAccountSKUConversionStatus: &armstorage.AccountSKUConversionStatus{ - // EndTime: to.Ptr("2021-09-02T02:53:39.0932539Z"), - // SKUConversionStatus: to.Ptr(armstorage.SKUConversionStatusInProgress), - // StartTime: to.Ptr("2022-09-01T02:53:39.0932539Z"), - // TargetSKUName: to.Ptr(armstorage.SKUNameStandardGRS), - // }, - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountGetProperties.json -func ExampleAccountsClient_GetProperties_storageAccountGetProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); return t}()), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountGetPropertiesCMKEnabled.json -func ExampleAccountsClient_GetProperties_storageAccountGetPropertiesCmkEnabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); return t}()), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountGetPropertiesCMKVersionExpirationTime.json -func ExampleAccountsClient_GetProperties_storageAccountGetPropertiesCmkVersionExpirationTime() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyExpirationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); return t}()), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountEnableAD.json -func ExampleAccountsClient_Update_storageAccountEnableAd() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - AzureFilesIdentityBasedAuthentication: &armstorage.AzureFilesIdentityBasedAuthentication{ - ActiveDirectoryProperties: &armstorage.ActiveDirectoryProperties{ - AccountType: to.Ptr(armstorage.ActiveDirectoryPropertiesAccountTypeUser), - AzureStorageSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252-0012"), - DomainGUID: to.Ptr("aebfc118-9fa9-4732-a21f-d98e41a77ae1"), - DomainName: to.Ptr("adtest.com"), - DomainSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252"), - ForestName: to.Ptr("adtest.com"), - NetBiosDomainName: to.Ptr("adtest.com"), - SamAccountName: to.Ptr("sam12498"), - }, - DirectoryServiceOptions: to.Ptr(armstorage.DirectoryServiceOptionsAD), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AzureFilesIdentityBasedAuthentication: &armstorage.AzureFilesIdentityBasedAuthentication{ - // ActiveDirectoryProperties: &armstorage.ActiveDirectoryProperties{ - // AccountType: to.Ptr(armstorage.ActiveDirectoryPropertiesAccountTypeUser), - // AzureStorageSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252-0012"), - // DomainGUID: to.Ptr("aebfc118-9fa9-4732-a21f-d98e41a77ae1"), - // DomainName: to.Ptr("adtest.com"), - // DomainSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252"), - // ForestName: to.Ptr("adtest.com"), - // NetBiosDomainName: to.Ptr("adtest.com"), - // SamAccountName: to.Ptr("sam12498"), - // }, - // DirectoryServiceOptions: to.Ptr(armstorage.DirectoryServiceOptionsAD), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountEnableCMK.json -func ExampleAccountsClient_Update_storageAccountEnableCmk() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountUpdate.json -func ExampleAccountsClient_Update_storageAccountUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - DefaultToOAuthAuthentication: to.Ptr(false), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsLocalUserEnabled: to.Ptr(true), - IsSftpEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - NetworkRuleSet: &armstorage.NetworkRuleSet{ - DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - ResourceAccessRules: []*armstorage.ResourceAccessRule{ - { - ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - }}, - }, - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // IsLocalUserEnabled: to.Ptr(true), - // IsSftpEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountUpdateAllowedCopyScopeToAAD.json -func ExampleAccountsClient_Update_storageAccountUpdateAllowedCopyScopeToAad() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - NetworkRuleSet: &armstorage.NetworkRuleSet{ - DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - ResourceAccessRules: []*armstorage.ResourceAccessRule{ - { - ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - }}, - }, - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountUpdateDisablePublicNetworkAccess.json -func ExampleAccountsClient_Update_storageAccountUpdateDisablePublicNetworkAccess() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - NetworkRuleSet: &armstorage.NetworkRuleSet{ - DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - ResourceAccessRules: []*armstorage.ResourceAccessRule{ - { - ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - }}, - }, - PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json -func ExampleAccountsClient_Update_storageAccountUpdateUserAssignedEncryptionIdentityWithCmk() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9101", "sto4445", armstorage.AccountUpdateParameters{ - Identity: &armstorage.Identity{ - Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, - }, - }, - Kind: to.Ptr(armstorage.KindStorage), - Properties: &armstorage.AccountPropertiesUpdateParameters{ - Encryption: &armstorage.Encryption{ - EncryptionIdentity: &armstorage.EncryptionIdentity{ - EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - }, - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ - // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), - // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), - // }, - // }, - // }, - // Kind: to.Ptr(armstorage.KindStorageV2), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierHot), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.0839093Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // EncryptionIdentity: &armstorage.EncryptionIdentity{ - // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - // }, - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // }, - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json -func ExampleAccountsClient_Update_storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res131918", "sto131918", armstorage.AccountUpdateParameters{ - Identity: &armstorage.Identity{ - Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, - }, - }, - Kind: to.Ptr(armstorage.KindStorage), - Properties: &armstorage.AccountPropertiesUpdateParameters{ - Encryption: &armstorage.Encryption{ - EncryptionIdentity: &armstorage.EncryptionIdentity{ - EncryptionFederatedIdentityClientID: to.Ptr("3109d1c4-a5de-4d84-8832-feabb916a4b6"), - EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - }, - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ - // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), - // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), - // }, - // }, - // }, - // Kind: to.Ptr(armstorage.KindStorageV2), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierHot), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.0839093Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // EncryptionIdentity: &armstorage.EncryptionIdentity{ - // EncryptionFederatedIdentityClientID: to.Ptr("3109d1c4-a5de-4d84-8832-feabb916a4b6"), - // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - // }, - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // }, - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountUpdateWithImmutabilityPolicy.json -func ExampleAccountsClient_Update_storageAccountUpdateWithImmutabilityPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ - Enabled: to.Ptr(true), - ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ - AllowProtectedAppendWrites: to.Ptr(true), - ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), - State: to.Ptr(armstorage.AccountImmutabilityPolicyStateLocked), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ - // Enabled: to.Ptr(true), - // ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ - // AllowProtectedAppendWrites: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), - // State: to.Ptr(armstorage.AccountImmutabilityPolicyStateLocked), - // }, - // }, - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountList.json -func ExampleAccountsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAccountsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AccountListResult = armstorage.AccountListResult{ - // Value: []*armstorage.Account{ - // { - // Name: to.Ptr("sto1125"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res2627/providers/Microsoft.Storage/storageAccounts/sto1125"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:28:53.4540398Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto1125.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto1125.dfs.core.windows.net/"), - // File: to.Ptr("https://sto1125.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto1125-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto1125-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto1125-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto1125-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto1125-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto1125-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto1125-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto1125-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto1125-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto1125-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto1125.queue.core.windows.net/"), - // Table: to.Ptr("https://sto1125.table.core.windows.net/"), - // Web: to.Ptr("https://sto1125.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto3699"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto3699"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("356d057d-cba5-44dd-8a30-b2e547bc416b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:06:30.6093014Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto3699.blob.core.windows.net/"), - // File: to.Ptr("https://sto3699.file.core.windows.net/"), - // Queue: to.Ptr("https://sto3699.queue.core.windows.net/"), - // Table: to.Ptr("https://sto3699.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); return t}()), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto6637"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto6637"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:09:39.5625175Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto6637.blob.core.windows.net/"), - // File: to.Ptr("https://sto6637.file.core.windows.net/"), - // Queue: to.Ptr("https://sto6637.queue.core.windows.net/"), - // Table: to.Ptr("https://sto6637.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto834"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res8186/providers/Microsoft.Storage/storageAccounts/sto834"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:28:20.8686541Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto834.blob.core.windows.net/"), - // File: to.Ptr("https://sto834.file.core.windows.net/"), - // Queue: to.Ptr("https://sto834.queue.core.windows.net/"), - // Table: to.Ptr("https://sto834.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto9174"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto9174"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("933e3ddf-1802-4a51-9469-18a33b576f88"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T09:46:19.6556989Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto9174.blob.core.windows.net/"), - // File: to.Ptr("https://sto9174.file.core.windows.net/"), - // Queue: to.Ptr("https://sto9174.queue.core.windows.net/"), - // Table: to.Ptr("https://sto9174.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountListByResourceGroup.json -func ExampleAccountsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAccountsClient().NewListByResourceGroupPager("res6117", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AccountListResult = armstorage.AccountListResult{ - // Value: []*armstorage.Account{ - // { - // Name: to.Ptr("sto4036"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4036"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:24:47.818801Z"); return t}()), - // IsHnsEnabled: to.Ptr(true), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4036.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4036.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4036.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4036.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4036.table.core.windows.net/"), - // Web: to.Ptr("https://sto4036.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto4452"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4452"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:24:15.7068366Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4452.blob.core.windows.net/"), - // File: to.Ptr("https://sto4452.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4452.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4452.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountListKeys.json -func ExampleAccountsClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().ListKeys(ctx, "res418", "sto2220", &armstorage.AccountsClientListKeysOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AccountListKeysResult = armstorage.AccountListKeysResult{ - // Keys: []*armstorage.AccountKey{ - // { - // KeyName: to.Ptr("key1"), - // Permissions: to.Ptr(armstorage.KeyPermissionFull), - // Value: to.Ptr(""), - // }, - // { - // KeyName: to.Ptr("key2"), - // Permissions: to.Ptr(armstorage.KeyPermissionFull), - // Value: to.Ptr(""), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountRegenerateKerbKey.json -func ExampleAccountsClient_RegenerateKey_storageAccountRegenerateKerbKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().RegenerateKey(ctx, "res4167", "sto3539", armstorage.AccountRegenerateKeyParameters{ - KeyName: to.Ptr("kerb1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AccountListKeysResult = armstorage.AccountListKeysResult{ - // Keys: []*armstorage.AccountKey{ - // { - // KeyName: to.Ptr("key1"), - // Permissions: to.Ptr(armstorage.KeyPermissionFull), - // Value: to.Ptr(""), - // }, - // { - // KeyName: to.Ptr("key2"), - // Permissions: to.Ptr(armstorage.KeyPermissionFull), - // Value: to.Ptr(""), - // }, - // { - // KeyName: to.Ptr("kerb1"), - // Permissions: to.Ptr(armstorage.KeyPermissionFull), - // Value: to.Ptr(""), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountRegenerateKey.json -func ExampleAccountsClient_RegenerateKey_storageAccountRegenerateKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().RegenerateKey(ctx, "res4167", "sto3539", armstorage.AccountRegenerateKeyParameters{ - KeyName: to.Ptr("key2"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AccountListKeysResult = armstorage.AccountListKeysResult{ - // Keys: []*armstorage.AccountKey{ - // { - // KeyName: to.Ptr("key1"), - // Permissions: to.Ptr(armstorage.KeyPermissionFull), - // Value: to.Ptr(""), - // }, - // { - // KeyName: to.Ptr("key2"), - // Permissions: to.Ptr(armstorage.KeyPermissionFull), - // Value: to.Ptr(""), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountListAccountSAS.json -func ExampleAccountsClient_ListAccountSAS() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().ListAccountSAS(ctx, "res7985", "sto8588", armstorage.AccountSasParameters{ - KeyToSign: to.Ptr("key1"), - SharedAccessExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T11:42:03.1567373Z"); return t }()), - Permissions: to.Ptr(armstorage.PermissionsR), - Protocols: to.Ptr(armstorage.HTTPProtocolHTTPSHTTP), - ResourceTypes: to.Ptr(armstorage.SignedResourceTypesS), - Services: to.Ptr(armstorage.ServicesB), - SharedAccessStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:42:03.1567373Z"); return t }()), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListAccountSasResponse = armstorage.ListAccountSasResponse{ - // AccountSasToken: to.Ptr("sv=2015-04-05&ss=b&srt=s&sp=r&st=2017-05-24T10%3A42%3A03Z&se=2017-05-24T11%3A42%3A03Z&spr=https,http&sig=Z0I%2BEpM%2BPPlTC8ApfUf%2BcffO2aahMgZim3U0iArqsS0%3D"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountListServiceSAS.json -func ExampleAccountsClient_ListServiceSAS() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().ListServiceSAS(ctx, "res7439", "sto1299", armstorage.ServiceSasParameters{ - CanonicalizedResource: to.Ptr("/blob/sto1299/music"), - SharedAccessExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T11:32:48.8457197Z"); return t }()), - Permissions: to.Ptr(armstorage.PermissionsL), - Resource: to.Ptr(armstorage.SignedResourceC), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListServiceSasResponse = armstorage.ListServiceSasResponse{ - // ServiceSasToken: to.Ptr("sv=2015-04-05&sr=c&se=2017-05-24T11%3A32%3A48Z&sp=l&sig=PoF8yBUGixsjzwroLmw7vG3VbGz4KB2woZC2D4C2oio%3D"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountFailover.json -func ExampleAccountsClient_BeginFailover_storageAccountFailover() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginFailover(ctx, "res4228", "sto2434", &armstorage.AccountsClientBeginFailoverOptions{FailoverType: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountFailoverPlanned.json -func ExampleAccountsClient_BeginFailover_storageAccountFailoverPlanned() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginFailover(ctx, "res4228", "sto2434", &armstorage.AccountsClientBeginFailoverOptions{FailoverType: to.Ptr("Planned")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountHierarchicalNamespaceMigration.json -func ExampleAccountsClient_BeginHierarchicalNamespaceMigration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginHierarchicalNamespaceMigration(ctx, "res4228", "sto2434", "HnsOnValidationRequest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json -func ExampleAccountsClient_BeginAbortHierarchicalNamespaceMigration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginAbortHierarchicalNamespaceMigration(ctx, "res4228", "sto2434", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobRangesRestore.json -func ExampleAccountsClient_BeginRestoreBlobRanges() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginRestoreBlobRanges(ctx, "res9101", "sto4445", armstorage.BlobRestoreParameters{ - BlobRanges: []*armstorage.BlobRestoreRange{ - { - EndRange: to.Ptr("container/blobpath2"), - StartRange: to.Ptr("container/blobpath1"), - }, - { - EndRange: to.Ptr(""), - StartRange: to.Ptr("container2/blobpath3"), - }}, - TimeToRestore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-20T15:30:00.0000000Z"); return t }()), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobRestoreStatus = armstorage.BlobRestoreStatus{ - // Parameters: &armstorage.BlobRestoreParameters{ - // BlobRanges: []*armstorage.BlobRestoreRange{ - // { - // EndRange: to.Ptr("container/blobpath2"), - // StartRange: to.Ptr("container/blobpath1"), - // }, - // { - // EndRange: to.Ptr(""), - // StartRange: to.Ptr("container2/blobpath3"), - // }}, - // TimeToRestore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-20T15:30:00.0000000Z"); return t}()), - // }, - // RestoreID: to.Ptr("{restore_id}"), - // Status: to.Ptr(armstorage.BlobRestoreProgressStatus("Succeeded")), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountRevokeUserDelegationKeys.json -func ExampleAccountsClient_RevokeUserDelegationKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewAccountsClient().RevokeUserDelegationKeys(ctx, "res4167", "sto3539", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/storage/armstorage/autorest.md b/sdk/resourcemanager/storage/armstorage/autorest.md index bdccfd3a0d64..bee3f28bdb52 100644 --- a/sdk/resourcemanager/storage/armstorage/autorest.md +++ b/sdk/resourcemanager/storage/armstorage/autorest.md @@ -5,11 +5,11 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/storage/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/storage/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION module: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage -module-version: 1.4.0-beta.1 +module-version: 1.4.0 azcore-version: 1.7.0-beta.2 generate-fakes: true inject-spans: true diff --git a/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go b/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go index 42a0a4fa6f06..baf54356a13b 100644 --- a/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go +++ b/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go @@ -47,7 +47,7 @@ func NewBlobContainersClient(subscriptionID string, credential azcore.TokenCrede // clears out only the specified tags in the request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -103,7 +103,7 @@ func (client *BlobContainersClient) clearLegalHoldCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, legalHold); err != nil { @@ -126,7 +126,7 @@ func (client *BlobContainersClient) clearLegalHoldHandleResponse(resp *http.Resp // contained by the container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -181,7 +181,7 @@ func (client *BlobContainersClient) createCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, blobContainer); err != nil { @@ -203,7 +203,7 @@ func (client *BlobContainersClient) createHandleResponse(resp *http.Response) (B // but not required for this operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -259,7 +259,7 @@ func (client *BlobContainersClient) createOrUpdateImmutabilityPolicyCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} @@ -289,7 +289,7 @@ func (client *BlobContainersClient) createOrUpdateImmutabilityPolicyHandleRespon // Delete - Deletes specified container under its account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -342,7 +342,7 @@ func (client *BlobContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -353,7 +353,7 @@ func (client *BlobContainersClient) deleteCreateRequest(ctx context.Context, res // container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -412,7 +412,7 @@ func (client *BlobContainersClient) deleteImmutabilityPolicyCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} @@ -435,7 +435,7 @@ func (client *BlobContainersClient) deleteImmutabilityPolicyHandleResponse(resp // allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -493,7 +493,7 @@ func (client *BlobContainersClient) extendImmutabilityPolicyCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} @@ -521,7 +521,7 @@ func (client *BlobContainersClient) extendImmutabilityPolicyHandleResponse(resp // Get - Gets properties of a specified container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -575,7 +575,7 @@ func (client *BlobContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -594,7 +594,7 @@ func (client *BlobContainersClient) getHandleResponse(resp *http.Response) (Blob // body. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -650,7 +650,7 @@ func (client *BlobContainersClient) getImmutabilityPolicyCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} @@ -675,7 +675,7 @@ func (client *BlobContainersClient) getImmutabilityPolicyHandleResponse(resp *ht // can be 15 to 60 seconds, or can be infinite. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -729,7 +729,7 @@ func (client *BlobContainersClient) leaseCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -753,7 +753,7 @@ func (client *BlobContainersClient) leaseHandleResponse(resp *http.Response) (Bl // NewListPager - Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation // token. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -808,7 +808,7 @@ func (client *BlobContainersClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", *options.Maxpagesize) } @@ -836,7 +836,7 @@ func (client *BlobContainersClient) listHandleResponse(resp *http.Response) (Blo // action. ETag in If-Match is required for this operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -894,7 +894,7 @@ func (client *BlobContainersClient) lockImmutabilityPolicyCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} @@ -918,7 +918,7 @@ func (client *BlobContainersClient) lockImmutabilityPolicyHandleResponse(resp *h // unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -947,7 +947,7 @@ func (client *BlobContainersClient) BeginObjectLevelWorm(ctx context.Context, re // unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *BlobContainersClient) objectLevelWorm(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientBeginObjectLevelWormOptions) (*http.Response, error) { var err error const operationName = "BlobContainersClient.BeginObjectLevelWorm" @@ -993,7 +993,7 @@ func (client *BlobContainersClient) objectLevelWormCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1003,7 +1003,7 @@ func (client *BlobContainersClient) objectLevelWormCreateRequest(ctx context.Con // pattern and does not clear out the existing tags that are not specified in the request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -1059,7 +1059,7 @@ func (client *BlobContainersClient) setLegalHoldCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, legalHold); err != nil { @@ -1081,7 +1081,7 @@ func (client *BlobContainersClient) setLegalHoldHandleResponse(resp *http.Respon // Update fails if the specified container doesn't already exist. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -1136,7 +1136,7 @@ func (client *BlobContainersClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, blobContainer); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/blobcontainers_client_example_test.go b/sdk/resourcemanager/storage/armstorage/blobcontainers_client_example_test.go deleted file mode 100644 index f0e4fcc2a087..000000000000 --- a/sdk/resourcemanager/storage/armstorage/blobcontainers_client_example_test.go +++ /dev/null @@ -1,844 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersList.json -func ExampleBlobContainersClient_NewListPager_listContainers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBlobContainersClient().NewListPager("res9290", "sto1590", &armstorage.BlobContainersClientListOptions{Maxpagesize: nil, - Filter: nil, - Include: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListContainerItems = armstorage.ListContainerItems{ - // Value: []*armstorage.ListContainerItem{ - // { - // Name: to.Ptr("container1644"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644"), - // Etag: to.Ptr("\"0x8D589847D51C7DE\""), - // Properties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(false), - // HasLegalHold: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // PublicAccess: to.Ptr(armstorage.PublicAccessContainer), - // }, - // }, - // { - // Name: to.Ptr("container4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(false), - // HasLegalHold: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/DeletedBlobContainersList.json -func ExampleBlobContainersClient_NewListPager_listDeletedContainers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBlobContainersClient().NewListPager("res9290", "sto1590", &armstorage.BlobContainersClientListOptions{Maxpagesize: nil, - Filter: nil, - Include: to.Ptr(armstorage.ListContainersIncludeDeleted), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListContainerItems = armstorage.ListContainerItems{ - // Value: []*armstorage.ListContainerItem{ - // { - // Name: to.Ptr("container1644"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644"), - // Etag: to.Ptr("\"0x8D589847D51C7DE\""), - // Properties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(false), - // HasLegalHold: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // PublicAccess: to.Ptr(armstorage.PublicAccessContainer), - // }, - // }, - // { - // Name: to.Ptr("container4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.ContainerProperties{ - // Deleted: to.Ptr(true), - // DeletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-14T08:20:47Z"); return t}()), - // HasImmutabilityPolicy: to.Ptr(false), - // HasLegalHold: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateExpired), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // RemainingRetentionDays: to.Ptr[int32](30), - // Version: to.Ptr("1234567890"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersPutDefaultEncryptionScope.json -func ExampleBlobContainersClient_Create_putContainerWithDefaultEncryptionScope() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Create(ctx, "res3376", "sto328", "container6185", armstorage.BlobContainer{ - ContainerProperties: &armstorage.ContainerProperties{ - DefaultEncryptionScope: to.Ptr("encryptionscope185"), - DenyEncryptionScopeOverride: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobContainer = armstorage.BlobContainer{ - // Name: to.Ptr("container6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185"), - // ContainerProperties: &armstorage.ContainerProperties{ - // DefaultEncryptionScope: to.Ptr("encryptionscope185"), - // DenyEncryptionScopeOverride: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersPutObjectLevelWorm.json -func ExampleBlobContainersClient_Create_putContainerWithObjectLevelWorm() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Create(ctx, "res3376", "sto328", "container6185", armstorage.BlobContainer{ - ContainerProperties: &armstorage.ContainerProperties{ - ImmutableStorageWithVersioning: &armstorage.ImmutableStorageWithVersioning{ - Enabled: to.Ptr(true), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobContainer = armstorage.BlobContainer{ - // Name: to.Ptr("container6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185"), - // ContainerProperties: &armstorage.ContainerProperties{ - // ImmutableStorageWithVersioning: &armstorage.ImmutableStorageWithVersioning{ - // Enabled: to.Ptr(true), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersPut.json -func ExampleBlobContainersClient_Create_putContainers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Create(ctx, "res3376", "sto328", "container6185", armstorage.BlobContainer{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobContainer = armstorage.BlobContainer{ - // Name: to.Ptr("container6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersPatch.json -func ExampleBlobContainersClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Update(ctx, "res3376", "sto328", "container6185", armstorage.BlobContainer{ - ContainerProperties: &armstorage.ContainerProperties{ - Metadata: map[string]*string{ - "metadata": to.Ptr("true"), - }, - PublicAccess: to.Ptr(armstorage.PublicAccessContainer), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobContainer = armstorage.BlobContainer{ - // Name: to.Ptr("container6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185"), - // ContainerProperties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(false), - // HasLegalHold: to.Ptr(false), - // Metadata: map[string]*string{ - // "metadata": to.Ptr("true"), - // }, - // PublicAccess: to.Ptr(armstorage.PublicAccessContainer), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json -func ExampleBlobContainersClient_Get_getBlobContainersGetWithAllowProtectedAppendWritesAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Get(ctx, "res9871", "sto6217", "container1634", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobContainer = armstorage.BlobContainer{ - // Name: to.Ptr("container1634"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634"), - // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), - // ContainerProperties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(true), - // HasLegalHold: to.Ptr(true), - // ImmutabilityPolicy: &armstorage.ImmutabilityPolicyProperties{ - // Etag: to.Ptr("\"8d592d74cb3011a\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // AllowProtectedAppendWritesAll: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), - // }, - // UpdateHistory: []*armstorage.UpdateHistoryProperty{ - // { - // AllowProtectedAppendWritesAll: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:11.431403Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypePut), - // }, - // { - // AllowProtectedAppendWritesAll: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:13.0907641Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeLock), - // }, - // { - // AllowProtectedAppendWritesAll: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.7097716Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeExtend), - // }}, - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // LegalHold: &armstorage.LegalHoldProperties{ - // HasLegalHold: to.Ptr(true), - // ProtectedAppendWritesHistory: &armstorage.ProtectedAppendWritesHistory{ - // AllowProtectedAppendWritesAll: to.Ptr(true), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-01T01:58:44.5044483Z"); return t}()), - // }, - // Tags: []*armstorage.TagProperty{ - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag1"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }, - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag2"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }, - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag3"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }}, - // }, - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersGet.json -func ExampleBlobContainersClient_Get_getContainers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Get(ctx, "res9871", "sto6217", "container1634", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobContainer = armstorage.BlobContainer{ - // Name: to.Ptr("container1634"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634"), - // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), - // ContainerProperties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(true), - // HasLegalHold: to.Ptr(true), - // ImmutabilityPolicy: &armstorage.ImmutabilityPolicyProperties{ - // Etag: to.Ptr("\"8d592d74cb3011a\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), - // }, - // UpdateHistory: []*armstorage.UpdateHistoryProperty{ - // { - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:11.431403Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypePut), - // }, - // { - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:13.0907641Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeLock), - // }, - // { - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.7097716Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeExtend), - // }}, - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // LegalHold: &armstorage.LegalHoldProperties{ - // HasLegalHold: to.Ptr(true), - // Tags: []*armstorage.TagProperty{ - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag1"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }, - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag2"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }, - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag3"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }}, - // }, - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersDelete.json -func ExampleBlobContainersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewBlobContainersClient().Delete(ctx, "res4079", "sto4506", "container9689", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersSetLegalHold.json -func ExampleBlobContainersClient_SetLegalHold_setLegalHoldContainers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().SetLegalHold(ctx, "res4303", "sto7280", "container8723", armstorage.LegalHold{ - Tags: []*string{ - to.Ptr("tag1"), - to.Ptr("tag2"), - to.Ptr("tag3")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LegalHold = armstorage.LegalHold{ - // HasLegalHold: to.Ptr(true), - // Tags: []*string{ - // to.Ptr("tag1"), - // to.Ptr("tag2"), - // to.Ptr("tag3")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json -func ExampleBlobContainersClient_SetLegalHold_setLegalHoldContainersWithAllowProtectedAppendWritesAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().SetLegalHold(ctx, "res4303", "sto7280", "container8723", armstorage.LegalHold{ - AllowProtectedAppendWritesAll: to.Ptr(true), - Tags: []*string{ - to.Ptr("tag1"), - to.Ptr("tag2"), - to.Ptr("tag3")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LegalHold = armstorage.LegalHold{ - // AllowProtectedAppendWritesAll: to.Ptr(true), - // HasLegalHold: to.Ptr(true), - // Tags: []*string{ - // to.Ptr("tag1"), - // to.Ptr("tag2"), - // to.Ptr("tag3")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersClearLegalHold.json -func ExampleBlobContainersClient_ClearLegalHold() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().ClearLegalHold(ctx, "res4303", "sto7280", "container8723", armstorage.LegalHold{ - Tags: []*string{ - to.Ptr("tag1"), - to.Ptr("tag2"), - to.Ptr("tag3")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LegalHold = armstorage.LegalHold{ - // HasLegalHold: to.Ptr(false), - // Tags: []*string{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersPutImmutabilityPolicy.json -func ExampleBlobContainersClient_CreateOrUpdateImmutabilityPolicy_createOrUpdateImmutabilityPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().CreateOrUpdateImmutabilityPolicy(ctx, "res1782", "sto7069", "container6397", &armstorage.BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions{IfMatch: nil, - Parameters: &armstorage.ImmutabilityPolicy{ - Properties: &armstorage.ImmutabilityPolicyProperty{ - AllowProtectedAppendWrites: to.Ptr(true), - ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default"), - // Etag: to.Ptr("\"8d59f830cb130e5\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // AllowProtectedAppendWrites: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateUnlocked), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json -func ExampleBlobContainersClient_CreateOrUpdateImmutabilityPolicy_createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().CreateOrUpdateImmutabilityPolicy(ctx, "res1782", "sto7069", "container6397", &armstorage.BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions{IfMatch: nil, - Parameters: &armstorage.ImmutabilityPolicy{ - Properties: &armstorage.ImmutabilityPolicyProperty{ - AllowProtectedAppendWritesAll: to.Ptr(true), - ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default"), - // Etag: to.Ptr("\"8d59f830cb130e5\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // AllowProtectedAppendWritesAll: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateUnlocked), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersGetImmutabilityPolicy.json -func ExampleBlobContainersClient_GetImmutabilityPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().GetImmutabilityPolicy(ctx, "res5221", "sto9177", "container3489", &armstorage.BlobContainersClientGetImmutabilityPolicyOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res5221/providers/Microsoft.Storage/storageAccounts/sto9177/blobServices/default/containers/container3489/immutabilityPolicies/default"), - // Etag: to.Ptr("\"8d59f828e64b75c\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // AllowProtectedAppendWrites: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](5), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateUnlocked), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersDeleteImmutabilityPolicy.json -func ExampleBlobContainersClient_DeleteImmutabilityPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().DeleteImmutabilityPolicy(ctx, "res1581", "sto9621", "container4910", "\"8d59f81a7fa7be0\"", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res1581/providers/Microsoft.Storage/storageAccounts/sto9621/blobServices/default/containers/container4910/immutabilityPolicies/default"), - // Etag: to.Ptr("\"8d59f81a87b40c0\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](0), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateUnlocked), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersLockImmutabilityPolicy.json -func ExampleBlobContainersClient_LockImmutabilityPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().LockImmutabilityPolicy(ctx, "res2702", "sto5009", "container1631", "\"8d59f825b721dd3\"", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res2702/providers/Microsoft.Storage/storageAccounts/sto5009/blobServices/default/containers/container1631/immutabilityPolicies/default"), - // Etag: to.Ptr("\"8d57a8a5edb084a\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersExtendImmutabilityPolicy.json -func ExampleBlobContainersClient_ExtendImmutabilityPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().ExtendImmutabilityPolicy(ctx, "res6238", "sto232", "container5023", "\"8d59f830d0c3bf9\"", &armstorage.BlobContainersClientExtendImmutabilityPolicyOptions{Parameters: &armstorage.ImmutabilityPolicy{ - Properties: &armstorage.ImmutabilityPolicyProperty{ - ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6238/providers/Microsoft.Storage/storageAccounts/sto232/blobServices/default/containers/container5023/immutabilityPolicies/default"), - // Etag: to.Ptr("\"8d57a8b2ff50332\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersLease_Acquire.json -func ExampleBlobContainersClient_Lease_acquireALeaseOnAContainer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Lease(ctx, "res3376", "sto328", "container6185", &armstorage.BlobContainersClientLeaseOptions{Parameters: &armstorage.LeaseContainerRequest{ - Action: to.Ptr(armstorage.LeaseContainerRequestActionAcquire), - LeaseDuration: to.Ptr[int32](-1), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LeaseContainerResponse = armstorage.LeaseContainerResponse{ - // LeaseID: to.Ptr("8698f513-fa75-44a1-b8eb-30ba336af27d"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobContainersLease_Break.json -func ExampleBlobContainersClient_Lease_breakALeaseOnAContainer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Lease(ctx, "res3376", "sto328", "container6185", &armstorage.BlobContainersClientLeaseOptions{Parameters: &armstorage.LeaseContainerRequest{ - Action: to.Ptr(armstorage.LeaseContainerRequestActionBreak), - LeaseID: to.Ptr("8698f513-fa75-44a1-b8eb-30ba336af27d"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LeaseContainerResponse = armstorage.LeaseContainerResponse{ - // LeaseTimeSeconds: to.Ptr("0"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/ObjectLevelWormContainerMigration.json -func ExampleBlobContainersClient_BeginObjectLevelWorm() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBlobContainersClient().BeginObjectLevelWorm(ctx, "res1782", "sto7069", "container6397", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client.go b/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client.go index a6eae10fd1b7..661016d958bb 100644 --- a/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client.go +++ b/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client.go @@ -46,7 +46,7 @@ func NewBlobInventoryPoliciesClient(subscriptionID string, credential azcore.Tok // CreateOrUpdate - Sets the blob inventory policy to the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -100,7 +100,7 @@ func (client *BlobInventoryPoliciesClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { @@ -121,7 +121,7 @@ func (client *BlobInventoryPoliciesClient) createOrUpdateHandleResponse(resp *ht // Delete - Deletes the blob inventory policy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -173,7 +173,7 @@ func (client *BlobInventoryPoliciesClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +182,7 @@ func (client *BlobInventoryPoliciesClient) deleteCreateRequest(ctx context.Conte // Get - Gets the blob inventory policy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -235,7 +235,7 @@ func (client *BlobInventoryPoliciesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -252,7 +252,7 @@ func (client *BlobInventoryPoliciesClient) getHandleResponse(resp *http.Response // NewListPager - Gets the blob inventory policy associated with the specified storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -302,7 +302,7 @@ func (client *BlobInventoryPoliciesClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client_example_test.go b/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client_example_test.go deleted file mode 100644 index 46c03973fb8a..000000000000 --- a/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client_example_test.go +++ /dev/null @@ -1,711 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountGetBlobInventoryPolicy.json -func ExampleBlobInventoryPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobInventoryPoliciesClient().Get(ctx, "res7687", "sto9699", armstorage.BlobInventoryPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobInventoryPolicy = armstorage.BlobInventoryPolicy{ - // Name: to.Ptr("DefaultInventoryPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), - // Properties: &armstorage.BlobInventoryPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-05T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.BlobInventoryPolicySchema{ - // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - // Enabled: to.Ptr(true), - // Rules: []*armstorage.BlobInventoryPolicyRule{ - // { - // Name: to.Ptr("inventoryPolicyRule1"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatCSV), - // Filters: &armstorage.BlobInventoryPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob"), - // to.Ptr("pageBlob")}, - // IncludeBlobVersions: to.Ptr(true), - // IncludeSnapshots: to.Ptr(true), - // PrefixMatch: []*string{ - // to.Ptr("inventoryprefix1"), - // to.Ptr("inventoryprefix2")}, - // }, - // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - // Schedule: to.Ptr(armstorage.ScheduleDaily), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Creation-Time"), - // to.Ptr("Last-Modified"), - // to.Ptr("Content-Length"), - // to.Ptr("Content-MD5"), - // to.Ptr("BlobType"), - // to.Ptr("AccessTier"), - // to.Ptr("AccessTierChangeTime"), - // to.Ptr("Snapshot"), - // to.Ptr("VersionId"), - // to.Ptr("IsCurrentVersion"), - // to.Ptr("Metadata")}, - // }, - // Destination: to.Ptr("container1"), - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetBlobInventoryPolicy.json -func ExampleBlobInventoryPoliciesClient_CreateOrUpdate_storageAccountSetBlobInventoryPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobInventoryPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.BlobInventoryPolicyNameDefault, armstorage.BlobInventoryPolicy{ - Properties: &armstorage.BlobInventoryPolicyProperties{ - Policy: &armstorage.BlobInventoryPolicySchema{ - Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - Enabled: to.Ptr(true), - Rules: []*armstorage.BlobInventoryPolicyRule{ - { - Name: to.Ptr("inventoryPolicyRule1"), - Definition: &armstorage.BlobInventoryPolicyDefinition{ - Format: to.Ptr(armstorage.FormatCSV), - Filters: &armstorage.BlobInventoryPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob"), - to.Ptr("appendBlob"), - to.Ptr("pageBlob")}, - ExcludePrefix: []*string{ - to.Ptr("excludeprefix1"), - to.Ptr("excludeprefix2")}, - IncludeBlobVersions: to.Ptr(true), - IncludeSnapshots: to.Ptr(true), - PrefixMatch: []*string{ - to.Ptr("inventoryprefix1"), - to.Ptr("inventoryprefix2")}, - }, - ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - Schedule: to.Ptr(armstorage.ScheduleDaily), - SchemaFields: []*string{ - to.Ptr("Name"), - to.Ptr("Creation-Time"), - to.Ptr("Last-Modified"), - to.Ptr("Content-Length"), - to.Ptr("Content-MD5"), - to.Ptr("BlobType"), - to.Ptr("AccessTier"), - to.Ptr("AccessTierChangeTime"), - to.Ptr("Snapshot"), - to.Ptr("VersionId"), - to.Ptr("IsCurrentVersion"), - to.Ptr("Metadata")}, - }, - Destination: to.Ptr("container1"), - Enabled: to.Ptr(true), - }, - { - Name: to.Ptr("inventoryPolicyRule2"), - Definition: &armstorage.BlobInventoryPolicyDefinition{ - Format: to.Ptr(armstorage.FormatParquet), - ObjectType: to.Ptr(armstorage.ObjectTypeContainer), - Schedule: to.Ptr(armstorage.ScheduleWeekly), - SchemaFields: []*string{ - to.Ptr("Name"), - to.Ptr("Last-Modified"), - to.Ptr("Metadata"), - to.Ptr("LeaseStatus"), - to.Ptr("LeaseState"), - to.Ptr("LeaseDuration"), - to.Ptr("PublicAccess"), - to.Ptr("HasImmutabilityPolicy"), - to.Ptr("HasLegalHold")}, - }, - Destination: to.Ptr("container2"), - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobInventoryPolicy = armstorage.BlobInventoryPolicy{ - // Name: to.Ptr("DefaultInventoryPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), - // Properties: &armstorage.BlobInventoryPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-05T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.BlobInventoryPolicySchema{ - // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - // Enabled: to.Ptr(true), - // Rules: []*armstorage.BlobInventoryPolicyRule{ - // { - // Name: to.Ptr("inventoryPolicyRule1"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatCSV), - // Filters: &armstorage.BlobInventoryPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob"), - // to.Ptr("pageBlob")}, - // ExcludePrefix: []*string{ - // to.Ptr("excludeprefix1"), - // to.Ptr("excludeprefix2")}, - // IncludeBlobVersions: to.Ptr(true), - // IncludeSnapshots: to.Ptr(true), - // PrefixMatch: []*string{ - // to.Ptr("inventoryprefix1"), - // to.Ptr("inventoryprefix2")}, - // }, - // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - // Schedule: to.Ptr(armstorage.ScheduleDaily), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Creation-Time"), - // to.Ptr("Last-Modified"), - // to.Ptr("Content-Length"), - // to.Ptr("Content-MD5"), - // to.Ptr("BlobType"), - // to.Ptr("AccessTier"), - // to.Ptr("AccessTierChangeTime"), - // to.Ptr("Snapshot"), - // to.Ptr("VersionId"), - // to.Ptr("IsCurrentVersion"), - // to.Ptr("Metadata")}, - // }, - // Destination: to.Ptr("container1"), - // Enabled: to.Ptr(true), - // }, - // { - // Name: to.Ptr("inventoryPolicyRule2"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatParquet), - // ObjectType: to.Ptr(armstorage.ObjectTypeContainer), - // Schedule: to.Ptr(armstorage.ScheduleWeekly), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Last-Modified"), - // to.Ptr("Metadata"), - // to.Ptr("LeaseStatus"), - // to.Ptr("LeaseState"), - // to.Ptr("LeaseDuration"), - // to.Ptr("PublicAccess"), - // to.Ptr("HasImmutabilityPolicy"), - // to.Ptr("HasLegalHold")}, - // }, - // Destination: to.Ptr("container2"), - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json -func ExampleBlobInventoryPoliciesClient_CreateOrUpdate_storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobInventoryPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.BlobInventoryPolicyNameDefault, armstorage.BlobInventoryPolicy{ - Properties: &armstorage.BlobInventoryPolicyProperties{ - Policy: &armstorage.BlobInventoryPolicySchema{ - Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - Enabled: to.Ptr(true), - Rules: []*armstorage.BlobInventoryPolicyRule{ - { - Name: to.Ptr("inventoryPolicyRule1"), - Definition: &armstorage.BlobInventoryPolicyDefinition{ - Format: to.Ptr(armstorage.FormatCSV), - Filters: &armstorage.BlobInventoryPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob"), - to.Ptr("appendBlob"), - to.Ptr("pageBlob")}, - ExcludePrefix: []*string{ - to.Ptr("excludeprefix1"), - to.Ptr("excludeprefix2")}, - IncludeBlobVersions: to.Ptr(true), - IncludeDeleted: to.Ptr(true), - IncludeSnapshots: to.Ptr(true), - PrefixMatch: []*string{ - to.Ptr("inventoryprefix1"), - to.Ptr("inventoryprefix2")}, - }, - ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - Schedule: to.Ptr(armstorage.ScheduleDaily), - SchemaFields: []*string{ - to.Ptr("Name"), - to.Ptr("Creation-Time"), - to.Ptr("Last-Modified"), - to.Ptr("Content-Length"), - to.Ptr("Content-MD5"), - to.Ptr("BlobType"), - to.Ptr("AccessTier"), - to.Ptr("AccessTierChangeTime"), - to.Ptr("Snapshot"), - to.Ptr("VersionId"), - to.Ptr("IsCurrentVersion"), - to.Ptr("ContentType"), - to.Ptr("ContentEncoding"), - to.Ptr("ContentLanguage"), - to.Ptr("ContentCRC64"), - to.Ptr("CacheControl"), - to.Ptr("Metadata"), - to.Ptr("DeletionId"), - to.Ptr("Deleted"), - to.Ptr("DeletedTime"), - to.Ptr("RemainingRetentionDays")}, - }, - Destination: to.Ptr("container1"), - Enabled: to.Ptr(true), - }, - { - Name: to.Ptr("inventoryPolicyRule2"), - Definition: &armstorage.BlobInventoryPolicyDefinition{ - Format: to.Ptr(armstorage.FormatParquet), - ObjectType: to.Ptr(armstorage.ObjectTypeContainer), - Schedule: to.Ptr(armstorage.ScheduleWeekly), - SchemaFields: []*string{ - to.Ptr("Name"), - to.Ptr("Last-Modified"), - to.Ptr("Metadata"), - to.Ptr("LeaseStatus"), - to.Ptr("LeaseState"), - to.Ptr("LeaseDuration"), - to.Ptr("PublicAccess"), - to.Ptr("HasImmutabilityPolicy"), - to.Ptr("HasLegalHold"), - to.Ptr("Etag"), - to.Ptr("DefaultEncryptionScope"), - to.Ptr("DenyEncryptionScopeOverride"), - to.Ptr("ImmutableStorageWithVersioningEnabled"), - to.Ptr("Deleted"), - to.Ptr("Version"), - to.Ptr("DeletedTime"), - to.Ptr("RemainingRetentionDays")}, - }, - Destination: to.Ptr("container2"), - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobInventoryPolicy = armstorage.BlobInventoryPolicy{ - // Name: to.Ptr("DefaultInventoryPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), - // Properties: &armstorage.BlobInventoryPolicyProperties{ - // Policy: &armstorage.BlobInventoryPolicySchema{ - // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - // Enabled: to.Ptr(true), - // Rules: []*armstorage.BlobInventoryPolicyRule{ - // { - // Name: to.Ptr("inventoryPolicyRule1"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatCSV), - // Filters: &armstorage.BlobInventoryPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob"), - // to.Ptr("pageBlob")}, - // ExcludePrefix: []*string{ - // to.Ptr("excludeprefix1"), - // to.Ptr("excludeprefix2")}, - // IncludeBlobVersions: to.Ptr(true), - // IncludeDeleted: to.Ptr(true), - // IncludeSnapshots: to.Ptr(true), - // PrefixMatch: []*string{ - // to.Ptr("inventoryprefix1"), - // to.Ptr("inventoryprefix2")}, - // }, - // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - // Schedule: to.Ptr(armstorage.ScheduleDaily), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Creation-Time"), - // to.Ptr("Last-Modified"), - // to.Ptr("Content-Length"), - // to.Ptr("Content-MD5"), - // to.Ptr("BlobType"), - // to.Ptr("AccessTier"), - // to.Ptr("AccessTierChangeTime"), - // to.Ptr("Snapshot"), - // to.Ptr("VersionId"), - // to.Ptr("IsCurrentVersion"), - // to.Ptr("ContentType"), - // to.Ptr("ContentEncoding"), - // to.Ptr("ContentLanguage"), - // to.Ptr("ContentCRC64"), - // to.Ptr("CacheControl"), - // to.Ptr("Metadata"), - // to.Ptr("DeletionId"), - // to.Ptr("Deleted"), - // to.Ptr("DeletedTime"), - // to.Ptr("RemainingRetentionDays")}, - // }, - // Destination: to.Ptr("container1"), - // Enabled: to.Ptr(true), - // }, - // { - // Name: to.Ptr("inventoryPolicyRule2"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatParquet), - // ObjectType: to.Ptr(armstorage.ObjectTypeContainer), - // Schedule: to.Ptr(armstorage.ScheduleWeekly), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Last-Modified"), - // to.Ptr("Metadata"), - // to.Ptr("LeaseStatus"), - // to.Ptr("LeaseState"), - // to.Ptr("LeaseDuration"), - // to.Ptr("PublicAccess"), - // to.Ptr("HasImmutabilityPolicy"), - // to.Ptr("HasLegalHold"), - // to.Ptr("Etag"), - // to.Ptr("DefaultEncryptionScope"), - // to.Ptr("DenyEncryptionScopeOverride"), - // to.Ptr("ImmutableStorageWithVersioningEnabled"), - // to.Ptr("Deleted"), - // to.Ptr("Version"), - // to.Ptr("DeletedTime"), - // to.Ptr("RemainingRetentionDays")}, - // }, - // Destination: to.Ptr("container2"), - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json -func ExampleBlobInventoryPoliciesClient_CreateOrUpdate_storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobInventoryPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.BlobInventoryPolicyNameDefault, armstorage.BlobInventoryPolicy{ - Properties: &armstorage.BlobInventoryPolicyProperties{ - Policy: &armstorage.BlobInventoryPolicySchema{ - Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - Enabled: to.Ptr(true), - Rules: []*armstorage.BlobInventoryPolicyRule{ - { - Name: to.Ptr("inventoryPolicyRule1"), - Definition: &armstorage.BlobInventoryPolicyDefinition{ - Format: to.Ptr(armstorage.FormatCSV), - Filters: &armstorage.BlobInventoryPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob"), - to.Ptr("appendBlob"), - to.Ptr("pageBlob")}, - ExcludePrefix: []*string{ - to.Ptr("excludeprefix1"), - to.Ptr("excludeprefix2")}, - IncludeBlobVersions: to.Ptr(true), - IncludeDeleted: to.Ptr(true), - IncludeSnapshots: to.Ptr(true), - PrefixMatch: []*string{ - to.Ptr("inventoryprefix1"), - to.Ptr("inventoryprefix2")}, - }, - ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - Schedule: to.Ptr(armstorage.ScheduleDaily), - SchemaFields: []*string{ - to.Ptr("Name"), - to.Ptr("Creation-Time"), - to.Ptr("Last-Modified"), - to.Ptr("Content-Length"), - to.Ptr("Content-MD5"), - to.Ptr("BlobType"), - to.Ptr("AccessTier"), - to.Ptr("AccessTierChangeTime"), - to.Ptr("Snapshot"), - to.Ptr("VersionId"), - to.Ptr("IsCurrentVersion"), - to.Ptr("Tags"), - to.Ptr("ContentType"), - to.Ptr("ContentEncoding"), - to.Ptr("ContentLanguage"), - to.Ptr("ContentCRC64"), - to.Ptr("CacheControl"), - to.Ptr("Metadata"), - to.Ptr("Deleted"), - to.Ptr("RemainingRetentionDays")}, - }, - Destination: to.Ptr("container1"), - Enabled: to.Ptr(true), - }, - { - Name: to.Ptr("inventoryPolicyRule2"), - Definition: &armstorage.BlobInventoryPolicyDefinition{ - Format: to.Ptr(armstorage.FormatParquet), - ObjectType: to.Ptr(armstorage.ObjectTypeContainer), - Schedule: to.Ptr(armstorage.ScheduleWeekly), - SchemaFields: []*string{ - to.Ptr("Name"), - to.Ptr("Last-Modified"), - to.Ptr("Metadata"), - to.Ptr("LeaseStatus"), - to.Ptr("LeaseState"), - to.Ptr("LeaseDuration"), - to.Ptr("PublicAccess"), - to.Ptr("HasImmutabilityPolicy"), - to.Ptr("HasLegalHold"), - to.Ptr("Etag"), - to.Ptr("DefaultEncryptionScope"), - to.Ptr("DenyEncryptionScopeOverride"), - to.Ptr("ImmutableStorageWithVersioningEnabled"), - to.Ptr("Deleted"), - to.Ptr("Version"), - to.Ptr("DeletedTime"), - to.Ptr("RemainingRetentionDays")}, - }, - Destination: to.Ptr("container2"), - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobInventoryPolicy = armstorage.BlobInventoryPolicy{ - // Name: to.Ptr("DefaultInventoryPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), - // Properties: &armstorage.BlobInventoryPolicyProperties{ - // Policy: &armstorage.BlobInventoryPolicySchema{ - // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - // Enabled: to.Ptr(true), - // Rules: []*armstorage.BlobInventoryPolicyRule{ - // { - // Name: to.Ptr("inventoryPolicyRule1"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatCSV), - // Filters: &armstorage.BlobInventoryPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob"), - // to.Ptr("pageBlob")}, - // ExcludePrefix: []*string{ - // to.Ptr("excludeprefix1"), - // to.Ptr("excludeprefix2")}, - // IncludeBlobVersions: to.Ptr(true), - // IncludeDeleted: to.Ptr(true), - // IncludeSnapshots: to.Ptr(true), - // PrefixMatch: []*string{ - // to.Ptr("inventoryprefix1"), - // to.Ptr("inventoryprefix2")}, - // }, - // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - // Schedule: to.Ptr(armstorage.ScheduleDaily), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Creation-Time"), - // to.Ptr("Last-Modified"), - // to.Ptr("Content-Length"), - // to.Ptr("Content-MD5"), - // to.Ptr("BlobType"), - // to.Ptr("AccessTier"), - // to.Ptr("AccessTierChangeTime"), - // to.Ptr("Snapshot"), - // to.Ptr("VersionId"), - // to.Ptr("IsCurrentVersion"), - // to.Ptr("Tags"), - // to.Ptr("ContentType"), - // to.Ptr("ContentEncoding"), - // to.Ptr("ContentLanguage"), - // to.Ptr("ContentCRC64"), - // to.Ptr("CacheControl"), - // to.Ptr("Metadata"), - // to.Ptr("Deleted"), - // to.Ptr("RemainingRetentionDays")}, - // }, - // Destination: to.Ptr("container1"), - // Enabled: to.Ptr(true), - // }, - // { - // Name: to.Ptr("inventoryPolicyRule2"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatParquet), - // ObjectType: to.Ptr(armstorage.ObjectTypeContainer), - // Schedule: to.Ptr(armstorage.ScheduleWeekly), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Last-Modified"), - // to.Ptr("Metadata"), - // to.Ptr("LeaseStatus"), - // to.Ptr("LeaseState"), - // to.Ptr("LeaseDuration"), - // to.Ptr("PublicAccess"), - // to.Ptr("HasImmutabilityPolicy"), - // to.Ptr("HasLegalHold"), - // to.Ptr("Etag"), - // to.Ptr("DefaultEncryptionScope"), - // to.Ptr("DenyEncryptionScopeOverride"), - // to.Ptr("ImmutableStorageWithVersioningEnabled"), - // to.Ptr("Deleted"), - // to.Ptr("Version"), - // to.Ptr("DeletedTime"), - // to.Ptr("RemainingRetentionDays")}, - // }, - // Destination: to.Ptr("container2"), - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountDeleteBlobInventoryPolicy.json -func ExampleBlobInventoryPoliciesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewBlobInventoryPoliciesClient().Delete(ctx, "res6977", "sto2527", armstorage.BlobInventoryPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountListBlobInventoryPolicy.json -func ExampleBlobInventoryPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBlobInventoryPoliciesClient().NewListPager("res7687", "sto9699", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListBlobInventoryPolicy = armstorage.ListBlobInventoryPolicy{ - // Value: []*armstorage.BlobInventoryPolicy{ - // { - // Name: to.Ptr("DefaultInventoryPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), - // Properties: &armstorage.BlobInventoryPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-05T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.BlobInventoryPolicySchema{ - // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - // Enabled: to.Ptr(true), - // Rules: []*armstorage.BlobInventoryPolicyRule{ - // { - // Name: to.Ptr("inventoryPolicyRule1"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatCSV), - // Filters: &armstorage.BlobInventoryPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob"), - // to.Ptr("pageBlob")}, - // IncludeBlobVersions: to.Ptr(true), - // IncludeSnapshots: to.Ptr(true), - // PrefixMatch: []*string{ - // to.Ptr("inventoryprefix1"), - // to.Ptr("inventoryprefix2")}, - // }, - // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - // Schedule: to.Ptr(armstorage.ScheduleDaily), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Creation-Time"), - // to.Ptr("Last-Modified"), - // to.Ptr("Content-Length"), - // to.Ptr("Content-MD5"), - // to.Ptr("BlobType"), - // to.Ptr("AccessTier"), - // to.Ptr("AccessTierChangeTime"), - // to.Ptr("Snapshot"), - // to.Ptr("VersionId"), - // to.Ptr("IsCurrentVersion"), - // to.Ptr("Metadata")}, - // }, - // Destination: to.Ptr("container1"), - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/blobservices_client.go b/sdk/resourcemanager/storage/armstorage/blobservices_client.go index 924ca2af2908..2ebfd3a604a4 100644 --- a/sdk/resourcemanager/storage/armstorage/blobservices_client.go +++ b/sdk/resourcemanager/storage/armstorage/blobservices_client.go @@ -47,7 +47,7 @@ func NewBlobServicesClient(subscriptionID string, credential azcore.TokenCredent // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -96,7 +96,7 @@ func (client *BlobServicesClient) getServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -113,7 +113,7 @@ func (client *BlobServicesClient) getServicePropertiesHandleResponse(resp *http. // NewListPager - List blob services of storage account. It returns a collection of one object named default. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -162,7 +162,7 @@ func (client *BlobServicesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,7 +181,7 @@ func (client *BlobServicesClient) listHandleResponse(resp *http.Response) (BlobS // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -232,7 +232,7 @@ func (client *BlobServicesClient) setServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/blobservices_client_example_test.go b/sdk/resourcemanager/storage/armstorage/blobservices_client_example_test.go deleted file mode 100644 index dbc3548cf2d5..000000000000 --- a/sdk/resourcemanager/storage/armstorage/blobservices_client_example_test.go +++ /dev/null @@ -1,441 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobServicesList.json -func ExampleBlobServicesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBlobServicesClient().NewListPager("res4410", "sto8607", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.BlobServiceItems = armstorage.BlobServiceItems{ - // Value: []*armstorage.BlobServiceProperties{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), - // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ - // ChangeFeed: &armstorage.ChangeFeed{ - // Enabled: to.Ptr(true), - // RetentionInDays: to.Ptr[int32](7), - // }, - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x -ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // DefaultServiceVersion: to.Ptr("2017-07-29"), - // DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ - // Days: to.Ptr[int32](300), - // Enabled: to.Ptr(true), - // }, - // IsVersioningEnabled: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobServicesPutAllowPermanentDelete.json -func ExampleBlobServicesClient_SetServiceProperties_blobServicesPutAllowPermanentDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.BlobServiceProperties{ - BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ - DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ - AllowPermanentDelete: to.Ptr(true), - Days: to.Ptr[int32](300), - Enabled: to.Ptr(true), - }, - IsVersioningEnabled: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobServiceProperties = armstorage.BlobServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), - // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ - // DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ - // AllowPermanentDelete: to.Ptr(true), - // Days: to.Ptr[int32](300), - // Enabled: to.Ptr(true), - // }, - // IsVersioningEnabled: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobServicesPutLastAccessTimeBasedTracking.json -func ExampleBlobServicesClient_SetServiceProperties_blobServicesPutLastAccessTimeBasedTracking() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.BlobServiceProperties{ - BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ - LastAccessTimeTrackingPolicy: &armstorage.LastAccessTimeTrackingPolicy{ - Name: to.Ptr(armstorage.NameAccessTimeTracking), - BlobType: []*string{ - to.Ptr("blockBlob")}, - Enable: to.Ptr(true), - TrackingGranularityInDays: to.Ptr[int32](1), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobServiceProperties = armstorage.BlobServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), - // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ - // LastAccessTimeTrackingPolicy: &armstorage.LastAccessTimeTrackingPolicy{ - // Name: to.Ptr(armstorage.NameAccessTimeTracking), - // BlobType: []*string{ - // to.Ptr("blockBlob")}, - // Enable: to.Ptr(true), - // TrackingGranularityInDays: to.Ptr[int32](1), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobServicesPut.json -func ExampleBlobServicesClient_SetServiceProperties_putBlobServices() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.BlobServiceProperties{ - BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ - ChangeFeed: &armstorage.ChangeFeed{ - Enabled: to.Ptr(true), - RetentionInDays: to.Ptr[int32](7), - }, - Cors: &armstorage.CorsRules{ - CorsRules: []*armstorage.CorsRule{ - { - AllowedHeaders: []*string{ - to.Ptr("x-ms-meta-abc"), - to.Ptr("x-ms-meta-data*"), - to.Ptr("x-ms-meta-target*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - AllowedOrigins: []*string{ - to.Ptr("http://www.contoso.com"), - to.Ptr("http://www.fabrikam.com")}, - ExposedHeaders: []*string{ - to.Ptr("x-ms-meta-*")}, - MaxAgeInSeconds: to.Ptr[int32](100), - }, - { - AllowedHeaders: []*string{ - to.Ptr("*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - AllowedOrigins: []*string{ - to.Ptr("*")}, - ExposedHeaders: []*string{ - to.Ptr("*")}, - MaxAgeInSeconds: to.Ptr[int32](2), - }, - { - AllowedHeaders: []*string{ - to.Ptr("x-ms-meta-12345675754564*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - AllowedOrigins: []*string{ - to.Ptr("http://www.abc23.com"), - to.Ptr("https://www.fabrikam.com/*")}, - ExposedHeaders: []*string{ - to.Ptr("x-ms-meta-abc"), - to.Ptr("x-ms-meta-data*"), - to.Ptr("x -ms-meta-target*")}, - MaxAgeInSeconds: to.Ptr[int32](2000), - }}, - }, - DefaultServiceVersion: to.Ptr("2017-07-29"), - DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ - Days: to.Ptr[int32](300), - Enabled: to.Ptr(true), - }, - IsVersioningEnabled: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobServiceProperties = armstorage.BlobServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), - // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ - // ChangeFeed: &armstorage.ChangeFeed{ - // Enabled: to.Ptr(true), - // RetentionInDays: to.Ptr[int32](7), - // }, - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x -ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // DefaultServiceVersion: to.Ptr("2017-07-29"), - // DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ - // Days: to.Ptr[int32](300), - // Enabled: to.Ptr(true), - // }, - // IsVersioningEnabled: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/BlobServicesGet.json -func ExampleBlobServicesClient_GetServiceProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobServicesClient().GetServiceProperties(ctx, "res4410", "sto8607", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobServiceProperties = armstorage.BlobServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), - // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ - // ChangeFeed: &armstorage.ChangeFeed{ - // Enabled: to.Ptr(true), - // RetentionInDays: to.Ptr[int32](7), - // }, - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x -ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // DefaultServiceVersion: to.Ptr("2017-07-29"), - // DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ - // Days: to.Ptr[int32](300), - // Enabled: to.Ptr(true), - // }, - // IsVersioningEnabled: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} diff --git a/sdk/resourcemanager/storage/armstorage/constants.go b/sdk/resourcemanager/storage/armstorage/constants.go index a0098047ffcf..d453dd923462 100644 --- a/sdk/resourcemanager/storage/armstorage/constants.go +++ b/sdk/resourcemanager/storage/armstorage/constants.go @@ -10,7 +10,7 @@ package armstorage const ( moduleName = "armstorage" - moduleVersion = "v1.4.0-beta.1" + moduleVersion = "v1.4.0" ) // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' @@ -161,6 +161,7 @@ func PossibleBypassValues() []Bypass { type CorsRuleAllowedMethodsItem string const ( + CorsRuleAllowedMethodsItemCONNECT CorsRuleAllowedMethodsItem = "CONNECT" CorsRuleAllowedMethodsItemDELETE CorsRuleAllowedMethodsItem = "DELETE" CorsRuleAllowedMethodsItemGET CorsRuleAllowedMethodsItem = "GET" CorsRuleAllowedMethodsItemHEAD CorsRuleAllowedMethodsItem = "HEAD" @@ -169,11 +170,13 @@ const ( CorsRuleAllowedMethodsItemPATCH CorsRuleAllowedMethodsItem = "PATCH" CorsRuleAllowedMethodsItemPOST CorsRuleAllowedMethodsItem = "POST" CorsRuleAllowedMethodsItemPUT CorsRuleAllowedMethodsItem = "PUT" + CorsRuleAllowedMethodsItemTRACE CorsRuleAllowedMethodsItem = "TRACE" ) // PossibleCorsRuleAllowedMethodsItemValues returns the possible values for the CorsRuleAllowedMethodsItem const type. func PossibleCorsRuleAllowedMethodsItemValues() []CorsRuleAllowedMethodsItem { return []CorsRuleAllowedMethodsItem{ + CorsRuleAllowedMethodsItemCONNECT, CorsRuleAllowedMethodsItemDELETE, CorsRuleAllowedMethodsItemGET, CorsRuleAllowedMethodsItemHEAD, @@ -182,6 +185,7 @@ func PossibleCorsRuleAllowedMethodsItemValues() []CorsRuleAllowedMethodsItem { CorsRuleAllowedMethodsItemPATCH, CorsRuleAllowedMethodsItemPOST, CorsRuleAllowedMethodsItemPUT, + CorsRuleAllowedMethodsItemTRACE, } } @@ -706,6 +710,19 @@ func PossibleManagementPolicyNameValues() []ManagementPolicyName { } } +type MigrationName string + +const ( + MigrationNameDefault MigrationName = "default" +) + +// PossibleMigrationNameValues returns the possible values for the MigrationName const type. +func PossibleMigrationNameValues() []MigrationName { + return []MigrationName{ + MigrationNameDefault, + } +} + // MigrationState - This property denotes the container level immutability to object level immutability migration state. type MigrationState string @@ -722,6 +739,28 @@ func PossibleMigrationStateValues() []MigrationState { } } +// MigrationStatus - Current status of migration +type MigrationStatus string + +const ( + MigrationStatusComplete MigrationStatus = "Complete" + MigrationStatusFailed MigrationStatus = "Failed" + MigrationStatusInProgress MigrationStatus = "InProgress" + MigrationStatusInvalid MigrationStatus = "Invalid" + MigrationStatusSubmittedForConversion MigrationStatus = "SubmittedForConversion" +) + +// PossibleMigrationStatusValues returns the possible values for the MigrationStatus const type. +func PossibleMigrationStatusValues() []MigrationStatus { + return []MigrationStatus{ + MigrationStatusComplete, + MigrationStatusFailed, + MigrationStatusInProgress, + MigrationStatusInvalid, + MigrationStatusSubmittedForConversion, + } +} + // MinimumTLSVersion - Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS // 1.0 for this property. type MinimumTLSVersion string @@ -801,6 +840,42 @@ func PossiblePermissionsValues() []Permissions { } } +// PostFailoverRedundancy - The redundancy type of the account after an account failover is performed. +type PostFailoverRedundancy string + +const ( + PostFailoverRedundancyStandardLRS PostFailoverRedundancy = "Standard_LRS" + PostFailoverRedundancyStandardZRS PostFailoverRedundancy = "Standard_ZRS" +) + +// PossiblePostFailoverRedundancyValues returns the possible values for the PostFailoverRedundancy const type. +func PossiblePostFailoverRedundancyValues() []PostFailoverRedundancy { + return []PostFailoverRedundancy{ + PostFailoverRedundancyStandardLRS, + PostFailoverRedundancyStandardZRS, + } +} + +// PostPlannedFailoverRedundancy - The redundancy type of the account after a planned account failover is performed. +type PostPlannedFailoverRedundancy string + +const ( + PostPlannedFailoverRedundancyStandardGRS PostPlannedFailoverRedundancy = "Standard_GRS" + PostPlannedFailoverRedundancyStandardGZRS PostPlannedFailoverRedundancy = "Standard_GZRS" + PostPlannedFailoverRedundancyStandardRAGRS PostPlannedFailoverRedundancy = "Standard_RAGRS" + PostPlannedFailoverRedundancyStandardRAGZRS PostPlannedFailoverRedundancy = "Standard_RAGZRS" +) + +// PossiblePostPlannedFailoverRedundancyValues returns the possible values for the PostPlannedFailoverRedundancy const type. +func PossiblePostPlannedFailoverRedundancyValues() []PostPlannedFailoverRedundancy { + return []PostPlannedFailoverRedundancy{ + PostPlannedFailoverRedundancyStandardGRS, + PostPlannedFailoverRedundancyStandardGZRS, + PostPlannedFailoverRedundancyStandardRAGRS, + PostPlannedFailoverRedundancyStandardRAGZRS, + } +} + // PrivateEndpointConnectionProvisioningState - The current provisioning state. type PrivateEndpointConnectionProvisioningState string diff --git a/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go b/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go index 83878e23039c..ac1f44ed9fa0 100644 --- a/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go +++ b/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go @@ -46,7 +46,7 @@ func NewDeletedAccountsClient(subscriptionID string, credential azcore.TokenCred // Get - Get properties of specified deleted account resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - deletedAccountName - Name of the deleted storage account. // - location - The location of the deleted storage account. // - options - DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method. @@ -92,7 +92,7 @@ func (client *DeletedAccountsClient) getCreateRequest(ctx context.Context, delet return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -109,7 +109,7 @@ func (client *DeletedAccountsClient) getHandleResponse(resp *http.Response) (Del // NewListPager - Lists deleted accounts under the subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager // method. func (client *DeletedAccountsClient) NewListPager(options *DeletedAccountsClientListOptions) *runtime.Pager[DeletedAccountsClientListResponse] { @@ -154,7 +154,7 @@ func (client *DeletedAccountsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storage/armstorage/deletedaccounts_client_example_test.go b/sdk/resourcemanager/storage/armstorage/deletedaccounts_client_example_test.go deleted file mode 100644 index aff50b3a90ff..000000000000 --- a/sdk/resourcemanager/storage/armstorage/deletedaccounts_client_example_test.go +++ /dev/null @@ -1,102 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/DeletedAccountList.json -func ExampleDeletedAccountsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDeletedAccountsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DeletedAccountListResult = armstorage.DeletedAccountListResult{ - // Value: []*armstorage.DeletedAccount{ - // { - // Name: to.Ptr("sto1125"), - // Type: to.Ptr("Microsoft.Storage/deletedAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125"), - // Properties: &armstorage.DeletedAccountProperties{ - // CreationTime: to.Ptr("2020-08-17T03:35:37.4588848Z"), - // DeletionTime: to.Ptr("2020-08-17T04:41:37.3442475Z"), - // Location: to.Ptr("eastus"), - // RestoreReference: to.Ptr("sto1125|2020-08-17T03:35:37.4588848Z"), - // StorageAccountResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125"), - // }, - // }, - // { - // Name: to.Ptr("sto1126"), - // Type: to.Ptr("Microsoft.Storage/deletedAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1126"), - // Properties: &armstorage.DeletedAccountProperties{ - // CreationTime: to.Ptr("2020-08-19T15:10:21.5902165Z"), - // DeletionTime: to.Ptr("2020-08-20T06:11:55.1957302Z"), - // Location: to.Ptr("eastus"), - // RestoreReference: to.Ptr("sto1126|2020-08-17T03:35:37.4588848Z"), - // StorageAccountResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1126"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/DeletedAccountGet.json -func ExampleDeletedAccountsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDeletedAccountsClient().Get(ctx, "sto1125", "eastus", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DeletedAccount = armstorage.DeletedAccount{ - // Name: to.Ptr("sto1125"), - // Type: to.Ptr("Microsoft.Storage/deletedAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125"), - // Properties: &armstorage.DeletedAccountProperties{ - // CreationTime: to.Ptr("2020-08-17T03:35:37.4588848Z"), - // DeletionTime: to.Ptr("2020-08-17T04:41:37.3442475Z"), - // Location: to.Ptr("eastus"), - // RestoreReference: to.Ptr("sto1125|2020-08-17T03:35:37.4588848Z"), - // StorageAccountResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125"), - // }, - // } -} diff --git a/sdk/resourcemanager/storage/armstorage/encryptionscopes_client.go b/sdk/resourcemanager/storage/armstorage/encryptionscopes_client.go index d8c17bd3d700..5f0f914c3458 100644 --- a/sdk/resourcemanager/storage/armstorage/encryptionscopes_client.go +++ b/sdk/resourcemanager/storage/armstorage/encryptionscopes_client.go @@ -47,7 +47,7 @@ func NewEncryptionScopesClient(subscriptionID string, credential azcore.TokenCre // Get - Returns the properties for the specified encryption scope. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -101,7 +101,7 @@ func (client *EncryptionScopesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +118,7 @@ func (client *EncryptionScopesClient) getHandleResponse(resp *http.Response) (En // NewListPager - Lists all the encryption scopes available under the specified storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -174,7 +174,7 @@ func (client *EncryptionScopesClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) } @@ -202,7 +202,7 @@ func (client *EncryptionScopesClient) listHandleResponse(resp *http.Response) (E // does not already exist. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -257,7 +257,7 @@ func (client *EncryptionScopesClient) patchCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, encryptionScope); err != nil { @@ -280,7 +280,7 @@ func (client *EncryptionScopesClient) patchHandleResponse(resp *http.Response) ( // encryption scope properties will be updated per the specified request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -335,7 +335,7 @@ func (client *EncryptionScopesClient) putCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, encryptionScope); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/encryptionscopes_client_example_test.go b/sdk/resourcemanager/storage/armstorage/encryptionscopes_client_example_test.go deleted file mode 100644 index 9d0954d9ffd1..000000000000 --- a/sdk/resourcemanager/storage/armstorage/encryptionscopes_client_example_test.go +++ /dev/null @@ -1,216 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountPutEncryptionScope.json -func ExampleEncryptionScopesClient_Put_storageAccountPutEncryptionScope() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEncryptionScopesClient().Put(ctx, "resource-group-name", "{storage-account-name}", "{encryption-scope-name}", armstorage.EncryptionScope{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EncryptionScope = armstorage.EncryptionScope{ - // Name: to.Ptr("{encryption-scope-name}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json -func ExampleEncryptionScopesClient_Put_storageAccountPutEncryptionScopeWithInfrastructureEncryption() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEncryptionScopesClient().Put(ctx, "resource-group-name", "{storage-account-name}", "{encryption-scope-name}", armstorage.EncryptionScope{ - EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - RequireInfrastructureEncryption: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EncryptionScope = armstorage.EncryptionScope{ - // Name: to.Ptr("{encryption-scope-name}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // RequireInfrastructureEncryption: to.Ptr(true), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountPatchEncryptionScope.json -func ExampleEncryptionScopesClient_Patch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEncryptionScopesClient().Patch(ctx, "resource-group-name", "{storage-account-name}", "{encryption-scope-name}", armstorage.EncryptionScope{ - EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - KeyVaultProperties: &armstorage.EncryptionScopeKeyVaultProperties{ - KeyURI: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), - }, - Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftKeyVault), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EncryptionScope = armstorage.EncryptionScope{ - // Name: to.Ptr("{encryption-scope-name}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // KeyVaultProperties: &armstorage.EncryptionScopeKeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), - // KeyURI: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-17T06:23:14.4513306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftKeyVault), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountGetEncryptionScope.json -func ExampleEncryptionScopesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEncryptionScopesClient().Get(ctx, "resource-group-name", "{storage-account-name}", "{encryption-scope-name}", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EncryptionScope = armstorage.EncryptionScope{ - // Name: to.Ptr("{encyrption-scope-name}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountEncryptionScopeList.json -func ExampleEncryptionScopesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEncryptionScopesClient().NewListPager("resource-group-name", "{storage-account-name}", &armstorage.EncryptionScopesClientListOptions{Maxpagesize: nil, - Filter: nil, - Include: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.EncryptionScopeListResult = armstorage.EncryptionScopeListResult{ - // Value: []*armstorage.EncryptionScope{ - // { - // Name: to.Ptr("scope-1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/scope-1"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // }, - // { - // Name: to.Ptr("scope-2"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/scope-2"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T04:32:14.3355306Z"); return t}()), - // KeyVaultProperties: &armstorage.EncryptionScopeKeyVaultProperties{ - // KeyURI: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-17T06:23:14.4513306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftKeyVault), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/fake/accounts_server.go b/sdk/resourcemanager/storage/armstorage/fake/accounts_server.go index 0acb06d10e22..e2d56a7ea7e4 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/accounts_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/accounts_server.go @@ -36,6 +36,10 @@ type AccountsServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginCreate func(ctx context.Context, resourceGroupName string, accountName string, parameters armstorage.AccountCreateParameters, options *armstorage.AccountsClientBeginCreateOptions) (resp azfake.PollerResponder[armstorage.AccountsClientCreateResponse], errResp azfake.ErrorResponder) + // BeginCustomerInitiatedMigration is the fake for method AccountsClient.BeginCustomerInitiatedMigration + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCustomerInitiatedMigration func(ctx context.Context, resourceGroupName string, accountName string, parameters armstorage.AccountMigration, options *armstorage.AccountsClientBeginCustomerInitiatedMigrationOptions) (resp azfake.PollerResponder[armstorage.AccountsClientCustomerInitiatedMigrationResponse], errResp azfake.ErrorResponder) + // Delete is the fake for method AccountsClient.Delete // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent Delete func(ctx context.Context, resourceGroupName string, accountName string, options *armstorage.AccountsClientDeleteOptions) (resp azfake.Responder[armstorage.AccountsClientDeleteResponse], errResp azfake.ErrorResponder) @@ -44,6 +48,10 @@ type AccountsServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginFailover func(ctx context.Context, resourceGroupName string, accountName string, options *armstorage.AccountsClientBeginFailoverOptions) (resp azfake.PollerResponder[armstorage.AccountsClientFailoverResponse], errResp azfake.ErrorResponder) + // GetCustomerInitiatedMigration is the fake for method AccountsClient.GetCustomerInitiatedMigration + // HTTP status codes to indicate success: http.StatusOK + GetCustomerInitiatedMigration func(ctx context.Context, resourceGroupName string, accountName string, migrationName armstorage.MigrationName, options *armstorage.AccountsClientGetCustomerInitiatedMigrationOptions) (resp azfake.Responder[armstorage.AccountsClientGetCustomerInitiatedMigrationResponse], errResp azfake.ErrorResponder) + // GetProperties is the fake for method AccountsClient.GetProperties // HTTP status codes to indicate success: http.StatusOK GetProperties func(ctx context.Context, resourceGroupName string, accountName string, options *armstorage.AccountsClientGetPropertiesOptions) (resp azfake.Responder[armstorage.AccountsClientGetPropertiesResponse], errResp azfake.ErrorResponder) @@ -102,6 +110,7 @@ type AccountsServerTransport struct { srv *AccountsServer beginAbortHierarchicalNamespaceMigration *azfake.PollerResponder[armstorage.AccountsClientAbortHierarchicalNamespaceMigrationResponse] beginCreate *azfake.PollerResponder[armstorage.AccountsClientCreateResponse] + beginCustomerInitiatedMigration *azfake.PollerResponder[armstorage.AccountsClientCustomerInitiatedMigrationResponse] beginFailover *azfake.PollerResponder[armstorage.AccountsClientFailoverResponse] beginHierarchicalNamespaceMigration *azfake.PollerResponder[armstorage.AccountsClientHierarchicalNamespaceMigrationResponse] newListPager *azfake.PagerResponder[armstorage.AccountsClientListResponse] @@ -127,10 +136,14 @@ func (a *AccountsServerTransport) Do(req *http.Request) (*http.Response, error) resp, err = a.dispatchCheckNameAvailability(req) case "AccountsClient.BeginCreate": resp, err = a.dispatchBeginCreate(req) + case "AccountsClient.BeginCustomerInitiatedMigration": + resp, err = a.dispatchBeginCustomerInitiatedMigration(req) case "AccountsClient.Delete": resp, err = a.dispatchDelete(req) case "AccountsClient.BeginFailover": resp, err = a.dispatchBeginFailover(req) + case "AccountsClient.GetCustomerInitiatedMigration": + resp, err = a.dispatchGetCustomerInitiatedMigration(req) case "AccountsClient.GetProperties": resp, err = a.dispatchGetProperties(req) case "AccountsClient.BeginHierarchicalNamespaceMigration": @@ -279,6 +292,51 @@ func (a *AccountsServerTransport) dispatchBeginCreate(req *http.Request) (*http. return resp, nil } +func (a *AccountsServerTransport) dispatchBeginCustomerInitiatedMigration(req *http.Request) (*http.Response, error) { + if a.srv.BeginCustomerInitiatedMigration == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCustomerInitiatedMigration not implemented")} + } + if a.beginCustomerInitiatedMigration == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startAccountMigration` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armstorage.AccountMigration](req) + if err != nil { + return nil, err + } + resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginCustomerInitiatedMigration(req.Context(), resourceGroupNameUnescaped, accountNameUnescaped, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + a.beginCustomerInitiatedMigration = &respr + } + + resp, err := server.PollerResponderNext(a.beginCustomerInitiatedMigration, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(a.beginCustomerInitiatedMigration) { + a.beginCustomerInitiatedMigration = nil + } + + return resp, nil +} + func (a *AccountsServerTransport) dispatchDelete(req *http.Request) (*http.Response, error) { if a.srv.Delete == nil { return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} @@ -365,6 +423,43 @@ func (a *AccountsServerTransport) dispatchBeginFailover(req *http.Request) (*htt return resp, nil } +func (a *AccountsServerTransport) dispatchGetCustomerInitiatedMigration(req *http.Request) (*http.Response, error) { + if a.srv.GetCustomerInitiatedMigration == nil { + return nil, &nonRetriableError{errors.New("fake for method GetCustomerInitiatedMigration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/accountMigrations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + migrationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("migrationName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.GetCustomerInitiatedMigration(req.Context(), resourceGroupNameUnescaped, accountNameUnescaped, armstorage.MigrationName(migrationNameUnescaped), nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AccountMigration, req) + if err != nil { + return nil, err + } + return resp, nil +} + func (a *AccountsServerTransport) dispatchGetProperties(req *http.Request) (*http.Response, error) { if a.srv.GetProperties == nil { return nil, &nonRetriableError{errors.New("fake for method GetProperties not implemented")} diff --git a/sdk/resourcemanager/storage/armstorage/fileservices_client.go b/sdk/resourcemanager/storage/armstorage/fileservices_client.go index 5b7c478f339c..1dcc7cf320b1 100644 --- a/sdk/resourcemanager/storage/armstorage/fileservices_client.go +++ b/sdk/resourcemanager/storage/armstorage/fileservices_client.go @@ -47,7 +47,7 @@ func NewFileServicesClient(subscriptionID string, credential azcore.TokenCredent // Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -96,7 +96,7 @@ func (client *FileServicesClient) getServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +114,7 @@ func (client *FileServicesClient) getServicePropertiesHandleResponse(resp *http. // List - List all file services in storage accounts // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -161,7 +161,7 @@ func (client *FileServicesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *FileServicesClient) listHandleResponse(resp *http.Response) (FileS // Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -230,7 +230,7 @@ func (client *FileServicesClient) setServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/fileservices_client_example_test.go b/sdk/resourcemanager/storage/armstorage/fileservices_client_example_test.go deleted file mode 100644 index 915d18a8219e..000000000000 --- a/sdk/resourcemanager/storage/armstorage/fileservices_client_example_test.go +++ /dev/null @@ -1,408 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileServicesList.json -func ExampleFileServicesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileServicesClient().List(ctx, "res9290", "sto1590", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileServiceItems = armstorage.FileServiceItems{ - // Value: []*armstorage.FileServiceProperties{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), - // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileServicesPut.json -func ExampleFileServicesClient_SetServiceProperties_putFileServices() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.FileServiceProperties{ - FileServiceProperties: &armstorage.FileServicePropertiesProperties{ - Cors: &armstorage.CorsRules{ - CorsRules: []*armstorage.CorsRule{ - { - AllowedHeaders: []*string{ - to.Ptr("x-ms-meta-abc"), - to.Ptr("x-ms-meta-data*"), - to.Ptr("x-ms-meta-target*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - AllowedOrigins: []*string{ - to.Ptr("http://www.contoso.com"), - to.Ptr("http://www.fabrikam.com")}, - ExposedHeaders: []*string{ - to.Ptr("x-ms-meta-*")}, - MaxAgeInSeconds: to.Ptr[int32](100), - }, - { - AllowedHeaders: []*string{ - to.Ptr("*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - AllowedOrigins: []*string{ - to.Ptr("*")}, - ExposedHeaders: []*string{ - to.Ptr("*")}, - MaxAgeInSeconds: to.Ptr[int32](2), - }, - { - AllowedHeaders: []*string{ - to.Ptr("x-ms-meta-12345675754564*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - AllowedOrigins: []*string{ - to.Ptr("http://www.abc23.com"), - to.Ptr("https://www.fabrikam.com/*")}, - ExposedHeaders: []*string{ - to.Ptr("x-ms-meta-abc"), - to.Ptr("x-ms-meta-data*"), - to.Ptr("x-ms-meta-target*")}, - MaxAgeInSeconds: to.Ptr[int32](2000), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileServiceProperties = armstorage.FileServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), - // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileServicesPut_EnableSMBMultichannel.json -func ExampleFileServicesClient_SetServiceProperties_putFileServicesEnableSmbMultichannel() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.FileServiceProperties{ - FileServiceProperties: &armstorage.FileServicePropertiesProperties{ - ProtocolSettings: &armstorage.ProtocolSettings{ - Smb: &armstorage.SmbSetting{ - Multichannel: &armstorage.Multichannel{ - Enabled: to.Ptr(true), - }, - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileServiceProperties = armstorage.FileServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), - // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ - // ProtocolSettings: &armstorage.ProtocolSettings{ - // Smb: &armstorage.SmbSetting{ - // Multichannel: &armstorage.Multichannel{ - // Enabled: to.Ptr(true), - // }, - // }, - // }, - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileServicesPut_EnableSecureSmbFeatures.json -func ExampleFileServicesClient_SetServiceProperties_putFileServicesEnableSecureSmbFeatures() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.FileServiceProperties{ - FileServiceProperties: &armstorage.FileServicePropertiesProperties{ - ProtocolSettings: &armstorage.ProtocolSettings{ - Smb: &armstorage.SmbSetting{ - AuthenticationMethods: to.Ptr("NTLMv2;Kerberos"), - ChannelEncryption: to.Ptr("AES-128-CCM;AES-128-GCM;AES-256-GCM"), - KerberosTicketEncryption: to.Ptr("RC4-HMAC;AES-256"), - Versions: to.Ptr("SMB2.1;SMB3.0;SMB3.1.1"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileServiceProperties = armstorage.FileServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), - // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ - // ProtocolSettings: &armstorage.ProtocolSettings{ - // Smb: &armstorage.SmbSetting{ - // AuthenticationMethods: to.Ptr("NTLMv2;Kerberos"), - // ChannelEncryption: to.Ptr("AES-128-CCM;AES-128-GCM;AES-256-GCM"), - // KerberosTicketEncryption: to.Ptr("RC4-HMAC;AES-256"), - // Versions: to.Ptr("SMB2.1;SMB3.0;SMB3.1.1"), - // }, - // }, - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileServicesGet.json -func ExampleFileServicesClient_GetServiceProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileServicesClient().GetServiceProperties(ctx, "res4410", "sto8607", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileServiceProperties = armstorage.FileServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), - // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} diff --git a/sdk/resourcemanager/storage/armstorage/fileshares_client.go b/sdk/resourcemanager/storage/armstorage/fileshares_client.go index a0f568c50f73..b44e5c2bc024 100644 --- a/sdk/resourcemanager/storage/armstorage/fileshares_client.go +++ b/sdk/resourcemanager/storage/armstorage/fileshares_client.go @@ -48,7 +48,7 @@ func NewFileSharesClient(subscriptionID string, credential azcore.TokenCredentia // the share. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -106,7 +106,7 @@ func (client *FileSharesClient) createCreateRequest(ctx context.Context, resourc if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, fileShare); err != nil { @@ -127,7 +127,7 @@ func (client *FileSharesClient) createHandleResponse(resp *http.Response) (FileS // Delete - Deletes specified share under its account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -180,7 +180,7 @@ func (client *FileSharesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Include != nil { reqQP.Set("$include", *options.Include) } @@ -195,7 +195,7 @@ func (client *FileSharesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets properties of a specified share. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -249,7 +249,7 @@ func (client *FileSharesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -274,7 +274,7 @@ func (client *FileSharesClient) getHandleResponse(resp *http.Response) (FileShar // be 15 to 60 seconds, or can be infinite. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -328,7 +328,7 @@ func (client *FileSharesClient) leaseCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.XMSSnapshot != nil { req.Raw().Header["x-ms-snapshot"] = []string{*options.XMSSnapshot} @@ -357,7 +357,7 @@ func (client *FileSharesClient) leaseHandleResponse(resp *http.Response) (FileSh // NewListPager - Lists all shares. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -412,7 +412,7 @@ func (client *FileSharesClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", *options.Maxpagesize) } @@ -439,7 +439,7 @@ func (client *FileSharesClient) listHandleResponse(resp *http.Response) (FileSha // Restore - Restore a file share within a valid retention days if share soft delete is enabled // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -492,7 +492,7 @@ func (client *FileSharesClient) restoreCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, deletedShare); err != nil { @@ -505,7 +505,7 @@ func (client *FileSharesClient) restoreCreateRequest(ctx context.Context, resour // Update fails if the specified share does not already exist. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -560,7 +560,7 @@ func (client *FileSharesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, fileShare); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/fileshares_client_example_test.go b/sdk/resourcemanager/storage/armstorage/fileshares_client_example_test.go deleted file mode 100644 index 59a84b10cfc4..000000000000 --- a/sdk/resourcemanager/storage/armstorage/fileshares_client_example_test.go +++ /dev/null @@ -1,512 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/DeletedFileSharesList.json -func ExampleFileSharesClient_NewListPager_listDeletedShares() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFileSharesClient().NewListPager("res9290", "sto1590", &armstorage.FileSharesClientListOptions{Maxpagesize: nil, - Filter: nil, - Expand: to.Ptr("deleted"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FileShareItems = armstorage.FileShareItems{ - // Value: []*armstorage.FileShareItem{ - // { - // Name: to.Ptr("share1644"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644_1234567890"), - // Etag: to.Ptr("\"0x8D589847D51C7DE\""), - // Properties: &armstorage.FileShareProperties{ - // Deleted: to.Ptr(true), - // DeletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-14T08:20:47Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-14T08:20:47Z"); return t}()), - // RemainingRetentionDays: to.Ptr[int32](30), - // ShareQuota: to.Ptr[int32](1024), - // Version: to.Ptr("1234567890"), - // }, - // }, - // { - // Name: to.Ptr("share4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-14T08:20:47Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileShareSnapshotsList.json -func ExampleFileSharesClient_NewListPager_listShareSnapshots() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFileSharesClient().NewListPager("res9290", "sto1590", &armstorage.FileSharesClientListOptions{Maxpagesize: nil, - Filter: nil, - Expand: to.Ptr("snapshots"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FileShareItems = armstorage.FileShareItems{ - // Value: []*armstorage.FileShareItem{ - // { - // Name: to.Ptr("share4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-26T05:47:05.0000000Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }, - // { - // Name: to.Ptr("share4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-26T05:47:05.0000000Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // SnapshotTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-26T05:48:07.0000000Z"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesList.json -func ExampleFileSharesClient_NewListPager_listShares() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFileSharesClient().NewListPager("res9290", "sto1590", &armstorage.FileSharesClientListOptions{Maxpagesize: nil, - Filter: nil, - Expand: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FileShareItems = armstorage.FileShareItems{ - // Value: []*armstorage.FileShareItem{ - // { - // Name: to.Ptr("share1644"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644"), - // Etag: to.Ptr("\"0x8D589847D51C7DE\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-14T08:20:47Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }, - // { - // Name: to.Ptr("share4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-14T08:20:47Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesPut_NFS.json -func ExampleFileSharesClient_Create_createNfsShares() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Create(ctx, "res346", "sto666", "share1235", armstorage.FileShare{ - FileShareProperties: &armstorage.FileShareProperties{ - EnabledProtocols: to.Ptr(armstorage.EnabledProtocolsNFS), - }, - }, &armstorage.FileSharesClientCreateOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share1235"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235"), - // FileShareProperties: &armstorage.FileShareProperties{ - // EnabledProtocols: to.Ptr(armstorage.EnabledProtocolsNFS), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesPut.json -func ExampleFileSharesClient_Create_putShares() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Create(ctx, "res3376", "sto328", "share6185", armstorage.FileShare{}, &armstorage.FileSharesClientCreateOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesPut_AccessTier.json -func ExampleFileSharesClient_Create_putSharesWithAccessTier() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Create(ctx, "res346", "sto666", "share1235", armstorage.FileShare{ - FileShareProperties: &armstorage.FileShareProperties{ - AccessTier: to.Ptr(armstorage.ShareAccessTierHot), - }, - }, &armstorage.FileSharesClientCreateOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share1235"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235"), - // FileShareProperties: &armstorage.FileShareProperties{ - // AccessTier: to.Ptr(armstorage.ShareAccessTierHot), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileShareAclsPatch.json -func ExampleFileSharesClient_Update_updateShareAcls() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Update(ctx, "res3376", "sto328", "share6185", armstorage.FileShare{ - FileShareProperties: &armstorage.FileShareProperties{ - SignedIdentifiers: []*armstorage.SignedIdentifier{ - { - AccessPolicy: &armstorage.AccessPolicy{ - ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T08:49:37.0000000Z"); return t }()), - Permission: to.Ptr("rwd"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T08:49:37.0000000Z"); return t }()), - }, - ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185"), - // FileShareProperties: &armstorage.FileShareProperties{ - // SignedIdentifiers: []*armstorage.SignedIdentifier{ - // { - // AccessPolicy: &armstorage.AccessPolicy{ - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T08:49:37.0000000Z"); return t}()), - // Permission: to.Ptr("rwd"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T08:49:37.0000000Z"); return t}()), - // }, - // ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesPatch.json -func ExampleFileSharesClient_Update_updateShares() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Update(ctx, "res3376", "sto328", "share6185", armstorage.FileShare{ - FileShareProperties: &armstorage.FileShareProperties{ - Metadata: map[string]*string{ - "type": to.Ptr("image"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185"), - // FileShareProperties: &armstorage.FileShareProperties{ - // Metadata: map[string]*string{ - // "type": to.Ptr("image"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesGet_Stats.json -func ExampleFileSharesClient_Get_getShareStats() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Get(ctx, "res9871", "sto6217", "share1634", &armstorage.FileSharesClientGetOptions{Expand: to.Ptr("stats"), - XMSSnapshot: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share1634"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634"), - // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), - // FileShareProperties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-26T05:06:14Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // ShareUsageBytes: to.Ptr[int64](652945), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesGet.json -func ExampleFileSharesClient_Get_getShares() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Get(ctx, "res9871", "sto6217", "share1634", &armstorage.FileSharesClientGetOptions{Expand: nil, - XMSSnapshot: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share1634"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634"), - // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), - // FileShareProperties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-26T05:06:14Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesDelete.json -func ExampleFileSharesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewFileSharesClient().Delete(ctx, "res4079", "sto4506", "share9689", &armstorage.FileSharesClientDeleteOptions{XMSSnapshot: nil, - Include: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesRestore.json -func ExampleFileSharesClient_Restore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewFileSharesClient().Restore(ctx, "res3376", "sto328", "share1249", armstorage.DeletedShare{ - DeletedShareName: to.Ptr("share1249"), - DeletedShareVersion: to.Ptr("1234567890"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesLease_Acquire.json -func ExampleFileSharesClient_Lease_acquireALeaseOnAShare() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Lease(ctx, "res3376", "sto328", "share124", &armstorage.FileSharesClientLeaseOptions{XMSSnapshot: nil, - Parameters: &armstorage.LeaseShareRequest{ - Action: to.Ptr(armstorage.LeaseShareActionAcquire), - LeaseDuration: to.Ptr[int32](-1), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LeaseShareResponse = armstorage.LeaseShareResponse{ - // LeaseID: to.Ptr("8698f513-fa75-44a1-b8eb-30ba336af27d"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/FileSharesLease_Break.json -func ExampleFileSharesClient_Lease_breakALeaseOnAShare() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Lease(ctx, "res3376", "sto328", "share12", &armstorage.FileSharesClientLeaseOptions{XMSSnapshot: nil, - Parameters: &armstorage.LeaseShareRequest{ - Action: to.Ptr(armstorage.LeaseShareActionBreak), - LeaseID: to.Ptr("8698f513-fa75-44a1-b8eb-30ba336af27d"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LeaseShareResponse = armstorage.LeaseShareResponse{ - // LeaseTimeSeconds: to.Ptr("0"), - // } -} diff --git a/sdk/resourcemanager/storage/armstorage/go.mod b/sdk/resourcemanager/storage/armstorage/go.mod index 60b6326c5579..3224f8544bad 100644 --- a/sdk/resourcemanager/storage/armstorage/go.mod +++ b/sdk/resourcemanager/storage/armstorage/go.mod @@ -4,13 +4,13 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.8.2 ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/sdk/resourcemanager/storage/armstorage/localusers_client.go b/sdk/resourcemanager/storage/armstorage/localusers_client.go index a89d9b42b134..b383525adffc 100644 --- a/sdk/resourcemanager/storage/armstorage/localusers_client.go +++ b/sdk/resourcemanager/storage/armstorage/localusers_client.go @@ -46,7 +46,7 @@ func NewLocalUsersClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Create or update the properties of a local user associated with the storage account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -101,7 +101,7 @@ func (client *LocalUsersClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { @@ -122,7 +122,7 @@ func (client *LocalUsersClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Deletes the local user associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -174,7 +174,7 @@ func (client *LocalUsersClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +183,7 @@ func (client *LocalUsersClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get the local user of the storage account by username. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -236,7 +236,7 @@ func (client *LocalUsersClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,7 +253,7 @@ func (client *LocalUsersClient) getHandleResponse(resp *http.Response) (LocalUse // NewListPager - List the local users associated with the storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -302,7 +302,7 @@ func (client *LocalUsersClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -320,7 +320,7 @@ func (client *LocalUsersClient) listHandleResponse(resp *http.Response) (LocalUs // ListKeys - List SSH authorized keys and shared key of the local user. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -373,7 +373,7 @@ func (client *LocalUsersClient) listKeysCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -391,7 +391,7 @@ func (client *LocalUsersClient) listKeysHandleResponse(resp *http.Response) (Loc // RegeneratePassword - Regenerate the local user SSH password. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -445,7 +445,7 @@ func (client *LocalUsersClient) regeneratePasswordCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storage/armstorage/localusers_client_example_test.go b/sdk/resourcemanager/storage/armstorage/localusers_client_example_test.go deleted file mode 100644 index 99e572eff66e..000000000000 --- a/sdk/resourcemanager/storage/armstorage/localusers_client_example_test.go +++ /dev/null @@ -1,303 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/LocalUsersList.json -func ExampleLocalUsersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLocalUsersClient().NewListPager("res6977", "sto2527", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LocalUsers = armstorage.LocalUsers{ - // Value: []*armstorage.LocalUser{ - // { - // Name: to.Ptr("user1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), - // Properties: &armstorage.LocalUserProperties{ - // HasSharedKey: to.Ptr(true), - // HasSSHKey: to.Ptr(true), - // HasSSHPassword: to.Ptr(true), - // HomeDirectory: to.Ptr("homedirectory"), - // PermissionScopes: []*armstorage.PermissionScope{ - // { - // Permissions: to.Ptr("rwd"), - // ResourceName: to.Ptr("share1"), - // Service: to.Ptr("file"), - // }, - // { - // Permissions: to.Ptr("rw"), - // ResourceName: to.Ptr("share2"), - // Service: to.Ptr("file"), - // }}, - // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), - // }, - // }, - // { - // Name: to.Ptr("user2"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/loalUsers/user2"), - // Properties: &armstorage.LocalUserProperties{ - // HasSharedKey: to.Ptr(true), - // HasSSHKey: to.Ptr(false), - // HasSSHPassword: to.Ptr(true), - // PermissionScopes: []*armstorage.PermissionScope{ - // { - // Permissions: to.Ptr("rw"), - // ResourceName: to.Ptr("resourcename"), - // Service: to.Ptr("blob"), - // }}, - // Sid: to.Ptr("S-1-2-0-533672-235636-66334-1001"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/LocalUserGet.json -func ExampleLocalUsersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalUsersClient().Get(ctx, "res6977", "sto2527", "user1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalUser = armstorage.LocalUser{ - // Name: to.Ptr("user1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), - // Properties: &armstorage.LocalUserProperties{ - // HasSharedKey: to.Ptr(true), - // HasSSHKey: to.Ptr(true), - // HasSSHPassword: to.Ptr(true), - // HomeDirectory: to.Ptr("homedirectory"), - // PermissionScopes: []*armstorage.PermissionScope{ - // { - // Permissions: to.Ptr("rwd"), - // ResourceName: to.Ptr("share1"), - // Service: to.Ptr("file"), - // }, - // { - // Permissions: to.Ptr("rw"), - // ResourceName: to.Ptr("share2"), - // Service: to.Ptr("file"), - // }}, - // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/LocalUserCreate.json -func ExampleLocalUsersClient_CreateOrUpdate_createLocalUser() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalUsersClient().CreateOrUpdate(ctx, "res6977", "sto2527", "user1", armstorage.LocalUser{ - Properties: &armstorage.LocalUserProperties{ - HasSSHPassword: to.Ptr(true), - HomeDirectory: to.Ptr("homedirectory"), - PermissionScopes: []*armstorage.PermissionScope{ - { - Permissions: to.Ptr("rwd"), - ResourceName: to.Ptr("share1"), - Service: to.Ptr("file"), - }, - { - Permissions: to.Ptr("rw"), - ResourceName: to.Ptr("share2"), - Service: to.Ptr("file"), - }}, - SSHAuthorizedKeys: []*armstorage.SSHPublicKey{ - { - Description: to.Ptr("key name"), - Key: to.Ptr("ssh-rsa keykeykeykeykey="), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalUser = armstorage.LocalUser{ - // Name: to.Ptr("user1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), - // Properties: &armstorage.LocalUserProperties{ - // HomeDirectory: to.Ptr("homedirectory"), - // PermissionScopes: []*armstorage.PermissionScope{ - // { - // Permissions: to.Ptr("rwd"), - // ResourceName: to.Ptr("share1"), - // Service: to.Ptr("file"), - // }, - // { - // Permissions: to.Ptr("rw"), - // ResourceName: to.Ptr("share2"), - // Service: to.Ptr("file"), - // }}, - // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), - // SSHAuthorizedKeys: []*armstorage.SSHPublicKey{ - // { - // Description: to.Ptr("key name"), - // Key: to.Ptr("ssh-rsa keykeykeykeykey="), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/LocalUserUpdate.json -func ExampleLocalUsersClient_CreateOrUpdate_updateLocalUser() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalUsersClient().CreateOrUpdate(ctx, "res6977", "sto2527", "user1", armstorage.LocalUser{ - Properties: &armstorage.LocalUserProperties{ - HasSharedKey: to.Ptr(false), - HasSSHKey: to.Ptr(false), - HasSSHPassword: to.Ptr(false), - HomeDirectory: to.Ptr("homedirectory2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalUser = armstorage.LocalUser{ - // Name: to.Ptr("user1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), - // Properties: &armstorage.LocalUserProperties{ - // HasSharedKey: to.Ptr(false), - // HasSSHKey: to.Ptr(false), - // HasSSHPassword: to.Ptr(false), - // HomeDirectory: to.Ptr("homedirectory2"), - // Sid: to.Ptr("S-1-2-0-3528686663-1788730862-2791910117-1000"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/LocalUserDelete.json -func ExampleLocalUsersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewLocalUsersClient().Delete(ctx, "res6977", "sto2527", "user1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/LocalUserListKeys.json -func ExampleLocalUsersClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalUsersClient().ListKeys(ctx, "res6977", "sto2527", "user1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalUserKeys = armstorage.LocalUserKeys{ - // SharedKey: to.Ptr(""), - // SSHAuthorizedKeys: []*armstorage.SSHPublicKey{ - // { - // Description: to.Ptr("key name"), - // Key: to.Ptr("ssh-rsa keykeykeykeykew="), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/LocalUserRegeneratePassword.json -func ExampleLocalUsersClient_RegeneratePassword() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalUsersClient().RegeneratePassword(ctx, "res6977", "sto2527", "user1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalUserRegeneratePasswordResult = armstorage.LocalUserRegeneratePasswordResult{ - // SSHPassword: to.Ptr(""), - // } -} diff --git a/sdk/resourcemanager/storage/armstorage/managementpolicies_client.go b/sdk/resourcemanager/storage/armstorage/managementpolicies_client.go index e91b7ca98707..2c743f68d9fa 100644 --- a/sdk/resourcemanager/storage/armstorage/managementpolicies_client.go +++ b/sdk/resourcemanager/storage/armstorage/managementpolicies_client.go @@ -46,7 +46,7 @@ func NewManagementPoliciesClient(subscriptionID string, credential azcore.TokenC // CreateOrUpdate - Sets the managementpolicy to the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -100,7 +100,7 @@ func (client *ManagementPoliciesClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { @@ -121,7 +121,7 @@ func (client *ManagementPoliciesClient) createOrUpdateHandleResponse(resp *http. // Delete - Deletes the managementpolicy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -173,7 +173,7 @@ func (client *ManagementPoliciesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -181,7 +181,7 @@ func (client *ManagementPoliciesClient) deleteCreateRequest(ctx context.Context, // Get - Gets the managementpolicy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -233,7 +233,7 @@ func (client *ManagementPoliciesClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storage/armstorage/managementpolicies_client_example_test.go b/sdk/resourcemanager/storage/armstorage/managementpolicies_client_example_test.go deleted file mode 100644 index 76ca4e86a800..000000000000 --- a/sdk/resourcemanager/storage/armstorage/managementpolicies_client_example_test.go +++ /dev/null @@ -1,1032 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountGetManagementPolicy.json -func ExampleManagementPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().Get(ctx, "res6977", "sto2527", armstorage.ManagementPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T03:01:55.7168089Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetManagementPolicy.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicies() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }, - { - Name: to.Ptr("olcmtest2"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobIndexMatch: []*armstorage.TagFilter{ - { - Name: to.Ptr("tag1"), - Op: to.Ptr("=="), - Value: to.Ptr("val1"), - }, - { - Name: to.Ptr("tag2"), - Op: to.Ptr("=="), - Value: to.Ptr("val2"), - }}, - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer2")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }, - // { - // Name: to.Ptr("olcmtest2"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobIndexMatch: []*armstorage.TagFilter{ - // { - // Name: to.Ptr("tag1"), - // Op: to.Ptr("=="), - // Value: to.Ptr("val1"), - // }, - // { - // Name: to.Ptr("tag2"), - // Op: to.Ptr("=="), - // Value: to.Ptr("val2"), - // }}, - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer2")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetManagementPolicyColdTierActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyColdTierActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCold: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - TierToCold: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - TierToCold: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCold: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // TierToCold: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // TierToCold: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyForBlockAndAppendBlobs() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob"), - to.Ptr("appendBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetManagementPolicyHotTierActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyHotTierActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - TierToHot: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - TierToHot: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - TierToHot: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // TierToHot: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // TierToHot: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // TierToHot: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyWithSnapshotAndVersion() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](1000), - }, - EnableAutoTierToHotFromCool: to.Ptr(true), - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](1000), - // }, - // EnableAutoTierToHotFromCool: to.Ptr(true), - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyLastTierChangeTimeActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](120), - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - TierToArchive: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - TierToArchive: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](120), - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // TierToArchive: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // TierToArchive: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountDeleteManagementPolicy.json -func ExampleManagementPoliciesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewManagementPoliciesClient().Delete(ctx, "res6977", "sto2527", armstorage.ManagementPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/storage/armstorage/models.go b/sdk/resourcemanager/storage/armstorage/models.go index d75f42df02c3..89d115ed2129 100644 --- a/sdk/resourcemanager/storage/armstorage/models.go +++ b/sdk/resourcemanager/storage/armstorage/models.go @@ -181,13 +181,46 @@ type AccountMicrosoftEndpoints struct { Web *string } +// AccountMigration - The parameters or status associated with an ongoing or enqueued storage account migration in order to +// update its current SKU or region. +type AccountMigration struct { + // REQUIRED; The properties of a storage account’s ongoing or enqueued migration. + StorageAccountMigrationDetails *AccountMigrationProperties + + // current value is 'default' for customer initiated migration + Name *string + + // SrpAccountMigrationType in ARM contract which is 'accountMigrations' + Type *string + + // READ-ONLY; Migration Resource Id + ID *string +} + +// AccountMigrationProperties - The properties of a storage account’s ongoing or enqueued migration. +type AccountMigrationProperties struct { + // REQUIRED; Target sku name for the account + TargetSKUName *SKUName + + // READ-ONLY; Reason for migration failure + MigrationFailedDetailedReason *string + + // READ-ONLY; Error code for migration failure + MigrationFailedReason *string + + // READ-ONLY; Current status of migration + MigrationStatus *MigrationStatus +} + // AccountProperties - Properties of the storage account. type AccountProperties struct { - // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for - // this property. + // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is false + // for this property. AllowBlobPublicAccess *bool - // Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. + // Allow or disallow cross AAD tenant object replication. Set this property to true for new or existing accounts only if object + // replication policies will involve storage accounts in different AAD + // tenants. The default interpretation is false for new accounts to follow best security practices by default. AllowCrossTenantReplication *bool // Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If @@ -249,6 +282,9 @@ type AccountProperties struct { // be changed for the premium block blobs storage account type. AccessTier *AccessTier + // READ-ONLY; If customer initiated account migration is in progress, the value will be true else it will be null. + AccountMigrationInProgress *bool + // READ-ONLY; Blob restore status BlobRestoreStatus *BlobRestoreStatus @@ -267,6 +303,9 @@ type AccountProperties struct { // READ-ONLY; Geo Replication Stats GeoReplicationStats *GeoReplicationStats + // READ-ONLY; This property will be set to true or false on an event of ongoing migration. Default value is null. + IsSKUConversionBlocked *bool + // READ-ONLY; Storage account keys creation time. KeyCreationTime *KeyCreationTime @@ -320,11 +359,13 @@ type AccountPropertiesCreateParameters struct { // be changed for the premium block blobs storage account type. AccessTier *AccessTier - // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for - // this property. + // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is false + // for this property. AllowBlobPublicAccess *bool - // Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. + // Allow or disallow cross AAD tenant object replication. Set this property to true for new or existing accounts only if object + // replication policies will involve storage accounts in different AAD + // tenants. The default interpretation is false for new accounts to follow best security practices by default. AllowCrossTenantReplication *bool // Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If @@ -403,11 +444,13 @@ type AccountPropertiesUpdateParameters struct { // be changed for the premium block blobs storage account type. AccessTier *AccessTier - // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for - // this property. + // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is false + // for this property. AllowBlobPublicAccess *bool - // Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. + // Allow or disallow cross AAD tenant object replication. Set this property to true for new or existing accounts only if object + // replication policies will involve storage accounts in different AAD + // tenants. The default interpretation is false for new accounts to follow best security practices by default. AllowCrossTenantReplication *bool // Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If @@ -559,6 +602,13 @@ type AccountsClientBeginCreateOptions struct { ResumeToken string } +// AccountsClientBeginCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.BeginCustomerInitiatedMigration +// method. +type AccountsClientBeginCustomerInitiatedMigrationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // AccountsClientBeginFailoverOptions contains the optional parameters for the AccountsClient.BeginFailover method. type AccountsClientBeginFailoverOptions struct { // The parameter is set to 'Planned' to indicate whether a Planned failover is requested.. Specifying any value will set the @@ -593,6 +643,12 @@ type AccountsClientDeleteOptions struct { // placeholder for future optional parameters } +// AccountsClientGetCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.GetCustomerInitiatedMigration +// method. +type AccountsClientGetCustomerInitiatedMigrationOptions struct { + // placeholder for future optional parameters +} + // AccountsClientGetPropertiesOptions contains the optional parameters for the AccountsClient.GetProperties method. type AccountsClientGetPropertiesOptions struct { // May be used to expand the properties within account's properties. By default, data is not included when fetching properties. @@ -808,6 +864,13 @@ type BlobContainersClientUpdateOptions struct { // placeholder for future optional parameters } +// BlobInventoryCreationTime - This property defines the creation time based filtering condition. Blob Inventory schema parameter +// 'Creation-Time' is mandatory with this filter. +type BlobInventoryCreationTime struct { + // When set the policy filters the objects that are created in the last N days. Where N is an integer value between 1 to 36500. + LastNDays *int32 +} + // BlobInventoryPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BlobInventoryPoliciesClient.CreateOrUpdate // method. type BlobInventoryPoliciesClientCreateOrUpdateOptions struct { @@ -892,6 +955,9 @@ type BlobInventoryPolicyFilter struct { // 'Blob'. BlobTypes []*string + // This property is used to filter objects based on the object creation time + CreationTime *BlobInventoryCreationTime + // An array of strings with maximum 10 blob prefixes to be excluded from the inventory. ExcludePrefix []*string @@ -1482,12 +1548,46 @@ type Endpoints struct { Web *string } +// ErrorAdditionalInfo - The resource management error additional info. +type ErrorAdditionalInfo struct { + // READ-ONLY; The additional info. + Info any + + // READ-ONLY; The additional info type. + Type *string +} + +// ErrorDetail - The error detail. +type ErrorDetail struct { + // READ-ONLY; The error additional info. + AdditionalInfo []*ErrorAdditionalInfo + + // READ-ONLY; The error code. + Code *string + + // READ-ONLY; The error details. + Details []*ErrorDetail + + // READ-ONLY; The error message. + Message *string + + // READ-ONLY; The error target. + Target *string +} + // ErrorResponse - An error response from the storage resource provider. type ErrorResponse struct { // Azure Storage Resource Provider error response body. Error *ErrorResponseBody } +// ErrorResponseAutoGenerated - 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 ErrorResponseAutoGenerated struct { + // The error object. + Error *ErrorDetail +} + // ErrorResponseBody - Error response body contract. type ErrorResponseBody struct { // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -1730,11 +1830,20 @@ type GeoReplicationStats struct { // READ-ONLY; A boolean flag which indicates whether or not account failover is supported for the account. CanFailover *bool + // READ-ONLY; A boolean flag which indicates whether or not planned account failover is supported for the account. + CanPlannedFailover *bool + // READ-ONLY; All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary // writes following this point in time may or may not be available for reads. Element may // be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. LastSyncTime *time.Time + // READ-ONLY; The redundancy type of the account after an account failover is performed. + PostFailoverRedundancy *PostFailoverRedundancy + + // READ-ONLY; The redundancy type of the account after a planned account failover is performed. + PostPlannedFailoverRedundancy *PostPlannedFailoverRedundancy + // READ-ONLY; The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is // active and operational. - Bootstrap: Indicates initial synchronization from the primary // location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: diff --git a/sdk/resourcemanager/storage/armstorage/models_serde.go b/sdk/resourcemanager/storage/armstorage/models_serde.go index e48c343882e4..a4a8557d0b8d 100644 --- a/sdk/resourcemanager/storage/armstorage/models_serde.go +++ b/sdk/resourcemanager/storage/armstorage/models_serde.go @@ -413,10 +413,89 @@ func (a *AccountMicrosoftEndpoints) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AccountMigration. +func (a AccountMigration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.StorageAccountMigrationDetails) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountMigration. +func (a *AccountMigration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "StorageAccountMigrationDetails", &a.StorageAccountMigrationDetails) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccountMigrationProperties. +func (a AccountMigrationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "migrationFailedDetailedReason", a.MigrationFailedDetailedReason) + populate(objectMap, "migrationFailedReason", a.MigrationFailedReason) + populate(objectMap, "migrationStatus", a.MigrationStatus) + populate(objectMap, "targetSkuName", a.TargetSKUName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountMigrationProperties. +func (a *AccountMigrationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "migrationFailedDetailedReason": + err = unpopulate(val, "MigrationFailedDetailedReason", &a.MigrationFailedDetailedReason) + delete(rawMsg, key) + case "migrationFailedReason": + err = unpopulate(val, "MigrationFailedReason", &a.MigrationFailedReason) + delete(rawMsg, key) + case "migrationStatus": + err = unpopulate(val, "MigrationStatus", &a.MigrationStatus) + delete(rawMsg, key) + case "targetSkuName": + err = unpopulate(val, "TargetSKUName", &a.TargetSKUName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AccountProperties. func (a AccountProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accessTier", a.AccessTier) + populate(objectMap, "accountMigrationInProgress", a.AccountMigrationInProgress) populate(objectMap, "allowBlobPublicAccess", a.AllowBlobPublicAccess) populate(objectMap, "allowCrossTenantReplication", a.AllowCrossTenantReplication) populate(objectMap, "allowSharedKeyAccess", a.AllowSharedKeyAccess) @@ -435,6 +514,7 @@ func (a AccountProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "immutableStorageWithVersioning", a.ImmutableStorageWithVersioning) populate(objectMap, "isHnsEnabled", a.IsHnsEnabled) populate(objectMap, "isLocalUserEnabled", a.IsLocalUserEnabled) + populate(objectMap, "isSkuConversionBlocked", a.IsSKUConversionBlocked) populate(objectMap, "isSftpEnabled", a.IsSftpEnabled) populate(objectMap, "keyCreationTime", a.KeyCreationTime) populate(objectMap, "keyPolicy", a.KeyPolicy) @@ -469,6 +549,9 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { case "accessTier": err = unpopulate(val, "AccessTier", &a.AccessTier) delete(rawMsg, key) + case "accountMigrationInProgress": + err = unpopulate(val, "AccountMigrationInProgress", &a.AccountMigrationInProgress) + delete(rawMsg, key) case "allowBlobPublicAccess": err = unpopulate(val, "AllowBlobPublicAccess", &a.AllowBlobPublicAccess) delete(rawMsg, key) @@ -523,6 +606,9 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { case "isLocalUserEnabled": err = unpopulate(val, "IsLocalUserEnabled", &a.IsLocalUserEnabled) delete(rawMsg, key) + case "isSkuConversionBlocked": + err = unpopulate(val, "IsSKUConversionBlocked", &a.IsSKUConversionBlocked) + delete(rawMsg, key) case "isSftpEnabled": err = unpopulate(val, "IsSftpEnabled", &a.IsSftpEnabled) delete(rawMsg, key) @@ -1146,6 +1232,33 @@ func (b *BlobContainer) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BlobInventoryCreationTime. +func (b BlobInventoryCreationTime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "lastNDays", b.LastNDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BlobInventoryCreationTime. +func (b *BlobInventoryCreationTime) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lastNDays": + err = unpopulate(val, "LastNDays", &b.LastNDays) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type BlobInventoryPolicy. func (b BlobInventoryPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1236,6 +1349,7 @@ func (b *BlobInventoryPolicyDefinition) UnmarshalJSON(data []byte) error { func (b BlobInventoryPolicyFilter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "blobTypes", b.BlobTypes) + populate(objectMap, "creationTime", b.CreationTime) populate(objectMap, "excludePrefix", b.ExcludePrefix) populate(objectMap, "includeBlobVersions", b.IncludeBlobVersions) populate(objectMap, "includeDeleted", b.IncludeDeleted) @@ -1256,6 +1370,9 @@ func (b *BlobInventoryPolicyFilter) UnmarshalJSON(data []byte) error { case "blobTypes": err = unpopulate(val, "BlobTypes", &b.BlobTypes) delete(rawMsg, key) + case "creationTime": + err = unpopulate(val, "CreationTime", &b.CreationTime) + delete(rawMsg, key) case "excludePrefix": err = unpopulate(val, "ExcludePrefix", &b.ExcludePrefix) delete(rawMsg, key) @@ -2519,6 +2636,80 @@ func (e *Endpoints) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. +func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "info", e.Info) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. +func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "info": + err = unpopulate(val, "Info", &e.Info) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. +func (e ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", e.AdditionalInfo) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. +func (e *ErrorDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ErrorResponse. func (e ErrorResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2546,6 +2737,33 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ErrorResponseAutoGenerated. +func (e ErrorResponseAutoGenerated) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseAutoGenerated. +func (e *ErrorResponseAutoGenerated) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ErrorResponseBody. func (e ErrorResponseBody) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2929,7 +3147,10 @@ func (f *FileShareProperties) UnmarshalJSON(data []byte) error { func (g GeoReplicationStats) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "canFailover", g.CanFailover) + populate(objectMap, "canPlannedFailover", g.CanPlannedFailover) populateTimeRFC3339(objectMap, "lastSyncTime", g.LastSyncTime) + populate(objectMap, "postFailoverRedundancy", g.PostFailoverRedundancy) + populate(objectMap, "postPlannedFailoverRedundancy", g.PostPlannedFailoverRedundancy) populate(objectMap, "status", g.Status) return json.Marshal(objectMap) } @@ -2946,9 +3167,18 @@ func (g *GeoReplicationStats) UnmarshalJSON(data []byte) error { case "canFailover": err = unpopulate(val, "CanFailover", &g.CanFailover) delete(rawMsg, key) + case "canPlannedFailover": + err = unpopulate(val, "CanPlannedFailover", &g.CanPlannedFailover) + delete(rawMsg, key) case "lastSyncTime": err = unpopulateTimeRFC3339(val, "LastSyncTime", &g.LastSyncTime) delete(rawMsg, key) + case "postFailoverRedundancy": + err = unpopulate(val, "PostFailoverRedundancy", &g.PostFailoverRedundancy) + delete(rawMsg, key) + case "postPlannedFailoverRedundancy": + err = unpopulate(val, "PostPlannedFailoverRedundancy", &g.PostPlannedFailoverRedundancy) + delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &g.Status) delete(rawMsg, key) @@ -6600,6 +6830,16 @@ func populate(m map[string]any, k string, v any) { } } +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + func unpopulate(data json.RawMessage, fn string, v any) error { if data == nil { return nil diff --git a/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client.go b/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client.go index 42783e84b59b..1536ffe0d689 100644 --- a/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client.go +++ b/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client.go @@ -46,7 +46,7 @@ func NewObjectReplicationPoliciesClient(subscriptionID string, credential azcore // CreateOrUpdate - Create or update the object replication policy of the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -102,7 +102,7 @@ func (client *ObjectReplicationPoliciesClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { @@ -123,7 +123,7 @@ func (client *ObjectReplicationPoliciesClient) createOrUpdateHandleResponse(resp // Delete - Deletes the object replication policy associated with the specified storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -177,7 +177,7 @@ func (client *ObjectReplicationPoliciesClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -186,7 +186,7 @@ func (client *ObjectReplicationPoliciesClient) deleteCreateRequest(ctx context.C // Get - Get the object replication policy of the storage account by policy ID. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -241,7 +241,7 @@ func (client *ObjectReplicationPoliciesClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,7 +258,7 @@ func (client *ObjectReplicationPoliciesClient) getHandleResponse(resp *http.Resp // NewListPager - List the object replication policies associated with the storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -308,7 +308,7 @@ func (client *ObjectReplicationPoliciesClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client_example_test.go b/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client_example_test.go deleted file mode 100644 index e16a6fceaf51..000000000000 --- a/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client_example_test.go +++ /dev/null @@ -1,382 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountListObjectReplicationPolicies.json -func ExampleObjectReplicationPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewObjectReplicationPoliciesClient().NewListPager("res6977", "sto2527", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ObjectReplicationPolicies = armstorage.ObjectReplicationPolicies{ - // Value: []*armstorage.ObjectReplicationPolicy{ - // { - // Name: to.Ptr("c6c23999-fd4e-433a-bcf9-1db69d27cd8a"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/c6c23999-fd4e-433a-bcf9-1db69d27cd8a"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("destAccount1"), - // SourceAccount: to.Ptr("sto2527"), - // }, - // }, - // { - // Name: to.Ptr("141d23dc-8958-4b48-b6e6-5a40bf1af116"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/objectReplicationPolicies/141d23dc-8958-4b48-b6e6-5a40bf1af116"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("destAccount2"), - // SourceAccount: to.Ptr("sto2527"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountGetObjectReplicationPolicy.json -func ExampleObjectReplicationPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewObjectReplicationPoliciesClient().Get(ctx, "res6977", "sto2527", "{objectReplicationPolicy-Id}", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ - // Name: to.Ptr("{objectReplicationPolicy-Id}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/{objectReplicationPolicy-Id}"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("destAccount1"), - // EnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-08T03:01:55.7168089Z"); return t}()), - // PolicyID: to.Ptr("{objectReplicationPolicy-Id}"), - // Rules: []*armstorage.ObjectReplicationPolicyRule{ - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // PrefixMatch: []*string{ - // to.Ptr("blobA"), - // to.Ptr("blobB")}, - // }, - // SourceContainer: to.Ptr("sourceContainer1"), - // }, - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // PrefixMatch: []*string{ - // to.Ptr("blobC"), - // to.Ptr("blobD")}, - // }, - // SourceContainer: to.Ptr("sourceContainer1"), - // }}, - // SourceAccount: to.Ptr("sto2527"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json -func ExampleObjectReplicationPoliciesClient_CreateOrUpdate_storageAccountCreateObjectReplicationPolicyOnDestination() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "dst112", "default", armstorage.ObjectReplicationPolicy{ - Properties: &armstorage.ObjectReplicationPolicyProperties{ - DestinationAccount: to.Ptr("dst112"), - Rules: []*armstorage.ObjectReplicationPolicyRule{ - { - DestinationContainer: to.Ptr("dcont139"), - Filters: &armstorage.ObjectReplicationPolicyFilter{ - PrefixMatch: []*string{ - to.Ptr("blobA"), - to.Ptr("blobB")}, - }, - SourceContainer: to.Ptr("scont139"), - }}, - SourceAccount: to.Ptr("src1122"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ - // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("dst112"), - // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Rules: []*armstorage.ObjectReplicationPolicyRule{ - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // PrefixMatch: []*string{ - // to.Ptr("blobA"), - // to.Ptr("blobB")}, - // }, - // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - // SourceContainer: to.Ptr("sourceContainer1"), - // }}, - // SourceAccount: to.Ptr("src1122"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountCreateObjectReplicationPolicyOnSource.json -func ExampleObjectReplicationPoliciesClient_CreateOrUpdate_storageAccountCreateObjectReplicationPolicyOnSource() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "src1122", "2a20bb73-5717-4635-985a-5d4cf777438f", armstorage.ObjectReplicationPolicy{ - Properties: &armstorage.ObjectReplicationPolicyProperties{ - DestinationAccount: to.Ptr("dst112"), - Rules: []*armstorage.ObjectReplicationPolicyRule{ - { - DestinationContainer: to.Ptr("dcont139"), - Filters: &armstorage.ObjectReplicationPolicyFilter{ - MinCreationTime: to.Ptr("2020-02-19T16:05:00Z"), - PrefixMatch: []*string{ - to.Ptr("blobA"), - to.Ptr("blobB")}, - }, - RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - SourceContainer: to.Ptr("scont139"), - }}, - SourceAccount: to.Ptr("src1122"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ - // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("dst112"), - // EnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-08T03:01:55.7168089Z"); return t}()), - // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Rules: []*armstorage.ObjectReplicationPolicyRule{ - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // MinCreationTime: to.Ptr("2020-02-19T16:05:00Z"), - // PrefixMatch: []*string{ - // to.Ptr("blobA"), - // to.Ptr("blobB")}, - // }, - // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - // SourceContainer: to.Ptr("sourceContainer1"), - // }}, - // SourceAccount: to.Ptr("src1122"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountUpdateObjectReplicationPolicyOnDestination.json -func ExampleObjectReplicationPoliciesClient_CreateOrUpdate_storageAccountUpdateObjectReplicationPolicyOnDestination() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "dst112", "2a20bb73-5717-4635-985a-5d4cf777438f", armstorage.ObjectReplicationPolicy{ - Properties: &armstorage.ObjectReplicationPolicyProperties{ - DestinationAccount: to.Ptr("dst112"), - Rules: []*armstorage.ObjectReplicationPolicyRule{ - { - DestinationContainer: to.Ptr("dcont139"), - Filters: &armstorage.ObjectReplicationPolicyFilter{ - PrefixMatch: []*string{ - to.Ptr("blobA"), - to.Ptr("blobB")}, - }, - RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - SourceContainer: to.Ptr("scont139"), - }, - { - DestinationContainer: to.Ptr("dcont179"), - SourceContainer: to.Ptr("scont179"), - }}, - SourceAccount: to.Ptr("src1122"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ - // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("dst112"), - // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Rules: []*armstorage.ObjectReplicationPolicyRule{ - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // PrefixMatch: []*string{ - // to.Ptr("blobA"), - // to.Ptr("blobB")}, - // }, - // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - // SourceContainer: to.Ptr("sourceContainer1"), - // }, - // { - // DestinationContainer: to.Ptr("dcont179"), - // RuleID: to.Ptr("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"), - // SourceContainer: to.Ptr("scont179"), - // }}, - // SourceAccount: to.Ptr("src1122"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json -func ExampleObjectReplicationPoliciesClient_CreateOrUpdate_storageAccountUpdateObjectReplicationPolicyOnSource() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "src1122", "2a20bb73-5717-4635-985a-5d4cf777438f", armstorage.ObjectReplicationPolicy{ - Properties: &armstorage.ObjectReplicationPolicyProperties{ - DestinationAccount: to.Ptr("dst112"), - Rules: []*armstorage.ObjectReplicationPolicyRule{ - { - DestinationContainer: to.Ptr("dcont139"), - Filters: &armstorage.ObjectReplicationPolicyFilter{ - PrefixMatch: []*string{ - to.Ptr("blobA"), - to.Ptr("blobB")}, - }, - RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - SourceContainer: to.Ptr("scont139"), - }, - { - DestinationContainer: to.Ptr("dcont179"), - RuleID: to.Ptr("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"), - SourceContainer: to.Ptr("scont179"), - }}, - SourceAccount: to.Ptr("src1122"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ - // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("dst112"), - // EnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-08T03:01:55.7168089Z"); return t}()), - // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Rules: []*armstorage.ObjectReplicationPolicyRule{ - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // PrefixMatch: []*string{ - // to.Ptr("blobA"), - // to.Ptr("blobB")}, - // }, - // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - // SourceContainer: to.Ptr("sourceContainer1"), - // }, - // { - // DestinationContainer: to.Ptr("dcont179"), - // RuleID: to.Ptr("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"), - // SourceContainer: to.Ptr("scont179"), - // }}, - // SourceAccount: to.Ptr("src1122"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountDeleteObjectReplicationPolicy.json -func ExampleObjectReplicationPoliciesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewObjectReplicationPoliciesClient().Delete(ctx, "res6977", "sto2527", "{objectReplicationPolicy-Id}", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/storage/armstorage/operations_client.go b/sdk/resourcemanager/storage/armstorage/operations_client.go index 24ea8449a8c5..4fb315aa7b09 100644 --- a/sdk/resourcemanager/storage/armstorage/operations_client.go +++ b/sdk/resourcemanager/storage/armstorage/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Storage Rest API operations. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -73,7 +73,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storage/armstorage/operations_client_example_test.go b/sdk/resourcemanager/storage/armstorage/operations_client_example_test.go deleted file mode 100644 index 73adbdfb85f8..000000000000 --- a/sdk/resourcemanager/storage/armstorage/operations_client_example_test.go +++ /dev/null @@ -1,498 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/OperationsList.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationListResult = armstorage.OperationListResult{ - // Value: []*armstorage.Operation{ - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates a storage account with the specified parameters or update the properties or tags or adds custom domain for the specified storage account."), - // Operation: to.Ptr("Create/Update Storage Account"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/delete"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Deletes an existing storage account."), - // Operation: to.Ptr("Delete Storage Account"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/listkeys/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Returns the access keys for the specified storage account."), - // Operation: to.Ptr("List Storage Account Keys"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/regeneratekey/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Regenerates the access keys for the specified storage account."), - // Operation: to.Ptr("Regenerate Storage Account Keys"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/checknameavailability/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Checks that account name is valid and is not in use."), - // Operation: to.Ptr("Check Name Availability"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Name Availability"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Returns the list of storage accounts or gets the properties for the specified storage account."), - // Operation: to.Ptr("List/Get Storage Account(s)"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/usages/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Returns the limit and the current usage count for resources in the specified subscription"), - // Operation: to.Ptr("Get Subscription Usages"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Usage Metrics"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/listAccountSas/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Returns the Account SAS token for the specified storage account."), - // Operation: to.Ptr("Returns Storage Account SAS Token"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Account SAS Token"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/listServiceSas/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Storage Service SAS Token"), - // Operation: to.Ptr("Returns Storage Service SAS Token"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Returns the Service SAS token for the specified storage account."), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/locations/deleteVirtualNetworkOrSubnets/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Notifies Microsoft.Storage that virtual network or subnet is being deleted"), - // Operation: to.Ptr("Delete virtual network or subnets notifications"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Location"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/operations/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Polls the status of an asynchronous operation."), - // Operation: to.Ptr("Poll Asynchronous Operation"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Operations"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/register/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Registers the subscription for the storage resource provider and enables the creation of storage accounts."), - // Operation: to.Ptr("Registers the Storage Resource Provider"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Resource Provider"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/skus/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Lists the Skus supported by Microsoft.Storage."), - // Operation: to.Ptr("List Skus"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Skus"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/services/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Create/Update storage account diagnostic settings."), - // Operation: to.Ptr("Create/Update Diagnostic Settings"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("UsedCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("Account used capacity"), - // DisplayName: to.Ptr("Used capacity"), - // FillGapWithZero: to.Ptr(false), - // ResourceIDDimensionNameOverride: to.Ptr("AccountResourceId"), - // Unit: to.Ptr("Bytes"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Blob service"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("BlobCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // Dimensions: []*armstorage.Dimension{ - // { - // Name: to.Ptr("BlobType"), - // DisplayName: to.Ptr("Blob type"), - // }}, - // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s Blob service in bytes."), - // DisplayName: to.Ptr("Blob Capacity"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("BlobCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // Dimensions: []*armstorage.Dimension{ - // { - // Name: to.Ptr("BlobType"), - // DisplayName: to.Ptr("Blob type"), - // }}, - // DisplayDescription: to.Ptr("The number of Blob in the storage account’s Blob service."), - // DisplayName: to.Ptr("Blob Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("ContainerCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of containers in the storage account’s Blob service."), - // DisplayName: to.Ptr("Blob Container Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("BlobProvisionedSize"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // Dimensions: []*armstorage.Dimension{ - // { - // Name: to.Ptr("BlobType"), - // DisplayName: to.Ptr("Blob type"), - // }}, - // DisplayDescription: to.Ptr("The amount of storage provisioned in the storage account’s Blob service in bytes."), - // DisplayName: to.Ptr("Blob Provisioned Size"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Blob service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Blob service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Table service"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("TableCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s Table service in bytes."), - // DisplayName: to.Ptr("Table Capacity"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("TableCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of table in the storage account’s Table service."), - // DisplayName: to.Ptr("Table Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("TableEntityCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of table entities in the storage account’s Table service."), - // DisplayName: to.Ptr("Table Entity Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Table service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Table service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Queue service"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("QueueCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s Queue service in bytes."), - // DisplayName: to.Ptr("Queue Capacity"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("QueueCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of queue in the storage account’s Queue service."), - // DisplayName: to.Ptr("Queue Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("QueueMessageCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The approximate number of queue messages in the storage account’s Queue service."), - // DisplayName: to.Ptr("Queue Message Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Queue service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Queue service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("File service"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("FileCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s File service in bytes."), - // DisplayName: to.Ptr("File Capacity"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("FileProvisionedSize"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The amount of storage provisioned in the storage account’s File service in bytes."), - // DisplayName: to.Ptr("File Provisioned Size"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("FileCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of file in the storage account’s File service."), - // DisplayName: to.Ptr("File Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("FileShareCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of file shares in the storage account’s File service."), - // DisplayName: to.Ptr("File Share Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("File service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("File service"), - // }, - // Origin: to.Ptr("system"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go b/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go index 7fa15e1dbae7..6e36d82ded1b 100644 --- a/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go +++ b/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go @@ -46,7 +46,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // Delete - Deletes the specified private endpoint connection associated with the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -98,7 +98,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -107,7 +107,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -160,7 +160,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -177,7 +177,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListPager - List all the private endpoint connections associated with the storage account. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -227,7 +227,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,7 +245,7 @@ func (client *PrivateEndpointConnectionsClient) listHandleResponse(resp *http.Re // Put - Update the state of specified private endpoint connection associated with the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -299,7 +299,7 @@ func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client_example_test.go deleted file mode 100644 index e5498c83a81d..000000000000 --- a/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client_example_test.go +++ /dev/null @@ -1,175 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountListPrivateEndpointConnections.json -func ExamplePrivateEndpointConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("res6977", "sto2527", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateEndpointConnectionListResult = armstorage.PrivateEndpointConnectionListResult{ - // Value: []*armstorage.PrivateEndpointConnection{ - // { - // Name: to.Ptr("{privateEndpointConnectionName}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"), - // Properties: &armstorage.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armstorage.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"), - // }, - // PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Auto-Approved"), - // ActionRequired: to.Ptr("None"), - // Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armstorage.PrivateEndpointConnectionProvisioningStateSucceeded), - // }, - // }, - // { - // Name: to.Ptr("{privateEndpointConnectionName}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"), - // Properties: &armstorage.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armstorage.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest02"), - // }, - // PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Auto-Approved"), - // ActionRequired: to.Ptr("None"), - // Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armstorage.PrivateEndpointConnectionProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountGetPrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "res6977", "sto2527", "{privateEndpointConnectionName}", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateEndpointConnection = armstorage.PrivateEndpointConnection{ - // Name: to.Ptr("{privateEndpointConnectionName}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"), - // Properties: &armstorage.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armstorage.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"), - // }, - // PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Auto-Approved"), - // ActionRequired: to.Ptr("None"), - // Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armstorage.PrivateEndpointConnectionProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountPutPrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_Put() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionsClient().Put(ctx, "res7687", "sto9699", "{privateEndpointConnectionName}", armstorage.PrivateEndpointConnection{ - Properties: &armstorage.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ - Description: to.Ptr("Auto-Approved"), - Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateEndpointConnection = armstorage.PrivateEndpointConnection{ - // Name: to.Ptr("{privateEndpointConnectionName}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"), - // Properties: &armstorage.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armstorage.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"), - // }, - // PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Auto-Approved"), - // ActionRequired: to.Ptr("None"), - // Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armstorage.PrivateEndpointConnectionProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountDeletePrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPrivateEndpointConnectionsClient().Delete(ctx, "res6977", "sto2527", "{privateEndpointConnectionName}", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/storage/armstorage/privatelinkresources_client.go b/sdk/resourcemanager/storage/armstorage/privatelinkresources_client.go index c02c8331a822..d2520e59f7de 100644 --- a/sdk/resourcemanager/storage/armstorage/privatelinkresources_client.go +++ b/sdk/resourcemanager/storage/armstorage/privatelinkresources_client.go @@ -46,7 +46,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // ListByStorageAccount - Gets the private link resources that need to be created for a storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -94,7 +94,7 @@ func (client *PrivateLinkResourcesClient) listByStorageAccountCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storage/armstorage/privatelinkresources_client_example_test.go b/sdk/resourcemanager/storage/armstorage/privatelinkresources_client_example_test.go deleted file mode 100644 index 8f62ce3e3f1a..000000000000 --- a/sdk/resourcemanager/storage/armstorage/privatelinkresources_client_example_test.go +++ /dev/null @@ -1,113 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountListPrivateLinkResources.json -func ExamplePrivateLinkResourcesClient_ListByStorageAccount() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateLinkResourcesClient().ListByStorageAccount(ctx, "res6977", "sto2527", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkResourceListResult = armstorage.PrivateLinkResourceListResult{ - // Value: []*armstorage.PrivateLinkResource{ - // { - // Name: to.Ptr("blob"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob"), - // Properties: &armstorage.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("blob"), - // RequiredMembers: []*string{ - // to.Ptr("blob")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.blob.core.windows.net")}, - // }, - // }, - // { - // Name: to.Ptr("blob_secondary"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob_secondary"), - // Properties: &armstorage.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("blob_secondary"), - // RequiredMembers: []*string{ - // to.Ptr("blob_secondary")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.blob.core.windows.net")}, - // }, - // }, - // { - // Name: to.Ptr("table"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table"), - // Properties: &armstorage.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("table"), - // RequiredMembers: []*string{ - // to.Ptr("table")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.table.core.windows.net")}, - // }, - // }, - // { - // Name: to.Ptr("table_secondary"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table_secondary"), - // Properties: &armstorage.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("table_secondary"), - // RequiredMembers: []*string{ - // to.Ptr("table_secondary")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.table.core.windows.net")}, - // }, - // }, - // { - // Name: to.Ptr("dfs"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs"), - // Properties: &armstorage.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("dfs"), - // RequiredMembers: []*string{ - // to.Ptr("dfs")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.dfs.core.windows.net")}, - // }, - // }, - // { - // Name: to.Ptr("dfs_secondary"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs_secondary"), - // Properties: &armstorage.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("dfs_secondary"), - // RequiredMembers: []*string{ - // to.Ptr("dfs_secondary")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.dfs.core.windows.net")}, - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/storage/armstorage/queue_client.go b/sdk/resourcemanager/storage/armstorage/queue_client.go index c3b0a0befb50..fb7f6a008771 100644 --- a/sdk/resourcemanager/storage/armstorage/queue_client.go +++ b/sdk/resourcemanager/storage/armstorage/queue_client.go @@ -46,7 +46,7 @@ func NewQueueClient(subscriptionID string, credential azcore.TokenCredential, op // Create - Creates a new queue with the specified queue name, under the specified account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -101,7 +101,7 @@ func (client *QueueClient) createCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, queue); err != nil { @@ -122,7 +122,7 @@ func (client *QueueClient) createHandleResponse(resp *http.Response) (QueueClien // Delete - Deletes the queue with the specified queue name, under the specified account if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -175,7 +175,7 @@ func (client *QueueClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,7 +184,7 @@ func (client *QueueClient) deleteCreateRequest(ctx context.Context, resourceGrou // Get - Gets the queue with the specified queue name, under the specified account if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -238,7 +238,7 @@ func (client *QueueClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,7 +255,7 @@ func (client *QueueClient) getHandleResponse(resp *http.Response) (QueueClientGe // NewListPager - Gets a list of all the queues under the specified storage account // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -310,7 +310,7 @@ func (client *QueueClient) listCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", *options.Maxpagesize) } @@ -334,7 +334,7 @@ func (client *QueueClient) listHandleResponse(resp *http.Response) (QueueClientL // Update - Creates a new queue with the specified queue name, under the specified account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -389,7 +389,7 @@ func (client *QueueClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, queue); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/queue_client_example_test.go b/sdk/resourcemanager/storage/armstorage/queue_client_example_test.go deleted file mode 100644 index 635c16bbd07e..000000000000 --- a/sdk/resourcemanager/storage/armstorage/queue_client_example_test.go +++ /dev/null @@ -1,207 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/QueueOperationPut.json -func ExampleQueueClient_Create_queueOperationPut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueueClient().Create(ctx, "res3376", "sto328", "queue6185", armstorage.Queue{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Queue = armstorage.Queue{ - // Name: to.Ptr("queue6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/QueueOperationPutWithMetadata.json -func ExampleQueueClient_Create_queueOperationPutWithMetadata() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueueClient().Create(ctx, "res3376", "sto328", "queue6185", armstorage.Queue{ - QueueProperties: &armstorage.QueueProperties{ - Metadata: map[string]*string{ - "sample1": to.Ptr("meta1"), - "sample2": to.Ptr("meta2"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Queue = armstorage.Queue{ - // Name: to.Ptr("queue6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), - // QueueProperties: &armstorage.QueueProperties{ - // Metadata: map[string]*string{ - // "sample1": to.Ptr("meta1"), - // "sample2": to.Ptr("meta2"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/QueueOperationPatch.json -func ExampleQueueClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueueClient().Update(ctx, "res3376", "sto328", "queue6185", armstorage.Queue{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Queue = armstorage.Queue{ - // Name: to.Ptr("queue6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/QueueOperationGet.json -func ExampleQueueClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueueClient().Get(ctx, "res3376", "sto328", "queue6185", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Queue = armstorage.Queue{ - // Name: to.Ptr("queue6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), - // QueueProperties: &armstorage.QueueProperties{ - // Metadata: map[string]*string{ - // "sample1": to.Ptr("meta1"), - // "sample2": to.Ptr("meta2"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/QueueOperationDelete.json -func ExampleQueueClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewQueueClient().Delete(ctx, "res3376", "sto328", "queue6185", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/QueueOperationList.json -func ExampleQueueClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewQueueClient().NewListPager("res9290", "sto328", &armstorage.QueueClientListOptions{Maxpagesize: nil, - Filter: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListQueueResource = armstorage.ListQueueResource{ - // Value: []*armstorage.ListQueue{ - // { - // Name: to.Ptr("queue6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), - // QueueProperties: &armstorage.ListQueueProperties{ - // Metadata: map[string]*string{ - // "sample1": to.Ptr("meta1"), - // "sample2": to.Ptr("meta2"), - // }, - // }, - // }, - // { - // Name: to.Ptr("queue6186"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6186"), - // QueueProperties: &armstorage.ListQueueProperties{ - // Metadata: map[string]*string{ - // "sample1": to.Ptr("meta1"), - // "sample2": to.Ptr("meta2"), - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/queueservices_client.go b/sdk/resourcemanager/storage/armstorage/queueservices_client.go index 21e2f89e3ac5..e2946bce9d60 100644 --- a/sdk/resourcemanager/storage/armstorage/queueservices_client.go +++ b/sdk/resourcemanager/storage/armstorage/queueservices_client.go @@ -47,7 +47,7 @@ func NewQueueServicesClient(subscriptionID string, credential azcore.TokenCreden // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -96,7 +96,7 @@ func (client *QueueServicesClient) getServicePropertiesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +114,7 @@ func (client *QueueServicesClient) getServicePropertiesHandleResponse(resp *http // List - List all queue services for the storage account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -161,7 +161,7 @@ func (client *QueueServicesClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *QueueServicesClient) listHandleResponse(resp *http.Response) (Queu // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -231,7 +231,7 @@ func (client *QueueServicesClient) setServicePropertiesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/queueservices_client_example_test.go b/sdk/resourcemanager/storage/armstorage/queueservices_client_example_test.go deleted file mode 100644 index 915266955ba1..000000000000 --- a/sdk/resourcemanager/storage/armstorage/queueservices_client_example_test.go +++ /dev/null @@ -1,298 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/QueueServicesList.json -func ExampleQueueServicesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueueServicesClient().List(ctx, "res9290", "sto1590", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListQueueServices = armstorage.ListQueueServices{ - // Value: []*armstorage.QueueServiceProperties{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default"), - // QueueServiceProperties: &armstorage.QueueServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/QueueServicesPut.json -func ExampleQueueServicesClient_SetServiceProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueueServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.QueueServiceProperties{ - QueueServiceProperties: &armstorage.QueueServicePropertiesProperties{ - Cors: &armstorage.CorsRules{ - CorsRules: []*armstorage.CorsRule{ - { - AllowedHeaders: []*string{ - to.Ptr("x-ms-meta-abc"), - to.Ptr("x-ms-meta-data*"), - to.Ptr("x-ms-meta-target*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - AllowedOrigins: []*string{ - to.Ptr("http://www.contoso.com"), - to.Ptr("http://www.fabrikam.com")}, - ExposedHeaders: []*string{ - to.Ptr("x-ms-meta-*")}, - MaxAgeInSeconds: to.Ptr[int32](100), - }, - { - AllowedHeaders: []*string{ - to.Ptr("*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - AllowedOrigins: []*string{ - to.Ptr("*")}, - ExposedHeaders: []*string{ - to.Ptr("*")}, - MaxAgeInSeconds: to.Ptr[int32](2), - }, - { - AllowedHeaders: []*string{ - to.Ptr("x-ms-meta-12345675754564*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - AllowedOrigins: []*string{ - to.Ptr("http://www.abc23.com"), - to.Ptr("https://www.fabrikam.com/*")}, - ExposedHeaders: []*string{ - to.Ptr("x-ms-meta-abc"), - to.Ptr("x-ms-meta-data*"), - to.Ptr("x-ms-meta-target*")}, - MaxAgeInSeconds: to.Ptr[int32](2000), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.QueueServiceProperties = armstorage.QueueServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default"), - // QueueServiceProperties: &armstorage.QueueServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/QueueServicesGet.json -func ExampleQueueServicesClient_GetServiceProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueueServicesClient().GetServiceProperties(ctx, "res4410", "sto8607", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.QueueServiceProperties = armstorage.QueueServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default"), - // QueueServiceProperties: &armstorage.QueueServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/storage/armstorage/response_types.go b/sdk/resourcemanager/storage/armstorage/response_types.go index ab83d9fbbf2f..8e501dea8ded 100644 --- a/sdk/resourcemanager/storage/armstorage/response_types.go +++ b/sdk/resourcemanager/storage/armstorage/response_types.go @@ -23,6 +23,11 @@ type AccountsClientCreateResponse struct { Account } +// AccountsClientCustomerInitiatedMigrationResponse contains the response from method AccountsClient.BeginCustomerInitiatedMigration. +type AccountsClientCustomerInitiatedMigrationResponse struct { + // placeholder for future response values +} + // AccountsClientDeleteResponse contains the response from method AccountsClient.Delete. type AccountsClientDeleteResponse struct { // placeholder for future response values @@ -33,6 +38,11 @@ type AccountsClientFailoverResponse struct { // placeholder for future response values } +// AccountsClientGetCustomerInitiatedMigrationResponse contains the response from method AccountsClient.GetCustomerInitiatedMigration. +type AccountsClientGetCustomerInitiatedMigrationResponse struct { + AccountMigration +} + // AccountsClientGetPropertiesResponse contains the response from method AccountsClient.GetProperties. type AccountsClientGetPropertiesResponse struct { Account diff --git a/sdk/resourcemanager/storage/armstorage/skus_client.go b/sdk/resourcemanager/storage/armstorage/skus_client.go index 36433821a32b..f0549b1b5baa 100644 --- a/sdk/resourcemanager/storage/armstorage/skus_client.go +++ b/sdk/resourcemanager/storage/armstorage/skus_client.go @@ -45,7 +45,7 @@ func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, opt // NewListPager - Lists the available SKUs supported by Microsoft.Storage for given subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ @@ -83,7 +83,7 @@ func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsCl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storage/armstorage/skus_client_example_test.go b/sdk/resourcemanager/storage/armstorage/skus_client_example_test.go deleted file mode 100644 index f62bf5ba8abc..000000000000 --- a/sdk/resourcemanager/storage/armstorage/skus_client_example_test.go +++ /dev/null @@ -1,6238 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/SKUList.json -func ExampleSKUsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSKUsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SKUListResult = armstorage.SKUListResult{ - // Value: []*armstorage.SKUInformation{ - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2(stage)")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2(stage)")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2(stage)")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2(stage)")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2(stage)")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus2(stage)")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus2(stage)")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus2(stage)")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southeastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southeastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southeastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southeastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southeastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("southeastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("southeastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("southeastasia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japaneast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japaneast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japaneast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japaneast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japaneast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("japaneast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("japaneast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("japaneast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japanwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japanwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japanwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japanwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("japanwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("japanwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("japanwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("japanwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("northcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("northcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("northcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("southcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("southcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("southcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("centralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("centralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("centralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("northeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("northeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("northeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("northeurope")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("brazilsouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("brazilsouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("brazilsouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("brazilsouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("brazilsouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("brazilsouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("brazilsouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("brazilsouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("australiaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("australiaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("australiaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiasoutheast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiasoutheast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiasoutheast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiasoutheast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("australiasoutheast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("australiasoutheast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("australiasoutheast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("australiasoutheast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("southindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("southindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("southindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("southindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centralindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("centralindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("centralindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("centralindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westindia")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("canadaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("canadaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("canadaeast")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("canadacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("canadacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("canadacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("canadacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westus2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("westcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("westcentralus")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("uksouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("uksouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("uksouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("ukwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("ukwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("ukwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("ukwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("ukwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("ukwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("ukwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("ukwest")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("koreacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("koreacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("koreacentral")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreasouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreasouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreasouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreasouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("koreasouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("koreasouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("koreasouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("koreasouth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uknorth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uknorth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uknorth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uknorth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uknorth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("uknorth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("uknorth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("uknorth")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("uksouth2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("uksouth2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("uksouth2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("uksouth2")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2euap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2euap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2euap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2euap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("eastus2euap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus2euap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus2euap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("eastus2euap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centraluseuap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardZRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centraluseuap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centraluseuap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centraluseuap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindStorage), - // Locations: []*string{ - // to.Ptr("centraluseuap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportsarchivepreview"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("centraluseuap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("true"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("centraluseuap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // { - // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), - // Capabilities: []*armstorage.SKUCapability{ - // { - // Name: to.Ptr("supportschangenotification"), - // Value: to.Ptr("true"), - // }, - // { - // Name: to.Ptr("supportsfileencryption"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportshoeboxcapacitymetrics"), - // Value: to.Ptr("false"), - // }, - // { - // Name: to.Ptr("supportsnetworkacls"), - // Value: to.Ptr("false"), - // }}, - // Kind: to.Ptr(armstorage.KindBlobStorage), - // Locations: []*string{ - // to.Ptr("centraluseuap")}, - // ResourceType: to.Ptr("storageAccounts"), - // Restrictions: []*armstorage.Restriction{ - // }, - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/table_client.go b/sdk/resourcemanager/storage/armstorage/table_client.go index 8dd973a7cb7d..8772a4e3f5d9 100644 --- a/sdk/resourcemanager/storage/armstorage/table_client.go +++ b/sdk/resourcemanager/storage/armstorage/table_client.go @@ -46,7 +46,7 @@ func NewTableClient(subscriptionID string, credential azcore.TokenCredential, op // Create - Creates a new table with the specified table name, under the specified account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -99,7 +99,7 @@ func (client *TableClient) createCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -123,7 +123,7 @@ func (client *TableClient) createHandleResponse(resp *http.Response) (TableClien // Delete - Deletes the table with the specified table name, under the specified account if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -175,7 +175,7 @@ func (client *TableClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,7 +184,7 @@ func (client *TableClient) deleteCreateRequest(ctx context.Context, resourceGrou // Get - Gets the table with the specified table name, under the specified account if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -237,7 +237,7 @@ func (client *TableClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +254,7 @@ func (client *TableClient) getHandleResponse(resp *http.Response) (TableClientGe // NewListPager - Gets a list of all the tables under the specified storage account // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -309,7 +309,7 @@ func (client *TableClient) listCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,7 +327,7 @@ func (client *TableClient) listHandleResponse(resp *http.Response) (TableClientL // Update - Creates a new table with the specified table name, under the specified account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -380,7 +380,7 @@ func (client *TableClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { diff --git a/sdk/resourcemanager/storage/armstorage/table_client_example_test.go b/sdk/resourcemanager/storage/armstorage/table_client_example_test.go deleted file mode 100644 index b24c5f9d026c..000000000000 --- a/sdk/resourcemanager/storage/armstorage/table_client_example_test.go +++ /dev/null @@ -1,232 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/TableOperationPut.json -func ExampleTableClient_Create_tableOperationPut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTableClient().Create(ctx, "res3376", "sto328", "table6185", &armstorage.TableClientCreateOptions{Parameters: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Table = armstorage.Table{ - // Name: to.Ptr("table6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), - // TableProperties: &armstorage.TableProperties{ - // TableName: to.Ptr("table6185"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/TableOperationPutOrPatchAcls.json -func ExampleTableClient_Create_tableOperationPutOrPatchAcls() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTableClient().Create(ctx, "res3376", "sto328", "table6185", &armstorage.TableClientCreateOptions{Parameters: &armstorage.Table{ - TableProperties: &armstorage.TableProperties{ - SignedIdentifiers: []*armstorage.TableSignedIdentifier{ - { - AccessPolicy: &armstorage.TableAccessPolicy{ - ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.0000000Z"); return t }()), - Permission: to.Ptr("raud"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.0000000Z"); return t }()), - }, - ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), - }, - { - AccessPolicy: &armstorage.TableAccessPolicy{ - ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.0000000Z"); return t }()), - Permission: to.Ptr("rad"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.0000000Z"); return t }()), - }, - ID: to.Ptr("PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"), - }}, - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Table = armstorage.Table{ - // Name: to.Ptr("table6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), - // TableProperties: &armstorage.TableProperties{ - // SignedIdentifiers: []*armstorage.TableSignedIdentifier{ - // { - // AccessPolicy: &armstorage.TableAccessPolicy{ - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.0000000Z"); return t}()), - // Permission: to.Ptr("raud"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.0000000Z"); return t}()), - // }, - // ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), - // }, - // { - // AccessPolicy: &armstorage.TableAccessPolicy{ - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.0000000Z"); return t}()), - // Permission: to.Ptr("rad"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.0000000Z"); return t}()), - // }, - // ID: to.Ptr("PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"), - // }}, - // TableName: to.Ptr("table6185"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/TableOperationPatch.json -func ExampleTableClient_Update_tableOperationPatch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTableClient().Update(ctx, "res3376", "sto328", "table6185", &armstorage.TableClientUpdateOptions{Parameters: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Table = armstorage.Table{ - // Name: to.Ptr("table6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), - // TableProperties: &armstorage.TableProperties{ - // TableName: to.Ptr("table6185"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/TableOperationGet.json -func ExampleTableClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTableClient().Get(ctx, "res3376", "sto328", "table6185", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Table = armstorage.Table{ - // Name: to.Ptr("table6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), - // TableProperties: &armstorage.TableProperties{ - // TableName: to.Ptr("table6185"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/TableOperationDelete.json -func ExampleTableClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTableClient().Delete(ctx, "res3376", "sto328", "table6185", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/TableOperationList.json -func ExampleTableClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewTableClient().NewListPager("res9290", "sto328", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListTableResource = armstorage.ListTableResource{ - // Value: []*armstorage.Table{ - // { - // Name: to.Ptr("table6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), - // TableProperties: &armstorage.TableProperties{ - // TableName: to.Ptr("table6185"), - // }, - // }, - // { - // Name: to.Ptr("table6186"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6186"), - // TableProperties: &armstorage.TableProperties{ - // TableName: to.Ptr("table6186"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/tableservices_client.go b/sdk/resourcemanager/storage/armstorage/tableservices_client.go index 010189120092..bd288a9cfb40 100644 --- a/sdk/resourcemanager/storage/armstorage/tableservices_client.go +++ b/sdk/resourcemanager/storage/armstorage/tableservices_client.go @@ -47,7 +47,7 @@ func NewTableServicesClient(subscriptionID string, credential azcore.TokenCreden // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -96,7 +96,7 @@ func (client *TableServicesClient) getServicePropertiesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +114,7 @@ func (client *TableServicesClient) getServicePropertiesHandleResponse(resp *http // List - List all table services for the storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -161,7 +161,7 @@ func (client *TableServicesClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *TableServicesClient) listHandleResponse(resp *http.Response) (Tabl // and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - 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. @@ -231,7 +231,7 @@ func (client *TableServicesClient) setServicePropertiesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/storage/armstorage/tableservices_client_example_test.go b/sdk/resourcemanager/storage/armstorage/tableservices_client_example_test.go deleted file mode 100644 index bfa1c33c5ce4..000000000000 --- a/sdk/resourcemanager/storage/armstorage/tableservices_client_example_test.go +++ /dev/null @@ -1,298 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/TableServicesList.json -func ExampleTableServicesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTableServicesClient().List(ctx, "res9290", "sto1590", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListTableServices = armstorage.ListTableServices{ - // Value: []*armstorage.TableServiceProperties{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default"), - // TableServiceProperties: &armstorage.TableServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/TableServicesPut.json -func ExampleTableServicesClient_SetServiceProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTableServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.TableServiceProperties{ - TableServiceProperties: &armstorage.TableServicePropertiesProperties{ - Cors: &armstorage.CorsRules{ - CorsRules: []*armstorage.CorsRule{ - { - AllowedHeaders: []*string{ - to.Ptr("x-ms-meta-abc"), - to.Ptr("x-ms-meta-data*"), - to.Ptr("x-ms-meta-target*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - AllowedOrigins: []*string{ - to.Ptr("http://www.contoso.com"), - to.Ptr("http://www.fabrikam.com")}, - ExposedHeaders: []*string{ - to.Ptr("x-ms-meta-*")}, - MaxAgeInSeconds: to.Ptr[int32](100), - }, - { - AllowedHeaders: []*string{ - to.Ptr("*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - AllowedOrigins: []*string{ - to.Ptr("*")}, - ExposedHeaders: []*string{ - to.Ptr("*")}, - MaxAgeInSeconds: to.Ptr[int32](2), - }, - { - AllowedHeaders: []*string{ - to.Ptr("x-ms-meta-12345675754564*")}, - AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - AllowedOrigins: []*string{ - to.Ptr("http://www.abc23.com"), - to.Ptr("https://www.fabrikam.com/*")}, - ExposedHeaders: []*string{ - to.Ptr("x-ms-meta-abc"), - to.Ptr("x-ms-meta-data*"), - to.Ptr("x-ms-meta-target*")}, - MaxAgeInSeconds: to.Ptr[int32](2000), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TableServiceProperties = armstorage.TableServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default"), - // TableServiceProperties: &armstorage.TableServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/TableServicesGet.json -func ExampleTableServicesClient_GetServiceProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTableServicesClient().GetServiceProperties(ctx, "res4410", "sto8607", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TableServiceProperties = armstorage.TableServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default"), - // TableServiceProperties: &armstorage.TableServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/storage/armstorage/usages_client.go b/sdk/resourcemanager/storage/armstorage/usages_client.go index 43b4c6808002..596948504156 100644 --- a/sdk/resourcemanager/storage/armstorage/usages_client.go +++ b/sdk/resourcemanager/storage/armstorage/usages_client.go @@ -45,7 +45,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListByLocationPager - Gets the current usage count and the limit for the resources of the location under the subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - location - The location of the Azure Storage resource. // - options - UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager // method. @@ -89,7 +89,7 @@ func (client *UsagesClient) listByLocationCreateRequest(ctx context.Context, loc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storage/armstorage/usages_client_example_test.go b/sdk/resourcemanager/storage/armstorage/usages_client_example_test.go deleted file mode 100644 index 060d279dc124..000000000000 --- a/sdk/resourcemanager/storage/armstorage/usages_client_example_test.go +++ /dev/null @@ -1,55 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/Microsoft.Storage/stable/2022-09-01/examples/StorageAccountListLocationUsage.json -func ExampleUsagesClient_NewListByLocationPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewUsagesClient().NewListByLocationPager("eastus2(stage)", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.UsageListResult = armstorage.UsageListResult{ - // Value: []*armstorage.Usage{ - // { - // Name: &armstorage.UsageName{ - // LocalizedValue: to.Ptr("Storage Accounts"), - // Value: to.Ptr("StorageAccounts"), - // }, - // CurrentValue: to.Ptr[int32](55), - // Limit: to.Ptr[int32](250), - // Unit: to.Ptr(armstorage.UsageUnitCount), - // }}, - // } - } -}