diff --git a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md index 5faf165f4ae9..fedc47ce5f0c 100644 --- a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md +++ b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md @@ -1,5 +1,26 @@ # Release History +## 1.7.0 (2024-12-18) +### Features Added + +- New value `SKUNamePremiumV2LRS`, `SKUNamePremiumV2ZRS`, `SKUNameStandardV2GRS`, `SKUNameStandardV2GZRS`, `SKUNameStandardV2LRS`, `SKUNameStandardV2ZRS` added to enum type `SKUName` +- New function `*FileServicesClient.GetServiceUsage(context.Context, string, string, *FileServicesClientGetServiceUsageOptions) (FileServicesClientGetServiceUsageResponse, error)` +- New function `*FileServicesClient.NewListServiceUsagesPager(string, string, *FileServicesClientListServiceUsagesOptions) *runtime.Pager[FileServicesClientListServiceUsagesResponse]` +- New struct `AccountLimits` +- New struct `AccountUsage` +- New struct `AccountUsageElements` +- New struct `BurstingConstants` +- New struct `FileServiceUsage` +- New struct `FileServiceUsageProperties` +- New struct `FileServiceUsages` +- New struct `FileShareLimits` +- New struct `FileSharePropertiesFileSharePaidBursting` +- New struct `FileShareRecommendations` +- New struct `ObjectReplicationPolicyPropertiesMetrics` +- New field `FileSharePaidBursting`, `IncludedBurstIops`, `MaxBurstCreditsForIops`, `NextAllowedProvisionedBandwidthDowngradeTime`, `NextAllowedProvisionedIopsDowngradeTime`, `NextAllowedQuotaDowngradeTime`, `ProvisionedBandwidthMibps`, `ProvisionedIops` in struct `FileShareProperties` +- New field `Metrics` in struct `ObjectReplicationPolicyProperties` + + ## 1.6.0 (2024-06-28) ### Features Added diff --git a/sdk/resourcemanager/storage/armstorage/accounts_client.go b/sdk/resourcemanager/storage/armstorage/accounts_client.go index fe5f1fc989c9..c4aade0dc875 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 2023-05-01 +// Generated from API version 2024-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. @@ -73,7 +73,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 2023-05-01 +// Generated from API version 2024-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" @@ -115,7 +115,7 @@ func (client *AccountsClient) abortHierarchicalNamespaceMigrationCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -124,7 +124,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 2023-05-01 +// Generated from API version 2024-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 @@ -163,7 +163,7 @@ func (client *AccountsClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, accountName); err != nil { @@ -187,7 +187,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 2023-05-01 +// Generated from API version 2024-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. @@ -216,7 +216,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 2023-05-01 +// Generated from API version 2024-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" @@ -258,7 +258,7 @@ func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -273,7 +273,7 @@ func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceG // 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-05-01 +// Generated from API version 2024-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. @@ -304,7 +304,7 @@ func (client *AccountsClient) BeginCustomerInitiatedMigration(ctx context.Contex // 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-05-01 +// Generated from API version 2024-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" @@ -346,7 +346,7 @@ func (client *AccountsClient) customerInitiatedMigrationCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -358,7 +358,7 @@ func (client *AccountsClient) customerInitiatedMigrationCreateRequest(ctx contex // Delete - Deletes a storage account in Microsoft Azure. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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. @@ -404,7 +404,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -420,7 +420,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 2023-05-01 +// Generated from API version 2024-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. @@ -454,7 +454,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 2023-05-01 +// Generated from API version 2024-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" @@ -496,7 +496,7 @@ func (client *AccountsClient) failoverCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") if options != nil && options.FailoverType != nil { reqQP.Set("failoverType", "Planned") } @@ -507,7 +507,7 @@ func (client *AccountsClient) failoverCreateRequest(ctx context.Context, resourc // 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-05-01 +// Generated from API version 2024-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 *AccountsClient) getCustomerInitiatedMigrationCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -579,7 +579,7 @@ func (client *AccountsClient) getCustomerInitiatedMigrationHandleResponse(resp * // 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 2023-05-01 +// Generated from API version 2024-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. @@ -629,7 +629,7 @@ func (client *AccountsClient) getPropertiesCreateRequest(ctx context.Context, re if options != nil && options.Expand != nil { reqQP.Set("$expand", string(*options.Expand)) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -647,7 +647,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 2023-05-01 +// Generated from API version 2024-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. @@ -677,7 +677,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 2023-05-01 +// Generated from API version 2024-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" @@ -719,7 +719,7 @@ func (client *AccountsClient) hierarchicalNamespaceMigrationCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") reqQP.Set("requestType", requestType) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -729,7 +729,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 2023-05-01 +// Generated from API version 2024-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]{ @@ -766,7 +766,7 @@ func (client *AccountsClient) listCreateRequest(ctx context.Context, options *Ac return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -784,7 +784,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 2023-05-01 +// Generated from API version 2024-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. @@ -832,7 +832,7 @@ func (client *AccountsClient) listAccountSASCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -853,7 +853,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 2023-05-01 +// Generated from API version 2024-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. @@ -896,7 +896,7 @@ func (client *AccountsClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -914,7 +914,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 2023-05-01 +// Generated from API version 2024-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. @@ -964,7 +964,7 @@ func (client *AccountsClient) listKeysCreateRequest(ctx context.Context, resourc if options != nil && options.Expand != nil { reqQP.Set("$expand", "kerb") } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -982,7 +982,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 2023-05-01 +// Generated from API version 2024-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. @@ -1030,7 +1030,7 @@ func (client *AccountsClient) listServiceSASCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1051,7 +1051,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 2023-05-01 +// Generated from API version 2024-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. @@ -1099,7 +1099,7 @@ func (client *AccountsClient) regenerateKeyCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, regenerateKey); err != nil { @@ -1120,7 +1120,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 2023-05-01 +// Generated from API version 2024-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. @@ -1148,7 +1148,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 2023-05-01 +// Generated from API version 2024-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" @@ -1190,7 +1190,7 @@ func (client *AccountsClient) restoreBlobRangesCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1202,7 +1202,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 2023-05-01 +// Generated from API version 2024-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. @@ -1249,7 +1249,7 @@ func (client *AccountsClient) revokeUserDelegationKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -1263,7 +1263,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 2023-05-01 +// Generated from API version 2024-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. @@ -1311,7 +1311,7 @@ func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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 32f81c8e3455..000000000000 --- a/sdk/resourcemanager/storage/armstorage/accounts_client_example_test.go +++ /dev/null @@ -1,4080 +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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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{ - EnableExtendedGroups: to.Ptr(true), - 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{ - // EnableExtendedGroups: to.Ptr(true), - // 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.486Z"); 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.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.486Z"); 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.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.486Z"); 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.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.486Z"); 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.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.486Z"); 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.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.486Z"); 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.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.486Z"); 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.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.486Z"); 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.703Z"); 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.703Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.083Z"); 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.702Z"); 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.173Z"); 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.173Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.083Z"); 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.702Z"); 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.173Z"); 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.173Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.486Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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{ - // AccountMigrationInProgress: to.Ptr(false), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); 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.703Z"); 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.703Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); return t}()), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSKUConversionBlocked: to.Ptr(false), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.763Z"); 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.702Z"); 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.703Z"); 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.703Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.763Z"); 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.702Z"); 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.702Z"); 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.703Z"); 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.703Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverFalse.json -func ExampleAccountsClient_GetProperties_storageAccountGetPropertiesGeoReplicationStatscanFailoverFalse() { - 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: to.Ptr(armstorage.StorageAccountExpandGeoReplicationStats)}) - 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{ - // AccountMigrationInProgress: to.Ptr(false), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); 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.703Z"); 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.703Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(false), - // CanPlannedFailover: to.Ptr(false), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); return t}()), - // PostFailoverRedundancy: to.Ptr(armstorage.PostFailoverRedundancyStandardLRS), - // PostPlannedFailoverRedundancy: to.Ptr(armstorage.PostPlannedFailoverRedundancyStandardGRS), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSKUConversionBlocked: to.Ptr(false), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json -func ExampleAccountsClient_GetProperties_storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue() { - 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: to.Ptr(armstorage.StorageAccountExpandGeoReplicationStats)}) - 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{ - // AccountMigrationInProgress: to.Ptr(false), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); 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.703Z"); 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.703Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // CanPlannedFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); return t}()), - // PostFailoverRedundancy: to.Ptr(armstorage.PostFailoverRedundancyStandardLRS), - // PostPlannedFailoverRedundancy: to.Ptr(armstorage.PostPlannedFailoverRedundancyStandardGRS), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSKUConversionBlocked: to.Ptr(false), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.763Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.763Z"); 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.702Z"); 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.703Z"); 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.703Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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), - EnableExtendedGroups: 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), - }, - }, - }, - 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.763Z"); return t}()), - // EnableExtendedGroups: 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), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.763Z"); 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.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.763Z"); 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.703Z"); 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.703Z"); 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.432Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.083Z"); 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.702Z"); 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.173Z"); 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.173Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.083Z"); 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.702Z"); 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.173Z"); 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.173Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.454Z"); 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.703Z"); 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.703Z"); 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.609Z"); 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.763Z"); 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.702Z"); 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.703Z"); 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.703Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); 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.562Z"); 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.868Z"); 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.655Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.818Z"); 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.706Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.156Z"); 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.156Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.845Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPostMigration.json -func ExampleAccountsClient_BeginCustomerInitiatedMigration() { - 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().BeginCustomerInitiatedMigration(ctx, "resource-group-name", "accountname", armstorage.AccountMigration{ - StorageAccountMigrationDetails: &armstorage.AccountMigrationProperties{ - TargetSKUName: to.Ptr(armstorage.SKUNameStandardZRS), - }, - }, 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationFailed.json -func ExampleAccountsClient_GetCustomerInitiatedMigration_storageAccountGetMigrationFailed() { - 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().GetCustomerInitiatedMigration(ctx, "resource-group-name", "accountname", armstorage.MigrationNameDefault, 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.AccountMigration = armstorage.AccountMigration{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/accountMigrations"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default"), - // StorageAccountMigrationDetails: &armstorage.AccountMigrationProperties{ - // MigrationFailedDetailedReason: to.Ptr("ZRS is not supported for accounts with archive data."), - // MigrationFailedReason: to.Ptr("ZrsNotSupportedForAccountWithArchiveData"), - // MigrationStatus: to.Ptr(armstorage.MigrationStatusFailed), - // TargetSKUName: to.Ptr(armstorage.SKUNameStandardZRS), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationInProgress.json -func ExampleAccountsClient_GetCustomerInitiatedMigration_storageAccountGetMigrationInProgress() { - 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().GetCustomerInitiatedMigration(ctx, "resource-group-name", "accountname", armstorage.MigrationNameDefault, 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.AccountMigration = armstorage.AccountMigration{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/accountMigrations"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default"), - // StorageAccountMigrationDetails: &armstorage.AccountMigrationProperties{ - // MigrationStatus: to.Ptr(armstorage.MigrationStatusInProgress), - // TargetSKUName: to.Ptr(armstorage.SKUNameStandardZRS), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.000Z"); 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.000Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 ae18e9939db3..12a635fd9837 100644 --- a/sdk/resourcemanager/storage/armstorage/autorest.md +++ b/sdk/resourcemanager/storage/armstorage/autorest.md @@ -5,11 +5,10 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/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-version: 1.6.0 +module-version: 1.7.0 modelerfour: seal-single-value-enum-by-default: true -tag: package-2023-05 ``` diff --git a/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go b/sdk/resourcemanager/storage/armstorage/blobcontainers_client.go index 286c363e7f07..df11cc6a0ea7 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { @@ -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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -353,16 +353,16 @@ func (client *BlobContainersClient) deleteCreateRequest(ctx context.Context, res // container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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. // - containerName - The name of the blob container within the specified storage account. Blob container names must be between // 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every // dash (-) character must be immediately preceded and followed by a letter or number. -// - ifMatch - The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the -// operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. +// - ifMatch - The entity state (ETag) version of the immutability policy to update must be returned to the server for all update +// operations. The ETag value must include the leading and trailing double quotes as +// returned by the service. // - options - BlobContainersClientDeleteImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.DeleteImmutabilityPolicy // method. func (client *BlobContainersClient) DeleteImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientDeleteImmutabilityPolicyOptions) (BlobContainersClientDeleteImmutabilityPolicyResponse, error) { @@ -412,7 +412,7 @@ func (client *BlobContainersClient) deleteImmutabilityPolicyCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["If-Match"] = []string{ifMatch} @@ -435,16 +435,16 @@ 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 2023-05-01 +// Generated from API version 2024-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. // - containerName - The name of the blob container within the specified storage account. Blob container names must be between // 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every // dash (-) character must be immediately preceded and followed by a letter or number. -// - ifMatch - The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the -// operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. +// - ifMatch - The entity state (ETag) version of the immutability policy to update must be returned to the server for all update +// operations. The ETag value must include the leading and trailing double quotes as +// returned by the service. // - options - BlobContainersClientExtendImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.ExtendImmutabilityPolicy // method. func (client *BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientExtendImmutabilityPolicyOptions) (BlobContainersClientExtendImmutabilityPolicyResponse, error) { @@ -493,7 +493,7 @@ func (client *BlobContainersClient) extendImmutabilityPolicyCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["If-Match"] = []string{ifMatch} @@ -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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { @@ -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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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. @@ -810,7 +810,7 @@ func (client *BlobContainersClient) listCreateRequest(ctx context.Context, resou if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", *options.Maxpagesize) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -829,16 +829,16 @@ 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 2023-05-01 +// Generated from API version 2024-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. // - containerName - The name of the blob container within the specified storage account. Blob container names must be between // 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every // dash (-) character must be immediately preceded and followed by a letter or number. -// - ifMatch - The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the -// operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. +// - ifMatch - The entity state (ETag) version of the immutability policy to update must be returned to the server for all update +// operations. The ETag value must include the leading and trailing double quotes as +// returned by the service. // - options - BlobContainersClientLockImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.LockImmutabilityPolicy // method. func (client *BlobContainersClient) LockImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientLockImmutabilityPolicyOptions) (BlobContainersClientLockImmutabilityPolicyResponse, error) { @@ -887,7 +887,7 @@ func (client *BlobContainersClient) lockImmutabilityPolicyCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["If-Match"] = []string{ifMatch} @@ -911,7 +911,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 2023-05-01 +// Generated from API version 2024-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. @@ -943,7 +943,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 2023-05-01 +// Generated from API version 2024-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" @@ -989,7 +989,7 @@ func (client *BlobContainersClient) objectLevelWormCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -999,7 +999,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 2023-05-01 +// Generated from API version 2024-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. @@ -1055,7 +1055,7 @@ func (client *BlobContainersClient) setLegalHoldCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, legalHold); err != nil { @@ -1077,7 +1077,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 2023-05-01 +// Generated from API version 2024-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. @@ -1132,7 +1132,7 @@ func (client *BlobContainersClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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 ab04405fb5b0..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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:47.000Z"); 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:47.000Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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:47.000Z"); 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:47.000Z"); 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:47.000Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.431Z"); 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.090Z"); 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.709Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeExtend), - // }}, - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.000Z"); 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.504Z"); 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.696Z"); 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.696Z"); 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.696Z"); return t}()), - // }}, - // }, - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.431Z"); 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.090Z"); 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.709Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeExtend), - // }}, - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.000Z"); 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.696Z"); 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.696Z"); 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.696Z"); return t}()), - // }}, - // }, - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 a0e56a472cca..4bb2da6daf7a 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 59325d13ca3b..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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")}, - CreationTime: &armstorage.BlobInventoryCreationTime{ - LastNDays: to.Ptr[int32](1000), - }, - 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.093Z"); 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")}, - // CreationTime: &armstorage.BlobInventoryCreationTime{ - // LastNDays: to.Ptr[int32](1000), - // }, - // 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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 8ccf18a9c4de..b5d5c758da98 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 783eafaaea8c..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 48f5295768e5..8573c686071e 100644 --- a/sdk/resourcemanager/storage/armstorage/constants.go +++ b/sdk/resourcemanager/storage/armstorage/constants.go @@ -10,7 +10,7 @@ package armstorage const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" - moduleVersion = "v1.6.0" + moduleVersion = "v1.7.0" ) // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' @@ -1213,12 +1213,18 @@ type SKUName string const ( SKUNamePremiumLRS SKUName = "Premium_LRS" + SKUNamePremiumV2LRS SKUName = "PremiumV2_LRS" + SKUNamePremiumV2ZRS SKUName = "PremiumV2_ZRS" SKUNamePremiumZRS SKUName = "Premium_ZRS" SKUNameStandardGRS SKUName = "Standard_GRS" SKUNameStandardGZRS SKUName = "Standard_GZRS" SKUNameStandardLRS SKUName = "Standard_LRS" SKUNameStandardRAGRS SKUName = "Standard_RAGRS" SKUNameStandardRAGZRS SKUName = "Standard_RAGZRS" + SKUNameStandardV2GRS SKUName = "StandardV2_GRS" + SKUNameStandardV2GZRS SKUName = "StandardV2_GZRS" + SKUNameStandardV2LRS SKUName = "StandardV2_LRS" + SKUNameStandardV2ZRS SKUName = "StandardV2_ZRS" SKUNameStandardZRS SKUName = "Standard_ZRS" ) @@ -1226,12 +1232,18 @@ const ( func PossibleSKUNameValues() []SKUName { return []SKUName{ SKUNamePremiumLRS, + SKUNamePremiumV2LRS, + SKUNamePremiumV2ZRS, SKUNamePremiumZRS, SKUNameStandardGRS, SKUNameStandardGZRS, SKUNameStandardLRS, SKUNameStandardRAGRS, SKUNameStandardRAGZRS, + SKUNameStandardV2GRS, + SKUNameStandardV2GZRS, + SKUNameStandardV2LRS, + SKUNameStandardV2ZRS, SKUNameStandardZRS, } } diff --git a/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go b/sdk/resourcemanager/storage/armstorage/deletedaccounts_client.go index 6602acba4c7b..c3d4bca8a199 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-01-01 // - options - DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager // method. func (client *DeletedAccountsClient) NewListPager(options *DeletedAccountsClientListOptions) *runtime.Pager[DeletedAccountsClientListResponse] { @@ -147,7 +147,7 @@ func (client *DeletedAccountsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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 90a8e114429f..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 d757bde916e0..94e87ca0692f 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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. @@ -176,7 +176,7 @@ func (client *EncryptionScopesClient) listCreateRequest(ctx context.Context, res if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -195,7 +195,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 2023-05-01 +// Generated from API version 2024-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. @@ -250,7 +250,7 @@ func (client *EncryptionScopesClient) patchCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, encryptionScope); err != nil { @@ -273,7 +273,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 2023-05-01 +// Generated from API version 2024-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 *EncryptionScopesClient) putCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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 5cd15a418e9b..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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", "accountname", "{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/accountname/encryptionScopes/{encryption-scope-name}"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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", "accountname", "{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/accountname/encryptionScopes/{encryption-scope-name}"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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", "accountname", "{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/accountname/encryptionScopes/{encryption-scope-name}"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); 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.702Z"); return t}()), - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-17T06:23:14.451Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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", "accountname", "{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/accountname/encryptionScopes/{encryption-scope-name}"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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", "accountname", &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/accountname/encryptionScopes/scope-1"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); 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/accountname/encryptionScopes/scope-2"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T04:32:14.335Z"); 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.451Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftKeyVault), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/fake/fileservices_server.go b/sdk/resourcemanager/storage/armstorage/fake/fileservices_server.go index e747a90f4836..e199871ac088 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/fileservices_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/fileservices_server.go @@ -15,10 +15,12 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" "net/http" "net/url" "regexp" + "strconv" ) // FileServicesServer is a fake server for instances of the armstorage.FileServicesClient type. @@ -27,10 +29,18 @@ type FileServicesServer struct { // HTTP status codes to indicate success: http.StatusOK GetServiceProperties func(ctx context.Context, resourceGroupName string, accountName string, options *armstorage.FileServicesClientGetServicePropertiesOptions) (resp azfake.Responder[armstorage.FileServicesClientGetServicePropertiesResponse], errResp azfake.ErrorResponder) + // GetServiceUsage is the fake for method FileServicesClient.GetServiceUsage + // HTTP status codes to indicate success: http.StatusOK + GetServiceUsage func(ctx context.Context, resourceGroupName string, accountName string, options *armstorage.FileServicesClientGetServiceUsageOptions) (resp azfake.Responder[armstorage.FileServicesClientGetServiceUsageResponse], errResp azfake.ErrorResponder) + // List is the fake for method FileServicesClient.List // HTTP status codes to indicate success: http.StatusOK List func(ctx context.Context, resourceGroupName string, accountName string, options *armstorage.FileServicesClientListOptions) (resp azfake.Responder[armstorage.FileServicesClientListResponse], errResp azfake.ErrorResponder) + // NewListServiceUsagesPager is the fake for method FileServicesClient.NewListServiceUsagesPager + // HTTP status codes to indicate success: http.StatusOK + NewListServiceUsagesPager func(resourceGroupName string, accountName string, options *armstorage.FileServicesClientListServiceUsagesOptions) (resp azfake.PagerResponder[armstorage.FileServicesClientListServiceUsagesResponse]) + // SetServiceProperties is the fake for method FileServicesClient.SetServiceProperties // HTTP status codes to indicate success: http.StatusOK SetServiceProperties func(ctx context.Context, resourceGroupName string, accountName string, parameters armstorage.FileServiceProperties, options *armstorage.FileServicesClientSetServicePropertiesOptions) (resp azfake.Responder[armstorage.FileServicesClientSetServicePropertiesResponse], errResp azfake.ErrorResponder) @@ -40,13 +50,17 @@ type FileServicesServer struct { // The returned FileServicesServerTransport instance is connected to an instance of armstorage.FileServicesClient via the // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewFileServicesServerTransport(srv *FileServicesServer) *FileServicesServerTransport { - return &FileServicesServerTransport{srv: srv} + return &FileServicesServerTransport{ + srv: srv, + newListServiceUsagesPager: newTracker[azfake.PagerResponder[armstorage.FileServicesClientListServiceUsagesResponse]](), + } } // FileServicesServerTransport connects instances of armstorage.FileServicesClient to instances of FileServicesServer. // Don't use this type directly, use NewFileServicesServerTransport instead. type FileServicesServerTransport struct { - srv *FileServicesServer + srv *FileServicesServer + newListServiceUsagesPager *tracker[azfake.PagerResponder[armstorage.FileServicesClientListServiceUsagesResponse]] } // Do implements the policy.Transporter interface for FileServicesServerTransport. @@ -63,8 +77,12 @@ func (f *FileServicesServerTransport) Do(req *http.Request) (*http.Response, err switch method { case "FileServicesClient.GetServiceProperties": resp, err = f.dispatchGetServiceProperties(req) + case "FileServicesClient.GetServiceUsage": + resp, err = f.dispatchGetServiceUsage(req) case "FileServicesClient.List": resp, err = f.dispatchList(req) + case "FileServicesClient.NewListServiceUsagesPager": + resp, err = f.dispatchNewListServiceUsagesPager(req) case "FileServicesClient.SetServiceProperties": resp, err = f.dispatchSetServiceProperties(req) default: @@ -111,6 +129,39 @@ func (f *FileServicesServerTransport) dispatchGetServiceProperties(req *http.Req return resp, nil } +func (f *FileServicesServerTransport) dispatchGetServiceUsage(req *http.Request) (*http.Response, error) { + if f.srv.GetServiceUsage == nil { + return nil, &nonRetriableError{errors.New("fake for method GetServiceUsage 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~%@]+)/fileServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + 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) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + respr, errRespr := f.srv.GetServiceUsage(req.Context(), resourceGroupNameParam, accountNameParam, 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).FileServiceUsage, req) + if err != nil { + return nil, err + } + return resp, nil +} + func (f *FileServicesServerTransport) dispatchList(req *http.Request) (*http.Response, error) { if f.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} @@ -144,6 +195,68 @@ func (f *FileServicesServerTransport) dispatchList(req *http.Request) (*http.Res return resp, nil } +func (f *FileServicesServerTransport) dispatchNewListServiceUsagesPager(req *http.Request) (*http.Response, error) { + if f.srv.NewListServiceUsagesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListServiceUsagesPager not implemented")} + } + newListServiceUsagesPager := f.newListServiceUsagesPager.get(req) + if newListServiceUsagesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/fileServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` + 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) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + maxpagesizeUnescaped, err := url.QueryUnescape(qp.Get("$maxpagesize")) + if err != nil { + return nil, err + } + maxpagesizeParam, err := parseOptional(maxpagesizeUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + var options *armstorage.FileServicesClientListServiceUsagesOptions + if maxpagesizeParam != nil { + options = &armstorage.FileServicesClientListServiceUsagesOptions{ + Maxpagesize: maxpagesizeParam, + } + } + resp := f.srv.NewListServiceUsagesPager(resourceGroupNameParam, accountNameParam, options) + newListServiceUsagesPager = &resp + f.newListServiceUsagesPager.add(req, newListServiceUsagesPager) + server.PagerResponderInjectNextLinks(newListServiceUsagesPager, req, func(page *armstorage.FileServicesClientListServiceUsagesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListServiceUsagesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + f.newListServiceUsagesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListServiceUsagesPager) { + f.newListServiceUsagesPager.remove(req) + } + return resp, nil +} + func (f *FileServicesServerTransport) dispatchSetServiceProperties(req *http.Request) (*http.Response, error) { if f.srv.SetServiceProperties == nil { return nil, &nonRetriableError{errors.New("fake for method SetServiceProperties not implemented")} diff --git a/sdk/resourcemanager/storage/armstorage/fileservices_client.go b/sdk/resourcemanager/storage/armstorage/fileservices_client.go index c7d4dcc5eea0..bb6ebb318f4b 100644 --- a/sdk/resourcemanager/storage/armstorage/fileservices_client.go +++ b/sdk/resourcemanager/storage/armstorage/fileservices_client.go @@ -17,6 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -47,7 +48,7 @@ func NewFileServicesClient(subscriptionID string, credential azcore.TokenCredent // Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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 +97,7 @@ func (client *FileServicesClient) getServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -111,10 +112,79 @@ func (client *FileServicesClient) getServicePropertiesHandleResponse(resp *http. return result, nil } +// GetServiceUsage - Gets the usage of file service in storage account including account limits, file share limits and constants +// used in recommendations and bursting formula. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-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. +// - options - FileServicesClientGetServiceUsageOptions contains the optional parameters for the FileServicesClient.GetServiceUsage +// method. +func (client *FileServicesClient) GetServiceUsage(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientGetServiceUsageOptions) (FileServicesClientGetServiceUsageResponse, error) { + var err error + const operationName = "FileServicesClient.GetServiceUsage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getServiceUsageCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return FileServicesClientGetServiceUsageResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FileServicesClientGetServiceUsageResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FileServicesClientGetServiceUsageResponse{}, err + } + resp, err := client.getServiceUsageHandleResponse(httpResp) + return resp, err +} + +// getServiceUsageCreateRequest creates the GetServiceUsage request. +func (client *FileServicesClient) getServiceUsageCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientGetServiceUsageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages/{fileServiceUsagesName}" + 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)) + urlPath = strings.ReplaceAll(urlPath, "{FileServicesName}", url.PathEscape("default")) + urlPath = strings.ReplaceAll(urlPath, "{fileServiceUsagesName}", url.PathEscape("default")) + 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", "2024-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getServiceUsageHandleResponse handles the GetServiceUsage response. +func (client *FileServicesClient) getServiceUsageHandleResponse(resp *http.Response) (FileServicesClientGetServiceUsageResponse, error) { + result := FileServicesClientGetServiceUsageResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FileServiceUsage); err != nil { + return FileServicesClientGetServiceUsageResponse{}, err + } + return result, nil +} + // List - List all file services in storage accounts // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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 +231,7 @@ func (client *FileServicesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -176,11 +246,81 @@ func (client *FileServicesClient) listHandleResponse(resp *http.Response) (FileS return result, nil } +// NewListServiceUsagesPager - Gets the usages of file service in storage account. +// +// Generated from API version 2024-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. +// - options - FileServicesClientListServiceUsagesOptions contains the optional parameters for the FileServicesClient.NewListServiceUsagesPager +// method. +func (client *FileServicesClient) NewListServiceUsagesPager(resourceGroupName string, accountName string, options *FileServicesClientListServiceUsagesOptions) *runtime.Pager[FileServicesClientListServiceUsagesResponse] { + return runtime.NewPager(runtime.PagingHandler[FileServicesClientListServiceUsagesResponse]{ + More: func(page FileServicesClientListServiceUsagesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FileServicesClientListServiceUsagesResponse) (FileServicesClientListServiceUsagesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FileServicesClient.NewListServiceUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listServiceUsagesCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return FileServicesClientListServiceUsagesResponse{}, err + } + return client.listServiceUsagesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listServiceUsagesCreateRequest creates the ListServiceUsages request. +func (client *FileServicesClient) listServiceUsagesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientListServiceUsagesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages" + 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)) + urlPath = strings.ReplaceAll(urlPath, "{FileServicesName}", url.PathEscape("default")) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Maxpagesize != nil { + reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) + } + reqQP.Set("api-version", "2024-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listServiceUsagesHandleResponse handles the ListServiceUsages response. +func (client *FileServicesClient) listServiceUsagesHandleResponse(resp *http.Response) (FileServicesClientListServiceUsagesResponse, error) { + result := FileServicesClientListServiceUsagesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FileServiceUsages); err != nil { + return FileServicesClientListServiceUsagesResponse{}, err + } + return result, nil +} + // SetServiceProperties - Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource // Sharing) rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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 +370,7 @@ func (client *FileServicesClient) setServicePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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 e9a14a8509b6..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 16823750e31b..34739f652574 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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. @@ -183,7 +183,7 @@ func (client *FileSharesClient) deleteCreateRequest(ctx context.Context, resourc if options != nil && options.Include != nil { reqQP.Set("$include", *options.Include) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.XMSSnapshot != nil { @@ -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 2023-05-01 +// Generated from API version 2024-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. @@ -252,7 +252,7 @@ func (client *FileSharesClient) getCreateRequest(ctx context.Context, resourceGr if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.XMSSnapshot != nil { @@ -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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.XMSSnapshot != nil { @@ -357,7 +357,7 @@ func (client *FileSharesClient) leaseHandleResponse(resp *http.Response) (FileSh // NewListPager - Lists all shares. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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. @@ -414,7 +414,7 @@ func (client *FileSharesClient) listCreateRequest(ctx context.Context, resourceG if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", *options.Maxpagesize) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -432,7 +432,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 2023-05-01 +// Generated from API version 2024-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. @@ -485,7 +485,7 @@ func (client *FileSharesClient) restoreCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, deletedShare); err != nil { @@ -498,7 +498,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 2023-05-01 +// Generated from API version 2024-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. @@ -553,7 +553,7 @@ func (client *FileSharesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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 5642bb98cf4e..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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:47.000Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-14T08:20:47.000Z"); 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:47.000Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.000Z"); 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.000Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // SnapshotTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-26T05:48:07.000Z"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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:47.000Z"); 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:47.000Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.000Z"); return t }()), - Permission: to.Ptr("rwd"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T08:49:37.000Z"); 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.000Z"); return t}()), - // Permission: to.Ptr("rwd"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T08:49:37.000Z"); return t}()), - // }, - // ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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:14.000Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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:14.000Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 c449bbbccef5..ec17b7a58c80 100644 --- a/sdk/resourcemanager/storage/armstorage/go.mod +++ b/sdk/resourcemanager/storage/armstorage/go.mod @@ -4,7 +4,6 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 @@ -12,6 +11,7 @@ require ( ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect diff --git a/sdk/resourcemanager/storage/armstorage/localusers_client.go b/sdk/resourcemanager/storage/armstorage/localusers_client.go index 00586070b484..9505e3bad8a7 100644 --- a/sdk/resourcemanager/storage/armstorage/localusers_client.go +++ b/sdk/resourcemanager/storage/armstorage/localusers_client.go @@ -48,7 +48,7 @@ func NewLocalUsersClient(subscriptionID string, credential azcore.TokenCredentia // enablement and extended groups cannot be set with other properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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 *LocalUsersClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { @@ -124,7 +124,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 2023-05-01 +// Generated from API version 2024-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. @@ -176,7 +176,7 @@ func (client *LocalUsersClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -185,7 +185,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 2023-05-01 +// Generated from API version 2024-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 *LocalUsersClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,7 +255,7 @@ func (client *LocalUsersClient) getHandleResponse(resp *http.Response) (LocalUse // NewListPager - List the local users associated with the storage account. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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. @@ -313,7 +313,7 @@ func (client *LocalUsersClient) listCreateRequest(ctx context.Context, resourceG if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -331,7 +331,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 2023-05-01 +// Generated from API version 2024-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. @@ -384,7 +384,7 @@ func (client *LocalUsersClient) listKeysCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -402,7 +402,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 2023-05-01 +// Generated from API version 2024-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. @@ -456,7 +456,7 @@ func (client *LocalUsersClient) regeneratePasswordCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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 e2e545b1dee8..000000000000 --- a/sdk/resourcemanager/storage/armstorage/localusers_client_example_test.go +++ /dev/null @@ -1,488 +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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersList.json -func ExampleLocalUsersClient_NewListPager_listLocalUsers() { - 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", &armstorage.LocalUsersClientListOptions{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.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{ - // AllowACLAuthorization: to.Ptr(true), - // GroupID: to.Ptr[int32](2000), - // 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"), - // UserID: to.Ptr[int32](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{ - // AllowACLAuthorization: to.Ptr(true), - // GroupID: to.Ptr[int32](2000), - // 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"), - // UserID: to.Ptr[int32](1001), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersListNFSv3Enabled.json -func ExampleLocalUsersClient_NewListPager_listNfSv3EnabledLocalUsers() { - 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", &armstorage.LocalUsersClientListOptions{Maxpagesize: nil, - Filter: nil, - Include: to.Ptr(armstorage.ListLocalUserIncludeParamNfsv3), - }) - 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{ - // AllowACLAuthorization: to.Ptr(true), - // ExtendedGroups: []*int32{ - // to.Ptr[int32](1001), - // to.Ptr[int32](1005), - // to.Ptr[int32](2005)}, - // GroupID: to.Ptr[int32](2000), - // HasSharedKey: to.Ptr(true), - // HasSSHKey: to.Ptr(true), - // HasSSHPassword: to.Ptr(true), - // HomeDirectory: to.Ptr("homedirectory"), - // IsNFSv3Enabled: to.Ptr(true), - // 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"), - // UserID: to.Ptr[int32](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{ - // AllowACLAuthorization: to.Ptr(true), - // ExtendedGroups: []*int32{ - // to.Ptr[int32](1001), - // to.Ptr[int32](1005), - // to.Ptr[int32](2005)}, - // GroupID: to.Ptr[int32](2000), - // HasSharedKey: to.Ptr(true), - // HasSSHKey: to.Ptr(false), - // HasSSHPassword: to.Ptr(true), - // IsNFSv3Enabled: 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"), - // UserID: to.Ptr[int32](1001), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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{ - // AllowACLAuthorization: to.Ptr(true), - // ExtendedGroups: []*int32{ - // to.Ptr[int32](1001), - // to.Ptr[int32](1005), - // to.Ptr[int32](2005)}, - // GroupID: to.Ptr[int32](2000), - // HasSharedKey: to.Ptr(true), - // HasSSHKey: to.Ptr(true), - // HasSSHPassword: to.Ptr(true), - // HomeDirectory: to.Ptr("homedirectory"), - // IsNFSv3Enabled: to.Ptr(true), - // 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"), - // UserID: to.Ptr[int32](1000), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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{ - AllowACLAuthorization: to.Ptr(true), - GroupID: to.Ptr[int32](2000), - 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{ - // AllowACLAuthorization: to.Ptr(true), - // GroupID: to.Ptr[int32](2000), - // 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="), - // }}, - // UserID: to.Ptr[int32](1000), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreateNFSv3Enabled.json -func ExampleLocalUsersClient_CreateOrUpdate_createNfSv3EnabledLocalUser() { - 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{ - ExtendedGroups: []*int32{ - to.Ptr[int32](1001), - to.Ptr[int32](1005), - to.Ptr[int32](2005)}, - IsNFSv3Enabled: 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.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{ - // AllowACLAuthorization: to.Ptr(true), - // ExtendedGroups: []*int32{ - // to.Ptr[int32](1001), - // to.Ptr[int32](1005), - // to.Ptr[int32](2005)}, - // GroupID: to.Ptr[int32](2000), - // HomeDirectory: to.Ptr("homedirectory"), - // IsNFSv3Enabled: to.Ptr(true), - // 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="), - // }}, - // UserID: to.Ptr[int32](1000), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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{ - AllowACLAuthorization: to.Ptr(false), - ExtendedGroups: []*int32{ - to.Ptr[int32](1001), - to.Ptr[int32](1005), - to.Ptr[int32](2005)}, - GroupID: to.Ptr[int32](3000), - HasSharedKey: to.Ptr(false), - HasSSHKey: to.Ptr(false), - HasSSHPassword: to.Ptr(false), - HomeDirectory: to.Ptr("homedirectory2"), - IsNFSv3Enabled: 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.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{ - // AllowACLAuthorization: to.Ptr(false), - // ExtendedGroups: []*int32{ - // to.Ptr[int32](1001), - // to.Ptr[int32](1005), - // to.Ptr[int32](2005)}, - // GroupID: to.Ptr[int32](3000), - // HasSharedKey: to.Ptr(false), - // HasSSHKey: to.Ptr(false), - // HasSSHPassword: to.Ptr(false), - // HomeDirectory: to.Ptr("homedirectory2"), - // IsNFSv3Enabled: to.Ptr(true), - // Sid: to.Ptr("S-1-2-0-3528686663-1788730862-2791910117-1000"), - // UserID: to.Ptr[int32](1000), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 0c8174540047..5a734d0be1b8 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 cce6b7f81f51..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.716Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.093Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 a893299da695..41c6b2a9e60c 100644 --- a/sdk/resourcemanager/storage/armstorage/models.go +++ b/sdk/resourcemanager/storage/armstorage/models.go @@ -143,6 +143,21 @@ type AccountKey struct { Value *string } +// AccountLimits - Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage account. +type AccountLimits struct { + // READ-ONLY; The maximum number of file shares limit for the storage account. + MaxFileShares *int32 + + // READ-ONLY; The maximum provisioned bandwidth limit in mebibytes per second for the storage account. + MaxProvisionedBandwidthMiBPerSec *int32 + + // READ-ONLY; The maximum provisioned IOPS limit for the storage account. + MaxProvisionedIOPS *int32 + + // READ-ONLY; The maximum provisioned storage quota limit in gibibytes for the storage account. + MaxProvisionedStorageGiB *int32 +} + // AccountListKeysResult - The response from the ListKeys operation. type AccountListKeysResult struct { // READ-ONLY; Gets the list of storage account keys and their properties for the specified storage account. @@ -602,6 +617,34 @@ type AccountUpdateParameters struct { Tags map[string]*string } +// AccountUsage - Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares and soft-deleted +// shares in the account. +type AccountUsage struct { + // READ-ONLY; Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted + // shares in the account. + LiveShares *AccountUsageElements + + // READ-ONLY; Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted + // shares in the account. + SoftDeletedShares *AccountUsageElements +} + +// AccountUsageElements - Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or +// soft-deleted shares in the account. +type AccountUsageElements struct { + // READ-ONLY; The total number of file shares. + FileShareCount *int32 + + // READ-ONLY; The total provisioned bandwidth in mebibytes per second. + ProvisionedBandwidthMiBPerSec *int32 + + // READ-ONLY; The total provisioned IOPS. + ProvisionedIOPS *int32 + + // READ-ONLY; The total provisioned storage quota in gibibytes. + ProvisionedStorageGiB *int32 +} + // ActiveDirectoryProperties - Settings properties for Active Directory (AD). type ActiveDirectoryProperties struct { // REQUIRED; Specifies the domain GUID. @@ -902,6 +945,19 @@ type BlobServicePropertiesProperties struct { RestorePolicy *RestorePolicyProperties } +// BurstingConstants - Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a file share +// in the storage account. +type BurstingConstants struct { + // READ-ONLY; The guaranteed floor of burst IOPS for small file shares. + BurstFloorIOPS *int32 + + // READ-ONLY; The scalar against provisioned IOPS in the file share included burst IOPS formula. + BurstIOScalar *float64 + + // READ-ONLY; The time frame for bursting in seconds in the file share maximum burst credits for IOPS formula. + BurstTimeframeSeconds *int32 +} + // ChangeFeed - The blob service properties for change feed events. type ChangeFeed struct { // Indicates whether change feed event logging is enabled for the Blob service. @@ -1408,6 +1464,53 @@ type FileServicePropertiesProperties struct { ShareDeleteRetentionPolicy *DeleteRetentionPolicy } +// FileServiceUsage - The usage of file service in storage account. +type FileServiceUsage struct { + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; File service usage in storage account including account limits, file share limits and constants used in recommendations + // and bursting formula. + Properties *FileServiceUsageProperties + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// FileServiceUsageProperties - File service usage in storage account including account limits, file share limits and constants +// used in recommendations and bursting formula. +type FileServiceUsageProperties struct { + // READ-ONLY; Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a file share in the + // storage account. + BurstingConstants *BurstingConstants + + // READ-ONLY; Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the storage account. + FileShareLimits *FileShareLimits + + // READ-ONLY; Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in the storage account. + FileShareRecommendations *FileShareRecommendations + + // READ-ONLY; Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage account. + StorageAccountLimits *AccountLimits + + // READ-ONLY; Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares and soft-deleted + // shares in the account. + StorageAccountUsage *AccountUsage +} + +// FileServiceUsages - List file service usages schema. +type FileServiceUsages struct { + // READ-ONLY; Request URL that can be used to query next page of file service usages. Returned when total number of requested + // file service usages exceed maximum page size. + NextLink *string + + // READ-ONLY; List of file service usages returned. + Value []*FileServiceUsage +} + // FileShare - Properties of the file share, including Id, resource name, resource type, Etag. type FileShare struct { // Properties of the file share. @@ -1455,6 +1558,27 @@ type FileShareItems struct { Value []*FileShareItem } +// FileShareLimits - Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the storage account. +type FileShareLimits struct { + // READ-ONLY; The maximum provisioned bandwidth limit in mebibytes per second for a file share in the storage account. + MaxProvisionedBandwidthMiBPerSec *int32 + + // READ-ONLY; The maximum provisioned IOPS limit for a file share in the storage account. + MaxProvisionedIOPS *int32 + + // READ-ONLY; The maximum provisioned storage quota limit in gibibytes for a file share in the storage account. + MaxProvisionedStorageGiB *int32 + + // READ-ONLY; The minimum provisioned bandwidth limit in mebibytes per second for a file share in the storage account. + MinProvisionedBandwidthMiBPerSec *int32 + + // READ-ONLY; The minimum provisioned IOPS limit for a file share in the storage account. + MinProvisionedIOPS *int32 + + // READ-ONLY; The minimum provisioned storage quota limit in gibibytes for a file share in the storage account. + MinProvisionedStorageGiB *int32 +} + // FileShareProperties - The properties of the file share. type FileShareProperties struct { // Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage @@ -1464,14 +1588,29 @@ type FileShareProperties struct { // The authentication protocol that is used for the file share. Can only be specified when creating a share. EnabledProtocols *EnabledProtocols + // File Share Paid Bursting properties. + FileSharePaidBursting *FileSharePropertiesFileSharePaidBursting + // A name-value pair to associate with the share as metadata. Metadata map[string]*string + // The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files + // Provisioned v2 account type. Please refer to the GetFileServiceUsage API + // response for the minimum and maximum allowed value for provisioned bandwidth. + ProvisionedBandwidthMibps *int32 + + // The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. + // Please refer to the GetFileServiceUsage API response for the minimum and + // maximum allowed value for provisioned IOPS. + ProvisionedIops *int32 + // The property is for NFS share only. The default is NoRootSquash. RootSquash *RootSquashType - // The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File - // Shares, the maximum size is 102400. + // The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large + // File Shares, the maximum size is 102400. For file shares created under Files + // Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned + // storage size. ShareQuota *int32 // List of stored access policies specified on the share. @@ -1489,6 +1628,10 @@ type FileShareProperties struct { // READ-ONLY; The deleted time if the share was deleted. DeletedTime *time.Time + // READ-ONLY; The calculated burst IOPS of the share. This property is only for file shares created under Files Provisioned + // v2 account type. + IncludedBurstIops *int32 + // READ-ONLY; Returns the date and time the share was last modified. LastModifiedTime *time.Time @@ -1501,6 +1644,22 @@ type FileShareProperties struct { // READ-ONLY; The lease status of the share. LeaseStatus *LeaseStatus + // READ-ONLY; The calculated maximum burst credits for the share. This property is only for file shares created under Files + // Provisioned v2 account type. + MaxBurstCreditsForIops *int64 + + // READ-ONLY; Returns the next allowed provisioned bandwidth downgrade time for the share. This property is only for file + // shares created under Files Provisioned v2 account type. + NextAllowedProvisionedBandwidthDowngradeTime *time.Time + + // READ-ONLY; Returns the next allowed provisioned IOPS downgrade time for the share. This property is only for file shares + // created under Files Provisioned v2 account type. + NextAllowedProvisionedIopsDowngradeTime *time.Time + + // READ-ONLY; Returns the next allowed provisioned storage size downgrade time for the share. This property is only for file + // shares created under Files Provisioned v1 SSD and Files Provisioned v2 account type + NextAllowedQuotaDowngradeTime *time.Time + // READ-ONLY; Remaining retention days for share that was soft deleted. RemainingRetentionDays *int32 @@ -1515,6 +1674,39 @@ type FileShareProperties struct { Version *string } +// FileSharePropertiesFileSharePaidBursting - File Share Paid Bursting properties. +type FileSharePropertiesFileSharePaidBursting struct { + // Indicates whether paid bursting is enabled for the share. This property is only for file shares created under Files Provisioned + // v1 SSD account type. + PaidBurstingEnabled *bool + + // The maximum paid bursting bandwidth for the share, in mebibytes per second. This property is only for file shares created + // under Files Provisioned v1 SSD account type. The maximum allowed value is + // 10340 which is the maximum allowed bandwidth for a share. + PaidBurstingMaxBandwidthMibps *int32 + + // The maximum paid bursting IOPS for the share. This property is only for file shares created under Files Provisioned v1 + // SSD account type. The maximum allowed value is 102400 which is the maximum + // allowed IOPS for a share. + PaidBurstingMaxIops *int32 +} + +// FileShareRecommendations - Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in +// the storage account. +type FileShareRecommendations struct { + // READ-ONLY; The scalar for bandwidth in the file share provisioned bandwidth recommendation formula. + BandwidthScalar *float64 + + // READ-ONLY; The base bandwidth in the file share provisioned bandwidth recommendation formula. + BaseBandwidthMiBPerSec *int32 + + // READ-ONLY; The base IOPS in the file share provisioned IOPS recommendation formula. + BaseIOPS *int32 + + // READ-ONLY; The scalar for IO in the file share provisioned IOPS recommendation formula. + IoScalar *float64 +} + // GeoReplicationStats - Statistics related to replication for storage account's Blob, Table, Queue and File services. It // is only available when geo-redundant replication is enabled for the storage account. type GeoReplicationStats struct { @@ -2314,6 +2506,9 @@ type ObjectReplicationPolicyProperties struct { // REQUIRED; Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false. SourceAccount *string + // Optional. The object replication policy metrics feature options. + Metrics *ObjectReplicationPolicyPropertiesMetrics + // The storage account object replication rules. Rules []*ObjectReplicationPolicyRule @@ -2324,6 +2519,12 @@ type ObjectReplicationPolicyProperties struct { PolicyID *string } +// ObjectReplicationPolicyPropertiesMetrics - Optional. The object replication policy metrics feature options. +type ObjectReplicationPolicyPropertiesMetrics struct { + // Indicates whether object replication metrics feature is enabled for the policy. + Enabled *bool +} + // ObjectReplicationPolicyRule - The replication policy rule between two containers. type ObjectReplicationPolicyRule struct { // REQUIRED; Required. Destination container name. diff --git a/sdk/resourcemanager/storage/armstorage/models_serde.go b/sdk/resourcemanager/storage/armstorage/models_serde.go index ac6d6f180125..c861f3e7946b 100644 --- a/sdk/resourcemanager/storage/armstorage/models_serde.go +++ b/sdk/resourcemanager/storage/armstorage/models_serde.go @@ -308,6 +308,45 @@ func (a *AccountKey) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AccountLimits. +func (a AccountLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxFileShares", a.MaxFileShares) + populate(objectMap, "maxProvisionedBandwidthMiBPerSec", a.MaxProvisionedBandwidthMiBPerSec) + populate(objectMap, "maxProvisionedIOPS", a.MaxProvisionedIOPS) + populate(objectMap, "maxProvisionedStorageGiB", a.MaxProvisionedStorageGiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountLimits. +func (a *AccountLimits) 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 "maxFileShares": + err = unpopulate(val, "MaxFileShares", &a.MaxFileShares) + delete(rawMsg, key) + case "maxProvisionedBandwidthMiBPerSec": + err = unpopulate(val, "MaxProvisionedBandwidthMiBPerSec", &a.MaxProvisionedBandwidthMiBPerSec) + delete(rawMsg, key) + case "maxProvisionedIOPS": + err = unpopulate(val, "MaxProvisionedIOPS", &a.MaxProvisionedIOPS) + delete(rawMsg, key) + case "maxProvisionedStorageGiB": + err = unpopulate(val, "MaxProvisionedStorageGiB", &a.MaxProvisionedStorageGiB) + 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 AccountListKeysResult. func (a AccountListKeysResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1072,6 +1111,76 @@ func (a *AccountUpdateParameters) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AccountUsage. +func (a AccountUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "liveShares", a.LiveShares) + populate(objectMap, "softDeletedShares", a.SoftDeletedShares) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountUsage. +func (a *AccountUsage) 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 "liveShares": + err = unpopulate(val, "LiveShares", &a.LiveShares) + delete(rawMsg, key) + case "softDeletedShares": + err = unpopulate(val, "SoftDeletedShares", &a.SoftDeletedShares) + 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 AccountUsageElements. +func (a AccountUsageElements) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fileShareCount", a.FileShareCount) + populate(objectMap, "provisionedBandwidthMiBPerSec", a.ProvisionedBandwidthMiBPerSec) + populate(objectMap, "provisionedIOPS", a.ProvisionedIOPS) + populate(objectMap, "provisionedStorageGiB", a.ProvisionedStorageGiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountUsageElements. +func (a *AccountUsageElements) 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 "fileShareCount": + err = unpopulate(val, "FileShareCount", &a.FileShareCount) + delete(rawMsg, key) + case "provisionedBandwidthMiBPerSec": + err = unpopulate(val, "ProvisionedBandwidthMiBPerSec", &a.ProvisionedBandwidthMiBPerSec) + delete(rawMsg, key) + case "provisionedIOPS": + err = unpopulate(val, "ProvisionedIOPS", &a.ProvisionedIOPS) + delete(rawMsg, key) + case "provisionedStorageGiB": + err = unpopulate(val, "ProvisionedStorageGiB", &a.ProvisionedStorageGiB) + 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 ActiveDirectoryProperties. func (a ActiveDirectoryProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1747,6 +1856,41 @@ func (b *BlobServicePropertiesProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BurstingConstants. +func (b BurstingConstants) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "burstFloorIOPS", b.BurstFloorIOPS) + populate(objectMap, "burstIOScalar", b.BurstIOScalar) + populate(objectMap, "burstTimeframeSeconds", b.BurstTimeframeSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BurstingConstants. +func (b *BurstingConstants) 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 "burstFloorIOPS": + err = unpopulate(val, "BurstFloorIOPS", &b.BurstFloorIOPS) + delete(rawMsg, key) + case "burstIOScalar": + err = unpopulate(val, "BurstIOScalar", &b.BurstIOScalar) + delete(rawMsg, key) + case "burstTimeframeSeconds": + err = unpopulate(val, "BurstTimeframeSeconds", &b.BurstTimeframeSeconds) + 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 ChangeFeed. func (c ChangeFeed) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3036,6 +3180,119 @@ func (f *FileServicePropertiesProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type FileServiceUsage. +func (f FileServiceUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceUsage. +func (f *FileServiceUsage) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FileServiceUsageProperties. +func (f FileServiceUsageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "burstingConstants", f.BurstingConstants) + populate(objectMap, "fileShareLimits", f.FileShareLimits) + populate(objectMap, "fileShareRecommendations", f.FileShareRecommendations) + populate(objectMap, "storageAccountLimits", f.StorageAccountLimits) + populate(objectMap, "storageAccountUsage", f.StorageAccountUsage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceUsageProperties. +func (f *FileServiceUsageProperties) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "burstingConstants": + err = unpopulate(val, "BurstingConstants", &f.BurstingConstants) + delete(rawMsg, key) + case "fileShareLimits": + err = unpopulate(val, "FileShareLimits", &f.FileShareLimits) + delete(rawMsg, key) + case "fileShareRecommendations": + err = unpopulate(val, "FileShareRecommendations", &f.FileShareRecommendations) + delete(rawMsg, key) + case "storageAccountLimits": + err = unpopulate(val, "StorageAccountLimits", &f.StorageAccountLimits) + delete(rawMsg, key) + case "storageAccountUsage": + err = unpopulate(val, "StorageAccountUsage", &f.StorageAccountUsage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FileServiceUsages. +func (f FileServiceUsages) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceUsages. +func (f *FileServiceUsages) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type FileShare. func (f FileShare) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3153,6 +3410,53 @@ func (f *FileShareItems) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type FileShareLimits. +func (f FileShareLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxProvisionedBandwidthMiBPerSec", f.MaxProvisionedBandwidthMiBPerSec) + populate(objectMap, "maxProvisionedIOPS", f.MaxProvisionedIOPS) + populate(objectMap, "maxProvisionedStorageGiB", f.MaxProvisionedStorageGiB) + populate(objectMap, "minProvisionedBandwidthMiBPerSec", f.MinProvisionedBandwidthMiBPerSec) + populate(objectMap, "minProvisionedIOPS", f.MinProvisionedIOPS) + populate(objectMap, "minProvisionedStorageGiB", f.MinProvisionedStorageGiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileShareLimits. +func (f *FileShareLimits) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxProvisionedBandwidthMiBPerSec": + err = unpopulate(val, "MaxProvisionedBandwidthMiBPerSec", &f.MaxProvisionedBandwidthMiBPerSec) + delete(rawMsg, key) + case "maxProvisionedIOPS": + err = unpopulate(val, "MaxProvisionedIOPS", &f.MaxProvisionedIOPS) + delete(rawMsg, key) + case "maxProvisionedStorageGiB": + err = unpopulate(val, "MaxProvisionedStorageGiB", &f.MaxProvisionedStorageGiB) + delete(rawMsg, key) + case "minProvisionedBandwidthMiBPerSec": + err = unpopulate(val, "MinProvisionedBandwidthMiBPerSec", &f.MinProvisionedBandwidthMiBPerSec) + delete(rawMsg, key) + case "minProvisionedIOPS": + err = unpopulate(val, "MinProvisionedIOPS", &f.MinProvisionedIOPS) + delete(rawMsg, key) + case "minProvisionedStorageGiB": + err = unpopulate(val, "MinProvisionedStorageGiB", &f.MinProvisionedStorageGiB) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type FileShareProperties. func (f FileShareProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3162,11 +3466,19 @@ func (f FileShareProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "deleted", f.Deleted) populateDateTimeRFC3339(objectMap, "deletedTime", f.DeletedTime) populate(objectMap, "enabledProtocols", f.EnabledProtocols) + populate(objectMap, "fileSharePaidBursting", f.FileSharePaidBursting) + populate(objectMap, "includedBurstIops", f.IncludedBurstIops) populateDateTimeRFC3339(objectMap, "lastModifiedTime", f.LastModifiedTime) populate(objectMap, "leaseDuration", f.LeaseDuration) populate(objectMap, "leaseState", f.LeaseState) populate(objectMap, "leaseStatus", f.LeaseStatus) + populate(objectMap, "maxBurstCreditsForIops", f.MaxBurstCreditsForIops) populate(objectMap, "metadata", f.Metadata) + populateDateTimeRFC3339(objectMap, "nextAllowedProvisionedBandwidthDowngradeTime", f.NextAllowedProvisionedBandwidthDowngradeTime) + populateDateTimeRFC3339(objectMap, "nextAllowedProvisionedIopsDowngradeTime", f.NextAllowedProvisionedIopsDowngradeTime) + populateDateTimeRFC3339(objectMap, "nextAllowedQuotaDowngradeTime", f.NextAllowedQuotaDowngradeTime) + populate(objectMap, "provisionedBandwidthMibps", f.ProvisionedBandwidthMibps) + populate(objectMap, "provisionedIops", f.ProvisionedIops) populate(objectMap, "remainingRetentionDays", f.RemainingRetentionDays) populate(objectMap, "rootSquash", f.RootSquash) populate(objectMap, "shareQuota", f.ShareQuota) @@ -3204,6 +3516,12 @@ func (f *FileShareProperties) UnmarshalJSON(data []byte) error { case "enabledProtocols": err = unpopulate(val, "EnabledProtocols", &f.EnabledProtocols) delete(rawMsg, key) + case "fileSharePaidBursting": + err = unpopulate(val, "FileSharePaidBursting", &f.FileSharePaidBursting) + delete(rawMsg, key) + case "includedBurstIops": + err = unpopulate(val, "IncludedBurstIops", &f.IncludedBurstIops) + delete(rawMsg, key) case "lastModifiedTime": err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &f.LastModifiedTime) delete(rawMsg, key) @@ -3216,9 +3534,27 @@ func (f *FileShareProperties) UnmarshalJSON(data []byte) error { case "leaseStatus": err = unpopulate(val, "LeaseStatus", &f.LeaseStatus) delete(rawMsg, key) + case "maxBurstCreditsForIops": + err = unpopulate(val, "MaxBurstCreditsForIops", &f.MaxBurstCreditsForIops) + delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &f.Metadata) delete(rawMsg, key) + case "nextAllowedProvisionedBandwidthDowngradeTime": + err = unpopulateDateTimeRFC3339(val, "NextAllowedProvisionedBandwidthDowngradeTime", &f.NextAllowedProvisionedBandwidthDowngradeTime) + delete(rawMsg, key) + case "nextAllowedProvisionedIopsDowngradeTime": + err = unpopulateDateTimeRFC3339(val, "NextAllowedProvisionedIopsDowngradeTime", &f.NextAllowedProvisionedIopsDowngradeTime) + delete(rawMsg, key) + case "nextAllowedQuotaDowngradeTime": + err = unpopulateDateTimeRFC3339(val, "NextAllowedQuotaDowngradeTime", &f.NextAllowedQuotaDowngradeTime) + delete(rawMsg, key) + case "provisionedBandwidthMibps": + err = unpopulate(val, "ProvisionedBandwidthMibps", &f.ProvisionedBandwidthMibps) + delete(rawMsg, key) + case "provisionedIops": + err = unpopulate(val, "ProvisionedIops", &f.ProvisionedIops) + delete(rawMsg, key) case "remainingRetentionDays": err = unpopulate(val, "RemainingRetentionDays", &f.RemainingRetentionDays) delete(rawMsg, key) @@ -3248,6 +3584,80 @@ func (f *FileShareProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type FileSharePropertiesFileSharePaidBursting. +func (f FileSharePropertiesFileSharePaidBursting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "paidBurstingEnabled", f.PaidBurstingEnabled) + populate(objectMap, "paidBurstingMaxBandwidthMibps", f.PaidBurstingMaxBandwidthMibps) + populate(objectMap, "paidBurstingMaxIops", f.PaidBurstingMaxIops) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileSharePropertiesFileSharePaidBursting. +func (f *FileSharePropertiesFileSharePaidBursting) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "paidBurstingEnabled": + err = unpopulate(val, "PaidBurstingEnabled", &f.PaidBurstingEnabled) + delete(rawMsg, key) + case "paidBurstingMaxBandwidthMibps": + err = unpopulate(val, "PaidBurstingMaxBandwidthMibps", &f.PaidBurstingMaxBandwidthMibps) + delete(rawMsg, key) + case "paidBurstingMaxIops": + err = unpopulate(val, "PaidBurstingMaxIops", &f.PaidBurstingMaxIops) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FileShareRecommendations. +func (f FileShareRecommendations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bandwidthScalar", f.BandwidthScalar) + populate(objectMap, "baseBandwidthMiBPerSec", f.BaseBandwidthMiBPerSec) + populate(objectMap, "baseIOPS", f.BaseIOPS) + populate(objectMap, "ioScalar", f.IoScalar) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileShareRecommendations. +func (f *FileShareRecommendations) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bandwidthScalar": + err = unpopulate(val, "BandwidthScalar", &f.BandwidthScalar) + delete(rawMsg, key) + case "baseBandwidthMiBPerSec": + err = unpopulate(val, "BaseBandwidthMiBPerSec", &f.BaseBandwidthMiBPerSec) + delete(rawMsg, key) + case "baseIOPS": + err = unpopulate(val, "BaseIOPS", &f.BaseIOPS) + delete(rawMsg, key) + case "ioScalar": + err = unpopulate(val, "IoScalar", &f.IoScalar) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type GeoReplicationStats. func (g GeoReplicationStats) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5378,6 +5788,7 @@ func (o ObjectReplicationPolicyProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "destinationAccount", o.DestinationAccount) populateDateTimeRFC3339(objectMap, "enabledTime", o.EnabledTime) + populate(objectMap, "metrics", o.Metrics) populate(objectMap, "policyId", o.PolicyID) populate(objectMap, "rules", o.Rules) populate(objectMap, "sourceAccount", o.SourceAccount) @@ -5399,6 +5810,9 @@ func (o *ObjectReplicationPolicyProperties) UnmarshalJSON(data []byte) error { case "enabledTime": err = unpopulateDateTimeRFC3339(val, "EnabledTime", &o.EnabledTime) delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &o.Metrics) + delete(rawMsg, key) case "policyId": err = unpopulate(val, "PolicyID", &o.PolicyID) delete(rawMsg, key) @@ -5416,6 +5830,33 @@ func (o *ObjectReplicationPolicyProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicyPropertiesMetrics. +func (o ObjectReplicationPolicyPropertiesMetrics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", o.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicyPropertiesMetrics. +func (o *ObjectReplicationPolicyPropertiesMetrics) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &o.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicyRule. func (o ObjectReplicationPolicyRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/storage/armstorage/networksecurityperimeterconfigurations_client.go b/sdk/resourcemanager/storage/armstorage/networksecurityperimeterconfigurations_client.go index 63c1116b44ac..e1915b2c2bb6 100644 --- a/sdk/resourcemanager/storage/armstorage/networksecurityperimeterconfigurations_client.go +++ b/sdk/resourcemanager/storage/armstorage/networksecurityperimeterconfigurations_client.go @@ -46,7 +46,7 @@ func NewNetworkSecurityPerimeterConfigurationsClient(subscriptionID string, cred // Get - Gets effective NetworkSecurityPerimeterConfiguration for association // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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 *NetworkSecurityPerimeterConfigurationsClient) getCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -116,7 +116,7 @@ func (client *NetworkSecurityPerimeterConfigurationsClient) getHandleResponse(re // NewListPager - Gets list of effective NetworkSecurityPerimeterConfiguration for storage account // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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. @@ -166,7 +166,7 @@ func (client *NetworkSecurityPerimeterConfigurationsClient) listCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,7 +184,7 @@ func (client *NetworkSecurityPerimeterConfigurationsClient) listHandleResponse(r // BeginReconcile - Refreshes any information about the association. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-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. @@ -212,7 +212,7 @@ func (client *NetworkSecurityPerimeterConfigurationsClient) BeginReconcile(ctx c // Reconcile - Refreshes any information about the association. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 func (client *NetworkSecurityPerimeterConfigurationsClient) reconcile(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*http.Response, error) { var err error const operationName = "NetworkSecurityPerimeterConfigurationsClient.BeginReconcile" @@ -258,7 +258,7 @@ func (client *NetworkSecurityPerimeterConfigurationsClient) reconcileCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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/networksecurityperimeterconfigurations_client_example_test.go b/sdk/resourcemanager/storage/armstorage/networksecurityperimeterconfigurations_client_example_test.go deleted file mode 100644 index ef7faea15726..000000000000 --- a/sdk/resourcemanager/storage/armstorage/networksecurityperimeterconfigurations_client_example_test.go +++ /dev/null @@ -1,167 +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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationList.json -func ExampleNetworkSecurityPerimeterConfigurationsClient_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.NewNetworkSecurityPerimeterConfigurationsClient().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.NetworkSecurityPerimeterConfigurationList = armstorage.NetworkSecurityPerimeterConfigurationList{ - // Value: []*armstorage.NetworkSecurityPerimeterConfiguration{ - // { - // Name: to.Ptr("dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/networkSecurityPerimeterConfigurations"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/networkSecurityPerimeterConfigurations/dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), - // Properties: &armstorage.NetworkSecurityPerimeterConfigurationProperties{ - // NetworkSecurityPerimeter: &armstorage.NetworkSecurityPerimeter{ - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/res4794/providers/Microsoft.Network/networkSecurityPerimeters/nsp1"), - // Location: to.Ptr("East US"), - // PerimeterGUID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"), - // }, - // Profile: &armstorage.NetworkSecurityPerimeterConfigurationPropertiesProfile{ - // Name: to.Ptr("profile1"), - // AccessRules: []*armstorage.NspAccessRule{ - // { - // Name: to.Ptr("inVpnRule"), - // Properties: &armstorage.NspAccessRuleProperties{ - // AddressPrefixes: []*string{ - // to.Ptr("148.0.0.0/8"), - // to.Ptr("152.4.6.0/24")}, - // Direction: to.Ptr(armstorage.NspAccessRuleDirectionInbound), - // }, - // }}, - // AccessRulesVersion: to.Ptr[float32](10), - // DiagnosticSettingsVersion: to.Ptr[float32](5), - // EnabledLogCategories: []*string{ - // to.Ptr("NspPublicInboundPerimeterRulesAllowed"), - // to.Ptr("NspPublicInboundPerimeterRulesDenied")}, - // }, - // ProvisioningState: to.Ptr(armstorage.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded), - // ResourceAssociation: &armstorage.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation{ - // Name: to.Ptr("association1"), - // AccessMode: to.Ptr(armstorage.ResourceAssociationAccessModeEnforced), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationGet.json -func ExampleNetworkSecurityPerimeterConfigurationsClient_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.NewNetworkSecurityPerimeterConfigurationsClient().Get(ctx, "res4410", "sto8607", "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1", 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.NetworkSecurityPerimeterConfiguration = armstorage.NetworkSecurityPerimeterConfiguration{ - // Name: to.Ptr("dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/networkSecurityPerimeterConfigurations"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/networkSecurityPerimeterConfigurations/dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), - // Properties: &armstorage.NetworkSecurityPerimeterConfigurationProperties{ - // NetworkSecurityPerimeter: &armstorage.NetworkSecurityPerimeter{ - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/res4794/providers/Microsoft.Network/networkSecurityPerimeters/nsp1"), - // Location: to.Ptr("East US"), - // PerimeterGUID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"), - // }, - // Profile: &armstorage.NetworkSecurityPerimeterConfigurationPropertiesProfile{ - // Name: to.Ptr("profile1"), - // AccessRules: []*armstorage.NspAccessRule{ - // { - // Name: to.Ptr("allowedSubscriptions"), - // Properties: &armstorage.NspAccessRuleProperties{ - // Direction: to.Ptr(armstorage.NspAccessRuleDirectionInbound), - // Subscriptions: []*armstorage.NspAccessRulePropertiesSubscriptionsItem{ - // { - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774"), - // }}, - // }, - // }}, - // AccessRulesVersion: to.Ptr[float32](10), - // DiagnosticSettingsVersion: to.Ptr[float32](5), - // EnabledLogCategories: []*string{ - // to.Ptr("NspPublicInboundPerimeterRulesAllowed"), - // to.Ptr("NspPublicInboundPerimeterRulesDenied")}, - // }, - // ProvisioningIssues: []*armstorage.ProvisioningIssue{ - // { - // Name: to.Ptr("ConfigurationPropagationFailure"), - // Properties: &armstorage.ProvisioningIssueProperties{ - // Description: to.Ptr("Failed to update Network Security Perimeter association."), - // IssueType: to.Ptr(armstorage.IssueTypeConfigurationPropagationFailure), - // Severity: to.Ptr(armstorage.SeverityError), - // }, - // }}, - // ProvisioningState: to.Ptr(armstorage.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded), - // ResourceAssociation: &armstorage.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation{ - // Name: to.Ptr("resourceAssociation1"), - // AccessMode: to.Ptr(armstorage.ResourceAssociationAccessModeEnforced), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json -func ExampleNetworkSecurityPerimeterConfigurationsClient_BeginReconcile() { - 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.NewNetworkSecurityPerimeterConfigurationsClient().BeginReconcile(ctx, "res4410", "sto8607", "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1", 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/objectreplicationpolicies_client.go b/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client.go index 2cf592f475d6..9752763109c9 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 68c7746ecc00..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.716Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.716Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.716Z"); 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 8ceebe5de36f..0dfd7d1b910e 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2a3ab5b75cc3..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/options.go b/sdk/resourcemanager/storage/armstorage/options.go index fec991677c59..fac57f86f1f6 100644 --- a/sdk/resourcemanager/storage/armstorage/options.go +++ b/sdk/resourcemanager/storage/armstorage/options.go @@ -140,9 +140,9 @@ type BlobContainersClientCreateOptions struct { // BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.CreateOrUpdateImmutabilityPolicy // method. type BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions struct { - // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation - // only if the immutability policy already exists. If omitted, this operation will - // always be applied. + // The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. + // The ETag value must include the leading and trailing double quotes as + // returned by the service. IfMatch *string // The ImmutabilityPolicy Properties that will be created or updated to a blob container. @@ -170,9 +170,9 @@ type BlobContainersClientExtendImmutabilityPolicyOptions struct { // BlobContainersClientGetImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.GetImmutabilityPolicy // method. type BlobContainersClientGetImmutabilityPolicyOptions struct { - // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation - // only if the immutability policy already exists. If omitted, this operation will - // always be applied. + // The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. + // The ETag value must include the leading and trailing double quotes as + // returned by the service. IfMatch *string } @@ -297,11 +297,23 @@ type FileServicesClientGetServicePropertiesOptions struct { // placeholder for future optional parameters } +// FileServicesClientGetServiceUsageOptions contains the optional parameters for the FileServicesClient.GetServiceUsage method. +type FileServicesClientGetServiceUsageOptions struct { + // placeholder for future optional parameters +} + // FileServicesClientListOptions contains the optional parameters for the FileServicesClient.List method. type FileServicesClientListOptions struct { // placeholder for future optional parameters } +// FileServicesClientListServiceUsagesOptions contains the optional parameters for the FileServicesClient.NewListServiceUsagesPager +// method. +type FileServicesClientListServiceUsagesOptions struct { + // Optional, specifies the maximum number of file service usages to be included in the list response. + Maxpagesize *int32 +} + // FileServicesClientSetServicePropertiesOptions contains the optional parameters for the FileServicesClient.SetServiceProperties // method. type FileServicesClientSetServicePropertiesOptions struct { diff --git a/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go b/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client.go index d55e9f5e3b18..8df1c33bb196 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 08907ca487f1..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 aa95c504745d..8d42a0597254 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 054aa6f576e6..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 ce3553b8e071..0d323a5fc052 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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 *QueueClient) listCreateRequest(ctx context.Context, resourceGroupN if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", *options.Maxpagesize) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,7 +327,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 2023-05-01 +// Generated from API version 2024-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. @@ -382,7 +382,7 @@ func (client *QueueClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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 20bffb7465a6..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 8d8cbc88eaa4..2120d9ff0c66 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 070c5983d307..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/responses.go b/sdk/resourcemanager/storage/armstorage/responses.go index e014af80f8c6..33f493d75318 100644 --- a/sdk/resourcemanager/storage/armstorage/responses.go +++ b/sdk/resourcemanager/storage/armstorage/responses.go @@ -290,11 +290,23 @@ type FileServicesClientGetServicePropertiesResponse struct { FileServiceProperties } +// FileServicesClientGetServiceUsageResponse contains the response from method FileServicesClient.GetServiceUsage. +type FileServicesClientGetServiceUsageResponse struct { + // The usage of file service in storage account. + FileServiceUsage +} + // FileServicesClientListResponse contains the response from method FileServicesClient.List. type FileServicesClientListResponse struct { FileServiceItems } +// FileServicesClientListServiceUsagesResponse contains the response from method FileServicesClient.NewListServiceUsagesPager. +type FileServicesClientListServiceUsagesResponse struct { + // List file service usages schema. + FileServiceUsages +} + // FileServicesClientSetServicePropertiesResponse contains the response from method FileServicesClient.SetServiceProperties. type FileServicesClientSetServicePropertiesResponse struct { // The properties of File services in storage account. diff --git a/sdk/resourcemanager/storage/armstorage/skus_client.go b/sdk/resourcemanager/storage/armstorage/skus_client.go index ff08406f10e1..9211a7e996c7 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 c8ad88de75f8..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 e21c38e41b85..97c3d62e7654 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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 *TableClient) listCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -320,7 +320,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 2023-05-01 +// Generated from API version 2024-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 *TableClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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 b3003c09f81a..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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.000Z"); return t }()), - Permission: to.Ptr("raud"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.000Z"); 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.000Z"); return t }()), - Permission: to.Ptr("rad"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.000Z"); 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.000Z"); return t}()), - // Permission: to.Ptr("raud"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.000Z"); 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.000Z"); return t}()), - // Permission: to.Ptr("rad"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.000Z"); return t}()), - // }, - // ID: to.Ptr("PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"), - // }}, - // TableName: to.Ptr("table6185"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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 eba9a122a77e..534eb1b8d0bd 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 5ce4dd7dea16..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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/taskassignmentinstancesreport_client.go b/sdk/resourcemanager/storage/armstorage/taskassignmentinstancesreport_client.go index d5c0a50e7389..42e514978c9a 100644 --- a/sdk/resourcemanager/storage/armstorage/taskassignmentinstancesreport_client.go +++ b/sdk/resourcemanager/storage/armstorage/taskassignmentinstancesreport_client.go @@ -46,7 +46,7 @@ func NewTaskAssignmentInstancesReportClient(subscriptionID string, credential az // NewListPager - Fetch the report summary of a single storage task assignment's instances // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. 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. @@ -107,7 +107,7 @@ func (client *TaskAssignmentInstancesReportClient) listCreateRequest(ctx context if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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/taskassignmentinstancesreport_client_example_test.go b/sdk/resourcemanager/storage/armstorage/taskassignmentinstancesreport_client_example_test.go deleted file mode 100644 index e2f90ca3aa66..000000000000 --- a/sdk/resourcemanager/storage/armstorage/taskassignmentinstancesreport_client_example_test.go +++ /dev/null @@ -1,90 +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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json -func ExampleTaskAssignmentInstancesReportClient_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.NewTaskAssignmentInstancesReportClient().NewListPager("res4228", "sto4445", "myassignment1", &armstorage.TaskAssignmentInstancesReportClientListOptions{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.TaskReportSummary = armstorage.TaskReportSummary{ - // Value: []*armstorage.TaskReportInstance{ - // { - // Name: to.Ptr("instance1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/reports"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/instance1"), - // Properties: &armstorage.TaskReportProperties{ - // FinishTime: to.Ptr("2023-06-23T00:40:10.2931264Z"), - // ObjectFailedCount: to.Ptr("0"), - // ObjectsOperatedOnCount: to.Ptr("150"), - // ObjectsSucceededCount: to.Ptr("150"), - // ObjectsTargetedCount: to.Ptr("150"), - // RunResult: to.Ptr(armstorage.RunResultSucceeded), - // RunStatusEnum: to.Ptr(armstorage.RunStatusEnumFinished), - // RunStatusError: to.Ptr("0"), - // StartTime: to.Ptr("2023-06-23T00:30:43.226744Z"), - // StorageAccountID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445"), - // SummaryReportPath: to.Ptr("https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json"), - // TaskAssignmentID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - // TaskVersion: to.Ptr("1"), - // }, - // }, - // { - // Name: to.Ptr("instance2"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/reports"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/instance2"), - // Properties: &armstorage.TaskReportProperties{ - // FinishTime: to.Ptr("2023-06-23T00:40:10.2931264Z"), - // ObjectFailedCount: to.Ptr("0"), - // ObjectsOperatedOnCount: to.Ptr("150"), - // ObjectsSucceededCount: to.Ptr("150"), - // ObjectsTargetedCount: to.Ptr("150"), - // RunResult: to.Ptr(armstorage.RunResultSucceeded), - // RunStatusEnum: to.Ptr(armstorage.RunStatusEnumFinished), - // RunStatusError: to.Ptr("0"), - // StartTime: to.Ptr("2023-06-23T00:30:43.226744Z"), - // StorageAccountID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445"), - // SummaryReportPath: to.Ptr("https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json"), - // TaskAssignmentID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - // TaskVersion: to.Ptr("1"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/taskassignments_client.go b/sdk/resourcemanager/storage/armstorage/taskassignments_client.go index 8312677be8bc..24fbb192f0d8 100644 --- a/sdk/resourcemanager/storage/armstorage/taskassignments_client.go +++ b/sdk/resourcemanager/storage/armstorage/taskassignments_client.go @@ -51,7 +51,7 @@ func NewTaskAssignmentsClient(subscriptionID string, credential azcore.TokenCred // set of properties, the request will succeed. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. 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. @@ -85,7 +85,7 @@ func (client *TaskAssignmentsClient) BeginCreate(ctx context.Context, resourceGr // set of properties, the request will succeed. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 func (client *TaskAssignmentsClient) create(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignment, options *TaskAssignmentsClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "TaskAssignmentsClient.BeginCreate" @@ -131,7 +131,7 @@ func (client *TaskAssignmentsClient) createCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -143,7 +143,7 @@ func (client *TaskAssignmentsClient) createCreateRequest(ctx context.Context, re // BeginDelete - Delete the storage task assignment sub-resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. 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. @@ -172,7 +172,7 @@ func (client *TaskAssignmentsClient) BeginDelete(ctx context.Context, resourceGr // Delete - Delete the storage task assignment sub-resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 func (client *TaskAssignmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, options *TaskAssignmentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "TaskAssignmentsClient.BeginDelete" @@ -218,7 +218,7 @@ func (client *TaskAssignmentsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -227,7 +227,7 @@ func (client *TaskAssignmentsClient) deleteCreateRequest(ctx context.Context, re // Get - Get the storage task assignment properties // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. 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. @@ -280,7 +280,7 @@ func (client *TaskAssignmentsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,7 +297,7 @@ func (client *TaskAssignmentsClient) getHandleResponse(resp *http.Response) (Tas // NewListPager - List all the storage task assignments in an account // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. 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. @@ -349,7 +349,7 @@ func (client *TaskAssignmentsClient) listCreateRequest(ctx context.Context, reso if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -367,7 +367,7 @@ func (client *TaskAssignmentsClient) listHandleResponse(resp *http.Response) (Ta // BeginUpdate - Update storage task assignment properties // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. 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. @@ -397,7 +397,7 @@ func (client *TaskAssignmentsClient) BeginUpdate(ctx context.Context, resourceGr // Update - Update storage task assignment properties // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 func (client *TaskAssignmentsClient) update(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignmentUpdateParameters, options *TaskAssignmentsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "TaskAssignmentsClient.BeginUpdate" @@ -443,7 +443,7 @@ func (client *TaskAssignmentsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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/taskassignments_client_example_test.go b/sdk/resourcemanager/storage/armstorage/taskassignments_client_example_test.go deleted file mode 100644 index 0830fdcff034..000000000000 --- a/sdk/resourcemanager/storage/armstorage/taskassignments_client_example_test.go +++ /dev/null @@ -1,391 +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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json -func ExampleTaskAssignmentsClient_BeginCreate_putStorageTaskAssignment() { - 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.NewTaskAssignmentsClient().BeginCreate(ctx, "res4228", "sto4445", "myassignment1", armstorage.TaskAssignment{ - Properties: &armstorage.TaskAssignmentProperties{ - Description: to.Ptr("My Storage task assignment"), - Enabled: to.Ptr(true), - ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ - Target: &armstorage.ExecutionTarget{ - ExcludePrefix: []*string{}, - Prefix: []*string{ - to.Ptr("prefix1"), - to.Ptr("prefix2")}, - }, - Trigger: &armstorage.ExecutionTrigger{ - Type: to.Ptr(armstorage.TriggerTypeRunOnce), - Parameters: &armstorage.TriggerParameters{ - StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t }()), - }, - }, - }, - Report: &armstorage.TaskAssignmentReport{ - Prefix: to.Ptr("container1"), - }, - TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - }, - }, 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.TaskAssignment = armstorage.TaskAssignment{ - // Name: to.Ptr("myassignment1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), - // Properties: &armstorage.TaskAssignmentProperties{ - // Description: to.Ptr("My Storage task assignment"), - // Enabled: to.Ptr(true), - // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ - // Target: &armstorage.ExecutionTarget{ - // ExcludePrefix: []*string{ - // }, - // Prefix: []*string{ - // to.Ptr("prefix1"), - // to.Ptr("prefix2")}, - // }, - // Trigger: &armstorage.ExecutionTrigger{ - // Type: to.Ptr(armstorage.TriggerTypeRunOnce), - // Parameters: &armstorage.TriggerParameters{ - // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), - // }, - // }, - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // Report: &armstorage.TaskAssignmentReport{ - // Prefix: to.Ptr("container1"), - // }, - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json -func ExampleTaskAssignmentsClient_BeginCreate_putStorageTaskAssignmentRequiredProperties() { - 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.NewTaskAssignmentsClient().BeginCreate(ctx, "res4228", "sto4445", "myassignment1", armstorage.TaskAssignment{ - Properties: &armstorage.TaskAssignmentProperties{ - Description: to.Ptr("My Storage task assignment"), - Enabled: to.Ptr(true), - ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ - Trigger: &armstorage.ExecutionTrigger{ - Type: to.Ptr(armstorage.TriggerTypeRunOnce), - Parameters: &armstorage.TriggerParameters{ - StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t }()), - }, - }, - }, - Report: &armstorage.TaskAssignmentReport{ - Prefix: to.Ptr("container1"), - }, - TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - }, - }, 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.TaskAssignment = armstorage.TaskAssignment{ - // Name: to.Ptr("myassignment1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), - // Properties: &armstorage.TaskAssignmentProperties{ - // Description: to.Ptr("My Storage task assignment"), - // Enabled: to.Ptr(true), - // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ - // Trigger: &armstorage.ExecutionTrigger{ - // Type: to.Ptr(armstorage.TriggerTypeRunOnce), - // Parameters: &armstorage.TriggerParameters{ - // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), - // }, - // }, - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // Report: &armstorage.TaskAssignmentReport{ - // Prefix: to.Ptr("container1"), - // }, - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json -func ExampleTaskAssignmentsClient_BeginUpdate() { - 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.NewTaskAssignmentsClient().BeginUpdate(ctx, "res4228", "sto4445", "myassignment1", armstorage.TaskAssignmentUpdateParameters{ - Properties: &armstorage.TaskAssignmentUpdateProperties{ - Description: to.Ptr("My Storage task assignment"), - Enabled: to.Ptr(true), - ExecutionContext: &armstorage.TaskAssignmentUpdateExecutionContext{ - Target: &armstorage.ExecutionTarget{ - ExcludePrefix: []*string{}, - Prefix: []*string{ - to.Ptr("prefix1"), - to.Ptr("prefix2")}, - }, - Trigger: &armstorage.ExecutionTriggerUpdate{ - Type: to.Ptr(armstorage.TriggerTypeRunOnce), - Parameters: &armstorage.TriggerParametersUpdate{ - StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t }()), - }, - }, - }, - Report: &armstorage.TaskAssignmentUpdateReport{ - Prefix: to.Ptr("container1"), - }, - }, - }, 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.TaskAssignment = armstorage.TaskAssignment{ - // Name: to.Ptr("myassignment1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), - // Properties: &armstorage.TaskAssignmentProperties{ - // Description: to.Ptr("My Storage task assignment"), - // Enabled: to.Ptr(true), - // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ - // Target: &armstorage.ExecutionTarget{ - // ExcludePrefix: []*string{ - // }, - // Prefix: []*string{ - // to.Ptr("prefix1"), - // to.Ptr("prefix2")}, - // }, - // Trigger: &armstorage.ExecutionTrigger{ - // Type: to.Ptr(armstorage.TriggerTypeRunOnce), - // Parameters: &armstorage.TriggerParameters{ - // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), - // }, - // }, - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // Report: &armstorage.TaskAssignmentReport{ - // Prefix: to.Ptr("container1"), - // }, - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json -func ExampleTaskAssignmentsClient_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.NewTaskAssignmentsClient().Get(ctx, "res4228", "sto4445", "myassignment1", 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.TaskAssignment = armstorage.TaskAssignment{ - // Name: to.Ptr("myassignment1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), - // Properties: &armstorage.TaskAssignmentProperties{ - // Description: to.Ptr("My Storage task assignment"), - // Enabled: to.Ptr(true), - // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ - // Target: &armstorage.ExecutionTarget{ - // ExcludePrefix: []*string{ - // }, - // Prefix: []*string{ - // to.Ptr("prefix1"), - // to.Ptr("prefix2")}, - // }, - // Trigger: &armstorage.ExecutionTrigger{ - // Type: to.Ptr(armstorage.TriggerTypeRunOnce), - // Parameters: &armstorage.TriggerParameters{ - // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), - // }, - // }, - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // Report: &armstorage.TaskAssignmentReport{ - // Prefix: to.Ptr("container1"), - // }, - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json -func ExampleTaskAssignmentsClient_BeginDelete() { - 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.NewTaskAssignmentsClient().BeginDelete(ctx, "res4228", "sto4445", "myassignment1", 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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json -func ExampleTaskAssignmentsClient_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.NewTaskAssignmentsClient().NewListPager("res4228", "sto4445", &armstorage.TaskAssignmentsClientListOptions{Maxpagesize: 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.TaskAssignmentsList = armstorage.TaskAssignmentsList{ - // Value: []*armstorage.TaskAssignment{ - // { - // Name: to.Ptr("myassignment1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), - // Properties: &armstorage.TaskAssignmentProperties{ - // Description: to.Ptr("My Storage task assignment #1"), - // Enabled: to.Ptr(true), - // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ - // Target: &armstorage.ExecutionTarget{ - // ExcludePrefix: []*string{ - // }, - // Prefix: []*string{ - // to.Ptr("prefix1"), - // to.Ptr("prefix2")}, - // }, - // Trigger: &armstorage.ExecutionTrigger{ - // Type: to.Ptr(armstorage.TriggerTypeRunOnce), - // Parameters: &armstorage.TriggerParameters{ - // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), - // }, - // }, - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // Report: &armstorage.TaskAssignmentReport{ - // Prefix: to.Ptr("container1"), - // }, - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - // }, - // }, - // { - // Name: to.Ptr("myassignment2"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment2"), - // Properties: &armstorage.TaskAssignmentProperties{ - // Description: to.Ptr("My Storage task assignment #2"), - // Enabled: to.Ptr(true), - // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ - // Target: &armstorage.ExecutionTarget{ - // ExcludePrefix: []*string{ - // }, - // Prefix: []*string{ - // to.Ptr("prefix3"), - // to.Ptr("prefix4")}, - // }, - // Trigger: &armstorage.ExecutionTrigger{ - // Type: to.Ptr(armstorage.TriggerTypeRunOnce), - // Parameters: &armstorage.TriggerParameters{ - // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), - // }, - // }, - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // Report: &armstorage.TaskAssignmentReport{ - // Prefix: to.Ptr("container2"), - // }, - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask2"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/taskassignmentsinstancesreport_client.go b/sdk/resourcemanager/storage/armstorage/taskassignmentsinstancesreport_client.go index 28473744f1bc..c9637d8e0c9d 100644 --- a/sdk/resourcemanager/storage/armstorage/taskassignmentsinstancesreport_client.go +++ b/sdk/resourcemanager/storage/armstorage/taskassignmentsinstancesreport_client.go @@ -46,7 +46,7 @@ func NewTaskAssignmentsInstancesReportClient(subscriptionID string, credential a // NewListPager - Fetch the report summary of all the storage task assignments and instances in an account // -// Generated from API version 2023-05-01 +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. 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 *TaskAssignmentsInstancesReportClient) listCreateRequest(ctx contex if options != nil && options.Maxpagesize != nil { reqQP.Set("$maxpagesize", strconv.FormatInt(int64(*options.Maxpagesize), 10)) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-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/taskassignmentsinstancesreport_client_example_test.go b/sdk/resourcemanager/storage/armstorage/taskassignmentsinstancesreport_client_example_test.go deleted file mode 100644 index 922822d95323..000000000000 --- a/sdk/resourcemanager/storage/armstorage/taskassignmentsinstancesreport_client_example_test.go +++ /dev/null @@ -1,90 +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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json -func ExampleTaskAssignmentsInstancesReportClient_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.NewTaskAssignmentsInstancesReportClient().NewListPager("res4228", "sto4445", &armstorage.TaskAssignmentsInstancesReportClientListOptions{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.TaskReportSummary = armstorage.TaskReportSummary{ - // Value: []*armstorage.TaskReportInstance{ - // { - // Name: to.Ptr("instance1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/reports"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/instance1"), - // Properties: &armstorage.TaskReportProperties{ - // FinishTime: to.Ptr("2023-06-23T00:40:10.2931264Z"), - // ObjectFailedCount: to.Ptr("0"), - // ObjectsOperatedOnCount: to.Ptr("150"), - // ObjectsSucceededCount: to.Ptr("150"), - // ObjectsTargetedCount: to.Ptr("150"), - // RunResult: to.Ptr(armstorage.RunResultSucceeded), - // RunStatusEnum: to.Ptr(armstorage.RunStatusEnumFinished), - // RunStatusError: to.Ptr("0"), - // StartTime: to.Ptr("2023-06-23T00:30:43.226744Z"), - // StorageAccountID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445"), - // SummaryReportPath: to.Ptr("https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json"), - // TaskAssignmentID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - // TaskVersion: to.Ptr("1"), - // }, - // }, - // { - // Name: to.Ptr("instance2"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/reports"), - // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/instance2"), - // Properties: &armstorage.TaskReportProperties{ - // FinishTime: to.Ptr("2023-06-23T00:40:10.2931264Z"), - // ObjectFailedCount: to.Ptr("0"), - // ObjectsOperatedOnCount: to.Ptr("150"), - // ObjectsSucceededCount: to.Ptr("150"), - // ObjectsTargetedCount: to.Ptr("150"), - // RunResult: to.Ptr(armstorage.RunResultSucceeded), - // RunStatusEnum: to.Ptr(armstorage.RunStatusEnumFinished), - // RunStatusError: to.Ptr("0"), - // StartTime: to.Ptr("2023-06-23T00:30:43.226744Z"), - // StorageAccountID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445"), - // SummaryReportPath: to.Ptr("https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json"), - // TaskAssignmentID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment2"), - // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), - // TaskVersion: to.Ptr("1"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/usages_client.go b/sdk/resourcemanager/storage/armstorage/usages_client.go index e00dba24d5bc..4053032d9b95 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 2023-05-01 +// Generated from API version 2024-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", "2023-05-01") + reqQP.Set("api-version", "2024-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 3a8639fa62f9..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/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-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), - // }}, - // } - } -}