From 0498fbb22c6e63fbabe683be39863f81dc2876b5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 20 Nov 2023 09:38:00 +0000 Subject: [PATCH] CodeGen from PR 26712 in Azure/azure-rest-api-specs Merge 6970c8db497399ba952f52a2a9e6d8431bb5137e into bf204aab860f2eb58a9d346b00d44760f2a9b0a2 --- .../storage/armstorage/CHANGELOG.md | 4 + .../accounts_client_example_test.go | 4076 ----------- .../storage/armstorage/autorest.md | 7 +- .../blobcontainers_client_example_test.go | 844 --- ...obinventorypolicies_client_example_test.go | 711 -- .../blobservices_client_example_test.go | 441 -- .../storage/armstorage/constants.go | 2 +- .../deletedaccounts_client_example_test.go | 102 - .../encryptionscopes_client_example_test.go | 216 - .../fileservices_client_example_test.go | 408 -- .../fileshares_client_example_test.go | 512 -- sdk/resourcemanager/storage/armstorage/go.mod | 2 +- .../localusers_client_example_test.go | 303 - .../managementpolicies_client_example_test.go | 1032 --- ...replicationpolicies_client_example_test.go | 382 - .../operations_client_example_test.go | 498 -- ...endpointconnections_client_example_test.go | 175 - ...rivatelinkresources_client_example_test.go | 113 - .../armstorage/queue_client_example_test.go | 207 - .../queueservices_client_example_test.go | 298 - .../armstorage/skus_client_example_test.go | 6238 ----------------- .../armstorage/table_client_example_test.go | 232 - .../tableservices_client_example_test.go | 298 - .../armstorage/usages_client_example_test.go | 55 - 24 files changed, 9 insertions(+), 17147 deletions(-) delete mode 100644 sdk/resourcemanager/storage/armstorage/accounts_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/blobcontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/blobservices_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/deletedaccounts_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/encryptionscopes_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/fileservices_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/fileshares_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/localusers_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/managementpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/operations_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/privateendpointconnections_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/privatelinkresources_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/queue_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/queueservices_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/skus_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/table_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/tableservices_client_example_test.go delete mode 100644 sdk/resourcemanager/storage/armstorage/usages_client_example_test.go diff --git a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md index c31bba320f1c..20b092d2fda9 100644 --- a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md +++ b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.4.1 (2023-11-20) +### Other Changes + + ## 1.5.0-beta.1 (2023-10-09) ### Features Added 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 27ff0e672ab7..000000000000 --- a/sdk/resourcemanager/storage/armstorage/accounts_client_example_test.go +++ /dev/null @@ -1,4076 +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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/NfsV3AccountCreate.json -func ExampleAccountsClient_BeginCreate_nfsV3AccountCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Kind: to.Ptr(armstorage.KindBlockBlobStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - IsHnsEnabled: to.Ptr(true), - EnableNfsV3: to.Ptr(true), - NetworkRuleSet: &armstorage.NetworkRuleSet{ - Bypass: to.Ptr(armstorage.BypassAzureServices), - DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - IPRules: []*armstorage.IPRule{}, - VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - { - VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"), - }}, - }, - EnableHTTPSTrafficOnly: to.Ptr(false), - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNamePremiumLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Kind: to.Ptr(armstorage.KindBlockBlobStorage), - // Properties: &armstorage.AccountProperties{ - // IsHnsEnabled: to.Ptr(true), - // EnableNfsV3: to.Ptr(true), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // { - // VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"), - // }}, - // }, - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreate.json -func ExampleAccountsClient_BeginCreate_storageAccountCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - DefaultToOAuthAuthentication: to.Ptr(false), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - IsSftpEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSftpEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateAllowedCopyScopeToAAD.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateAllowedCopyScopeToAad() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateAllowedCopyScopeToPrivateLink.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateAllowedCopyScopeToPrivateLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopePrivateLink), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopePrivateLink), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateDisallowPublicNetworkAccess.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateDisallowPublicNetworkAccess() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateDnsEndpointTypeToAzureDnsZone() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - DefaultToOAuthAuthentication: to.Ptr(false), - DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeAzureDNSZone), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - IsSftpEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeAzureDNSZone), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSftpEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.z24.blob.storage.azure.net/"), - // Dfs: to.Ptr("https://sto4445.z24.dfs.storage.azure.net/"), - // File: to.Ptr("https://sto4445.z24.file.storage.azure.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.z24.blob.storage.azure.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.z24.dfs.storage.azure.net/"), - // File: to.Ptr("https://sto4445-internetrouting.z24.file.storage.azure.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.z24.web.storage.azure.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.z24.blob.storage.azure.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.z24.dfs.storage.azure.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.z24.file.storage.azure.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.z24.queue.storage.azure.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.z24.table.storage.azure.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.z24.web.storage.azure.net/"), - // }, - // Queue: to.Ptr("https://sto4445.z24.queue.storage.azure.net/"), - // Table: to.Ptr("https://sto4445.z24.table.storage.azure.net/"), - // Web: to.Ptr("https://sto4445.z24.web.storage.azure.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateDnsEndpointTypeToStandard.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateDnsEndpointTypeToStandard() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - DefaultToOAuthAuthentication: to.Ptr(false), - DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeStandard), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - IsSftpEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeStandard), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSftpEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateEnablePublicNetworkAccess.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateEnablePublicNetworkAccess() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsHnsEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessEnabled), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessEnabled), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreatePremiumBlockBlobStorage.json -func ExampleAccountsClient_BeginCreate_storageAccountCreatePremiumBlockBlobStorage() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Kind: to.Ptr(armstorage.KindBlockBlobStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - AllowSharedKeyAccess: to.Ptr(true), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - RequireInfrastructureEncryption: to.Ptr(false), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNamePremiumLRS), - }, - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierPremium), - // AllowBlobPublicAccess: to.Ptr(false), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // RequireInfrastructureEncryption: to.Ptr(false), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNamePremiumLRS), - // Tier: to.Ptr(armstorage.SKUTierPremium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateUserAssignedEncryptionIdentityWithCmk() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - Identity: &armstorage.Identity{ - Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, - }, - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - Encryption: &armstorage.Encryption{ - EncryptionIdentity: &armstorage.EncryptionIdentity{ - EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - }, - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ - // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), - // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), - // }, - // }, - // }, - // Kind: to.Ptr(armstorage.KindStorageV2), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierHot), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.0839093Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // EncryptionIdentity: &armstorage.EncryptionIdentity{ - // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - // }, - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // }, - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res131918", "sto131918", armstorage.AccountCreateParameters{ - Identity: &armstorage.Identity{ - Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, - }, - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - Encryption: &armstorage.Encryption{ - EncryptionIdentity: &armstorage.EncryptionIdentity{ - EncryptionFederatedIdentityClientID: to.Ptr("f83c6b1b-4d34-47e4-bb34-9d83df58b540"), - EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - }, - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ - // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), - // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), - // }, - // }, - // }, - // Kind: to.Ptr(armstorage.KindStorageV2), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierHot), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.0839093Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // EncryptionIdentity: &armstorage.EncryptionIdentity{ - // EncryptionFederatedIdentityClientID: to.Ptr("f83c6b1b-4d34-47e4-bb34-9d83df58b540"), - // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - // }, - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // }, - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateWithImmutabilityPolicy.json -func ExampleAccountsClient_BeginCreate_storageAccountCreateWithImmutabilityPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ - ExtendedLocation: &armstorage.ExtendedLocation{ - Name: to.Ptr("losangeles001"), - Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - }, - Kind: to.Ptr(armstorage.KindStorage), - Location: to.Ptr("eastus"), - Properties: &armstorage.AccountPropertiesCreateParameters{ - ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ - Enabled: to.Ptr(true), - ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ - AllowProtectedAppendWrites: to.Ptr(true), - ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), - State: to.Ptr(armstorage.AccountImmutabilityPolicyStateUnlocked), - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardGRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // ExtendedLocation: &armstorage.ExtendedLocation{ - // Name: to.Ptr("losangeles001"), - // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.4863236Z"); return t}()), - // ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ - // Enabled: to.Ptr(true), - // ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ - // AllowProtectedAppendWrites: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), - // State: to.Ptr(armstorage.AccountImmutabilityPolicyStateUnlocked), - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2euap"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); return t}()), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // IsSKUConversionBlocked: to.Ptr(false), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetPropertiesCMKEnabled.json -func ExampleAccountsClient_GetProperties_storageAccountGetPropertiesCmkEnabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); return t}()), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetPropertiesCMKVersionExpirationTime.json -func ExampleAccountsClient_GetProperties_storageAccountGetPropertiesCmkVersionExpirationTime() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyExpirationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); return t}()), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(false), - // CanPlannedFailover: to.Ptr(false), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); 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.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // CanPlannedFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); 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.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountEnableAD.json -func ExampleAccountsClient_Update_storageAccountEnableAd() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - AzureFilesIdentityBasedAuthentication: &armstorage.AzureFilesIdentityBasedAuthentication{ - ActiveDirectoryProperties: &armstorage.ActiveDirectoryProperties{ - AccountType: to.Ptr(armstorage.ActiveDirectoryPropertiesAccountTypeUser), - AzureStorageSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252-0012"), - DomainGUID: to.Ptr("aebfc118-9fa9-4732-a21f-d98e41a77ae1"), - DomainName: to.Ptr("adtest.com"), - DomainSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252"), - ForestName: to.Ptr("adtest.com"), - NetBiosDomainName: to.Ptr("adtest.com"), - SamAccountName: to.Ptr("sam12498"), - }, - DirectoryServiceOptions: to.Ptr(armstorage.DirectoryServiceOptionsAD), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AzureFilesIdentityBasedAuthentication: &armstorage.AzureFilesIdentityBasedAuthentication{ - // ActiveDirectoryProperties: &armstorage.ActiveDirectoryProperties{ - // AccountType: to.Ptr(armstorage.ActiveDirectoryPropertiesAccountTypeUser), - // AzureStorageSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252-0012"), - // DomainGUID: to.Ptr("aebfc118-9fa9-4732-a21f-d98e41a77ae1"), - // DomainName: to.Ptr("adtest.com"), - // DomainSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252"), - // ForestName: to.Ptr("adtest.com"), - // NetBiosDomainName: to.Ptr("adtest.com"), - // SamAccountName: to.Ptr("sam12498"), - // }, - // DirectoryServiceOptions: to.Ptr(armstorage.DirectoryServiceOptionsAD), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountEnableCMK.json -func ExampleAccountsClient_Update_storageAccountEnableCmk() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountUpdate.json -func ExampleAccountsClient_Update_storageAccountUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - DefaultToOAuthAuthentication: to.Ptr(false), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - IsLocalUserEnabled: to.Ptr(true), - IsSftpEnabled: to.Ptr(true), - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - NetworkRuleSet: &armstorage.NetworkRuleSet{ - DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - ResourceAccessRules: []*armstorage.ResourceAccessRule{ - { - ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - }}, - }, - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // IsLocalUserEnabled: to.Ptr(true), - // IsSftpEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountUpdateAllowedCopyScopeToAAD.json -func ExampleAccountsClient_Update_storageAccountUpdateAllowedCopyScopeToAad() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - NetworkRuleSet: &armstorage.NetworkRuleSet{ - DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - ResourceAccessRules: []*armstorage.ResourceAccessRule{ - { - ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - }}, - }, - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountUpdateDisablePublicNetworkAccess.json -func ExampleAccountsClient_Update_storageAccountUpdateDisablePublicNetworkAccess() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ - Properties: &armstorage.AccountPropertiesUpdateParameters{ - AllowBlobPublicAccess: to.Ptr(false), - AllowSharedKeyAccess: to.Ptr(true), - Encryption: &armstorage.Encryption{ - KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - KeyPolicy: &armstorage.KeyPolicy{ - KeyExpirationPeriodInDays: to.Ptr[int32](20), - }, - MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - NetworkRuleSet: &armstorage.NetworkRuleSet{ - DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - ResourceAccessRules: []*armstorage.ResourceAccessRule{ - { - ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - }}, - }, - PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), - RoutingPreference: &armstorage.RoutingPreference{ - PublishInternetEndpoints: to.Ptr(true), - PublishMicrosoftEndpoints: to.Ptr(true), - RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - }, - SasPolicy: &armstorage.SasPolicy{ - ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - SasExpirationPeriod: to.Ptr("1.15:59:59"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // AllowBlobPublicAccess: to.Ptr(false), - // AllowSharedKeyAccess: to.Ptr(true), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // KeyCreationTime: &armstorage.KeyCreationTime{ - // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.4322836Z"); return t}()), - // }, - // KeyPolicy: &armstorage.KeyPolicy{ - // KeyExpirationPeriodInDays: to.Ptr[int32](20), - // }, - // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SasPolicy: &armstorage.SasPolicy{ - // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), - // SasExpirationPeriod: to.Ptr("1.15:59:59"), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json -func ExampleAccountsClient_Update_storageAccountUpdateUserAssignedEncryptionIdentityWithCmk() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res9101", "sto4445", armstorage.AccountUpdateParameters{ - Identity: &armstorage.Identity{ - Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, - }, - }, - Kind: to.Ptr(armstorage.KindStorage), - Properties: &armstorage.AccountPropertiesUpdateParameters{ - Encryption: &armstorage.Encryption{ - EncryptionIdentity: &armstorage.EncryptionIdentity{ - EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - }, - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ - // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), - // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), - // }, - // }, - // }, - // Kind: to.Ptr(armstorage.KindStorageV2), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierHot), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.0839093Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // EncryptionIdentity: &armstorage.EncryptionIdentity{ - // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - // }, - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // }, - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json -func ExampleAccountsClient_Update_storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Update(ctx, "res131918", "sto131918", armstorage.AccountUpdateParameters{ - Identity: &armstorage.Identity{ - Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, - }, - }, - Kind: to.Ptr(armstorage.KindStorage), - Properties: &armstorage.AccountPropertiesUpdateParameters{ - Encryption: &armstorage.Encryption{ - EncryptionIdentity: &armstorage.EncryptionIdentity{ - EncryptionFederatedIdentityClientID: to.Ptr("3109d1c4-a5de-4d84-8832-feabb916a4b6"), - EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - }, - KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - KeyVaultProperties: &armstorage.KeyVaultProperties{ - KeyName: to.Ptr("wrappingKey"), - KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - KeyVersion: to.Ptr(""), - }, - Services: &armstorage.EncryptionServices{ - Blob: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - File: &armstorage.EncryptionService{ - Enabled: to.Ptr(true), - KeyType: to.Ptr(armstorage.KeyTypeAccount), - }, - }, - }, - }, - SKU: &armstorage.SKU{ - Name: to.Ptr(armstorage.SKUNameStandardLRS), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armstorage.Account{ - // Name: to.Ptr("sto4445"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ - // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ - // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), - // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), - // }, - // }, - // }, - // Kind: to.Ptr(armstorage.KindStorageV2), - // Properties: &armstorage.AccountProperties{ - // AccessTier: to.Ptr(armstorage.AccessTierHot), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.0839093Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // EncryptionIdentity: &armstorage.EncryptionIdentity{ - // EncryptionFederatedIdentityClientID: to.Ptr("3109d1c4-a5de-4d84-8832-feabb916a4b6"), - // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), - // }, - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.1739587Z"); return t}()), - // }, - // }, - // }, - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4445.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4445.table.core.windows.net/"), - // Web: to.Ptr("https://sto4445.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ - // }, - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(true), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardLRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountList.json -func ExampleAccountsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAccountsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AccountListResult = armstorage.AccountListResult{ - // Value: []*armstorage.Account{ - // { - // Name: to.Ptr("sto1125"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res2627/providers/Microsoft.Storage/storageAccounts/sto1125"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:28:53.4540398Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // IsHnsEnabled: to.Ptr(true), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto1125.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto1125.dfs.core.windows.net/"), - // File: to.Ptr("https://sto1125.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto1125-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto1125-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto1125-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto1125-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto1125-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto1125-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto1125-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto1125-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto1125-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto1125-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto1125.queue.core.windows.net/"), - // Table: to.Ptr("https://sto1125.table.core.windows.net/"), - // Web: to.Ptr("https://sto1125.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto3699"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto3699"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("356d057d-cba5-44dd-8a30-b2e547bc416b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:06:30.6093014Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto3699.blob.core.windows.net/"), - // File: to.Ptr("https://sto3699.file.core.windows.net/"), - // Queue: to.Ptr("https://sto3699.queue.core.windows.net/"), - // Table: to.Ptr("https://sto3699.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto8596"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), - // Location: to.Ptr("eastus2(stage)"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.7633306Z"); return t}()), - // Encryption: &armstorage.Encryption{ - // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), - // KeyVaultProperties: &armstorage.KeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), - // KeyName: to.Ptr("wrappingKey"), - // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), - // KeyVersion: to.Ptr(""), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // Services: &armstorage.EncryptionServices{ - // Blob: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // File: &armstorage.EncryptionService{ - // Enabled: to.Ptr(true), - // KeyType: to.Ptr(armstorage.KeyTypeAccount), - // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.7036140Z"); return t}()), - // }, - // }, - // }, - // GeoReplicationStats: &armstorage.GeoReplicationStats{ - // CanFailover: to.Ptr(true), - // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34Z"); return t}()), - // Status: to.Ptr(armstorage.GeoReplicationStatusLive), - // }, - // IsHnsEnabled: to.Ptr(true), - // NetworkRuleSet: &armstorage.NetworkRuleSet{ - // Bypass: to.Ptr(armstorage.BypassAzureServices), - // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), - // IPRules: []*armstorage.IPRule{ - // }, - // ResourceAccessRules: []*armstorage.ResourceAccessRule{ - // { - // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }}, - // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ - // }, - // }, - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596.file.core.windows.net/"), - // InternetEndpoints: &armstorage.AccountInternetEndpoints{ - // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), - // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), - // }, - // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ - // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), - // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), - // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), - // }, - // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), - // Table: to.Ptr("https://sto8596.table.core.windows.net/"), - // Web: to.Ptr("https://sto8596.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus2(stage)"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // RoutingPreference: &armstorage.RoutingPreference{ - // PublishInternetEndpoints: to.Ptr(true), - // PublishMicrosoftEndpoints: to.Ptr(true), - // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), - // }, - // SecondaryLocation: to.Ptr("northcentralus(stage)"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto6637"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto6637"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:09:39.5625175Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto6637.blob.core.windows.net/"), - // File: to.Ptr("https://sto6637.file.core.windows.net/"), - // Queue: to.Ptr("https://sto6637.queue.core.windows.net/"), - // Table: to.Ptr("https://sto6637.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto834"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res8186/providers/Microsoft.Storage/storageAccounts/sto834"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:28:20.8686541Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto834.blob.core.windows.net/"), - // File: to.Ptr("https://sto834.file.core.windows.net/"), - // Queue: to.Ptr("https://sto834.queue.core.windows.net/"), - // Table: to.Ptr("https://sto834.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto9174"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto9174"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Identity: &armstorage.Identity{ - // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("933e3ddf-1802-4a51-9469-18a33b576f88"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T09:46:19.6556989Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto9174.blob.core.windows.net/"), - // File: to.Ptr("https://sto9174.file.core.windows.net/"), - // Queue: to.Ptr("https://sto9174.queue.core.windows.net/"), - // Table: to.Ptr("https://sto9174.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountListByResourceGroup.json -func ExampleAccountsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAccountsClient().NewListByResourceGroupPager("res6117", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AccountListResult = armstorage.AccountListResult{ - // Value: []*armstorage.Account{ - // { - // Name: to.Ptr("sto4036"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4036"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:24:47.818801Z"); return t}()), - // IsHnsEnabled: to.Ptr(true), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4036.blob.core.windows.net/"), - // Dfs: to.Ptr("https://sto4036.dfs.core.windows.net/"), - // File: to.Ptr("https://sto4036.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4036.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4036.table.core.windows.net/"), - // Web: to.Ptr("https://sto4036.web.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sto4452"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4452"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // "key2": to.Ptr("value2"), - // }, - // Kind: to.Ptr(armstorage.KindStorage), - // Properties: &armstorage.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:24:15.7068366Z"); return t}()), - // PrimaryEndpoints: &armstorage.Endpoints{ - // Blob: to.Ptr("https://sto4452.blob.core.windows.net/"), - // File: to.Ptr("https://sto4452.file.core.windows.net/"), - // Queue: to.Ptr("https://sto4452.queue.core.windows.net/"), - // Table: to.Ptr("https://sto4452.table.core.windows.net/"), - // }, - // PrimaryLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), - // SecondaryLocation: to.Ptr("centraluseuap"), - // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), - // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), - // EnableHTTPSTrafficOnly: to.Ptr(false), - // }, - // SKU: &armstorage.SKU{ - // Name: to.Ptr(armstorage.SKUNameStandardGRS), - // Tier: to.Ptr(armstorage.SKUTierStandard), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountListAccountSAS.json -func ExampleAccountsClient_ListAccountSAS() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().ListAccountSAS(ctx, "res7985", "sto8588", armstorage.AccountSasParameters{ - KeyToSign: to.Ptr("key1"), - SharedAccessExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T11:42:03.1567373Z"); return t }()), - Permissions: to.Ptr(armstorage.PermissionsR), - Protocols: to.Ptr(armstorage.HTTPProtocolHTTPSHTTP), - ResourceTypes: to.Ptr(armstorage.SignedResourceTypesS), - Services: to.Ptr(armstorage.ServicesB), - SharedAccessStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:42:03.1567373Z"); return t }()), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListAccountSasResponse = armstorage.ListAccountSasResponse{ - // AccountSasToken: to.Ptr("sv=2015-04-05&ss=b&srt=s&sp=r&st=2017-05-24T10%3A42%3A03Z&se=2017-05-24T11%3A42%3A03Z&spr=https,http&sig=Z0I%2BEpM%2BPPlTC8ApfUf%2BcffO2aahMgZim3U0iArqsS0%3D"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountListServiceSAS.json -func ExampleAccountsClient_ListServiceSAS() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().ListServiceSAS(ctx, "res7439", "sto1299", armstorage.ServiceSasParameters{ - CanonicalizedResource: to.Ptr("/blob/sto1299/music"), - SharedAccessExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T11:32:48.8457197Z"); return t }()), - Permissions: to.Ptr(armstorage.PermissionsL), - Resource: to.Ptr(armstorage.SignedResourceC), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListServiceSasResponse = armstorage.ListServiceSasResponse{ - // ServiceSasToken: to.Ptr("sv=2015-04-05&sr=c&se=2017-05-24T11%3A32%3A48Z&sp=l&sig=PoF8yBUGixsjzwroLmw7vG3VbGz4KB2woZC2D4C2oio%3D"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/BlobRangesRestore.json -func ExampleAccountsClient_BeginRestoreBlobRanges() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginRestoreBlobRanges(ctx, "res9101", "sto4445", armstorage.BlobRestoreParameters{ - BlobRanges: []*armstorage.BlobRestoreRange{ - { - EndRange: to.Ptr("container/blobpath2"), - StartRange: to.Ptr("container/blobpath1"), - }, - { - EndRange: to.Ptr(""), - StartRange: to.Ptr("container2/blobpath3"), - }}, - TimeToRestore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-20T15:30:00.0000000Z"); return t }()), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobRestoreStatus = armstorage.BlobRestoreStatus{ - // Parameters: &armstorage.BlobRestoreParameters{ - // BlobRanges: []*armstorage.BlobRestoreRange{ - // { - // EndRange: to.Ptr("container/blobpath2"), - // StartRange: to.Ptr("container/blobpath1"), - // }, - // { - // EndRange: to.Ptr(""), - // StartRange: to.Ptr("container2/blobpath3"), - // }}, - // TimeToRestore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-20T15:30:00.0000000Z"); return t}()), - // }, - // RestoreID: to.Ptr("{restore_id}"), - // Status: to.Ptr(armstorage.BlobRestoreProgressStatus("Succeeded")), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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 52d0b76e1a07..f2e0ffe408b2 100644 --- a/sdk/resourcemanager/storage/armstorage/autorest.md +++ b/sdk/resourcemanager/storage/armstorage/autorest.md @@ -5,13 +5,12 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/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.5.0-beta.1 +module-version: 1.4.1 modelerfour: seal-single-value-enum-by-default: true -tag: package-2023-01 azcore-version: 1.9.0-beta.1 generate-fakes: true inject-spans: true 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 5f5d9fecf267..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/BlobContainersList.json -func ExampleBlobContainersClient_NewListPager_listContainers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBlobContainersClient().NewListPager("res9290", "sto1590", &armstorage.BlobContainersClientListOptions{Maxpagesize: nil, - Filter: nil, - Include: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListContainerItems = armstorage.ListContainerItems{ - // Value: []*armstorage.ListContainerItem{ - // { - // Name: to.Ptr("container1644"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644"), - // Etag: to.Ptr("\"0x8D589847D51C7DE\""), - // Properties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(false), - // HasLegalHold: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // PublicAccess: to.Ptr(armstorage.PublicAccessContainer), - // }, - // }, - // { - // Name: to.Ptr("container4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(false), - // HasLegalHold: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/DeletedBlobContainersList.json -func ExampleBlobContainersClient_NewListPager_listDeletedContainers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBlobContainersClient().NewListPager("res9290", "sto1590", &armstorage.BlobContainersClientListOptions{Maxpagesize: nil, - Filter: nil, - Include: to.Ptr(armstorage.ListContainersIncludeDeleted), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListContainerItems = armstorage.ListContainerItems{ - // Value: []*armstorage.ListContainerItem{ - // { - // Name: to.Ptr("container1644"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644"), - // Etag: to.Ptr("\"0x8D589847D51C7DE\""), - // Properties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(false), - // HasLegalHold: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // PublicAccess: to.Ptr(armstorage.PublicAccessContainer), - // }, - // }, - // { - // Name: to.Ptr("container4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.ContainerProperties{ - // Deleted: to.Ptr(true), - // DeletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-14T08:20:47Z"); return t}()), - // HasImmutabilityPolicy: to.Ptr(false), - // HasLegalHold: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateExpired), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // RemainingRetentionDays: to.Ptr[int32](30), - // Version: to.Ptr("1234567890"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json -func ExampleBlobContainersClient_Get_getBlobContainersGetWithAllowProtectedAppendWritesAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Get(ctx, "res9871", "sto6217", "container1634", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobContainer = armstorage.BlobContainer{ - // Name: to.Ptr("container1634"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634"), - // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), - // ContainerProperties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(true), - // HasLegalHold: to.Ptr(true), - // ImmutabilityPolicy: &armstorage.ImmutabilityPolicyProperties{ - // Etag: to.Ptr("\"8d592d74cb3011a\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // AllowProtectedAppendWritesAll: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), - // }, - // UpdateHistory: []*armstorage.UpdateHistoryProperty{ - // { - // AllowProtectedAppendWritesAll: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:11.431403Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypePut), - // }, - // { - // AllowProtectedAppendWritesAll: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:13.0907641Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeLock), - // }, - // { - // AllowProtectedAppendWritesAll: to.Ptr(true), - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.7097716Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeExtend), - // }}, - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // LegalHold: &armstorage.LegalHoldProperties{ - // HasLegalHold: to.Ptr(true), - // ProtectedAppendWritesHistory: &armstorage.ProtectedAppendWritesHistory{ - // AllowProtectedAppendWritesAll: to.Ptr(true), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-01T01:58:44.5044483Z"); return t}()), - // }, - // Tags: []*armstorage.TagProperty{ - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag1"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }, - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag2"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }, - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag3"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }}, - // }, - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/BlobContainersGet.json -func ExampleBlobContainersClient_Get_getContainers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobContainersClient().Get(ctx, "res9871", "sto6217", "container1634", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobContainer = armstorage.BlobContainer{ - // Name: to.Ptr("container1634"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634"), - // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), - // ContainerProperties: &armstorage.ContainerProperties{ - // HasImmutabilityPolicy: to.Ptr(true), - // HasLegalHold: to.Ptr(true), - // ImmutabilityPolicy: &armstorage.ImmutabilityPolicyProperties{ - // Etag: to.Ptr("\"8d592d74cb3011a\""), - // Properties: &armstorage.ImmutabilityPolicyProperty{ - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), - // }, - // UpdateHistory: []*armstorage.UpdateHistoryProperty{ - // { - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:11.431403Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypePut), - // }, - // { - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:13.0907641Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeLock), - // }, - // { - // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.7097716Z"); return t}()), - // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeExtend), - // }}, - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14Z"); return t}()), - // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), - // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), - // LegalHold: &armstorage.LegalHoldProperties{ - // HasLegalHold: to.Ptr(true), - // Tags: []*armstorage.TagProperty{ - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag1"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }, - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag2"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }, - // { - // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), - // Tag: to.Ptr("tag3"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.6964643Z"); return t}()), - // }}, - // }, - // PublicAccess: to.Ptr(armstorage.PublicAccessNone), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/blobinventorypolicies_client_example_test.go deleted file mode 100644 index 4232d0eea68e..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetBlobInventoryPolicy.json -func ExampleBlobInventoryPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBlobInventoryPoliciesClient().Get(ctx, "res7687", "sto9699", armstorage.BlobInventoryPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BlobInventoryPolicy = armstorage.BlobInventoryPolicy{ - // Name: to.Ptr("DefaultInventoryPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), - // Properties: &armstorage.BlobInventoryPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-05T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.BlobInventoryPolicySchema{ - // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - // Enabled: to.Ptr(true), - // Rules: []*armstorage.BlobInventoryPolicyRule{ - // { - // Name: to.Ptr("inventoryPolicyRule1"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatCSV), - // Filters: &armstorage.BlobInventoryPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob"), - // to.Ptr("pageBlob")}, - // IncludeBlobVersions: to.Ptr(true), - // IncludeSnapshots: to.Ptr(true), - // PrefixMatch: []*string{ - // to.Ptr("inventoryprefix1"), - // to.Ptr("inventoryprefix2")}, - // }, - // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - // Schedule: to.Ptr(armstorage.ScheduleDaily), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Creation-Time"), - // to.Ptr("Last-Modified"), - // to.Ptr("Content-Length"), - // to.Ptr("Content-MD5"), - // to.Ptr("BlobType"), - // to.Ptr("AccessTier"), - // to.Ptr("AccessTierChangeTime"), - // to.Ptr("Snapshot"), - // to.Ptr("VersionId"), - // to.Ptr("IsCurrentVersion"), - // to.Ptr("Metadata")}, - // }, - // Destination: to.Ptr("container1"), - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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.0932539Z"); return t}()), - // Policy: &armstorage.BlobInventoryPolicySchema{ - // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - // Enabled: to.Ptr(true), - // Rules: []*armstorage.BlobInventoryPolicyRule{ - // { - // Name: to.Ptr("inventoryPolicyRule1"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatCSV), - // Filters: &armstorage.BlobInventoryPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob"), - // to.Ptr("pageBlob")}, - // 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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountListBlobInventoryPolicy.json -func ExampleBlobInventoryPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBlobInventoryPoliciesClient().NewListPager("res7687", "sto9699", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListBlobInventoryPolicy = armstorage.ListBlobInventoryPolicy{ - // Value: []*armstorage.BlobInventoryPolicy{ - // { - // Name: to.Ptr("DefaultInventoryPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), - // Properties: &armstorage.BlobInventoryPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-05T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.BlobInventoryPolicySchema{ - // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), - // Enabled: to.Ptr(true), - // Rules: []*armstorage.BlobInventoryPolicyRule{ - // { - // Name: to.Ptr("inventoryPolicyRule1"), - // Definition: &armstorage.BlobInventoryPolicyDefinition{ - // Format: to.Ptr(armstorage.FormatCSV), - // Filters: &armstorage.BlobInventoryPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob"), - // to.Ptr("pageBlob")}, - // IncludeBlobVersions: to.Ptr(true), - // IncludeSnapshots: to.Ptr(true), - // PrefixMatch: []*string{ - // to.Ptr("inventoryprefix1"), - // to.Ptr("inventoryprefix2")}, - // }, - // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), - // Schedule: to.Ptr(armstorage.ScheduleDaily), - // SchemaFields: []*string{ - // to.Ptr("Name"), - // to.Ptr("Creation-Time"), - // to.Ptr("Last-Modified"), - // to.Ptr("Content-Length"), - // to.Ptr("Content-MD5"), - // to.Ptr("BlobType"), - // to.Ptr("AccessTier"), - // to.Ptr("AccessTierChangeTime"), - // to.Ptr("Snapshot"), - // to.Ptr("VersionId"), - // to.Ptr("IsCurrentVersion"), - // to.Ptr("Metadata")}, - // }, - // Destination: to.Ptr("container1"), - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/blobservices_client_example_test.go b/sdk/resourcemanager/storage/armstorage/blobservices_client_example_test.go deleted file mode 100644 index 4c64a98f7468..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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 dad68acf2935..d763928bad2e 100644 --- a/sdk/resourcemanager/storage/armstorage/constants.go +++ b/sdk/resourcemanager/storage/armstorage/constants.go @@ -10,7 +10,7 @@ package armstorage const ( moduleName = "armstorage" - moduleVersion = "v1.5.0-beta.1" + moduleVersion = "v1.4.1" ) // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' 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 bc4c87b2123a..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/encryptionscopes_client_example_test.go deleted file mode 100644 index 9582153757e3..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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.7633306Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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.7633306Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // RequireInfrastructureEncryption: to.Ptr(true), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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.7633306Z"); return t}()), - // KeyVaultProperties: &armstorage.EncryptionScopeKeyVaultProperties{ - // CurrentVersionedKeyIdentifier: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), - // KeyURI: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), - // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.7023290Z"); return t}()), - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-17T06:23:14.4513306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftKeyVault), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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.7633306Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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.7633306Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.7633306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // }, - // { - // Name: to.Ptr("scope-2"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/encryptionScopes/scope-2"), - // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T04:32:14.3355306Z"); return t}()), - // KeyVaultProperties: &armstorage.EncryptionScopeKeyVaultProperties{ - // KeyURI: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-17T06:23:14.4513306Z"); return t}()), - // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftKeyVault), - // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/fileservices_client_example_test.go b/sdk/resourcemanager/storage/armstorage/fileservices_client_example_test.go deleted file mode 100644 index ddcbf8e740b0..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/fileshares_client_example_test.go deleted file mode 100644 index 806adfbb667b..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/DeletedFileSharesList.json -func ExampleFileSharesClient_NewListPager_listDeletedShares() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFileSharesClient().NewListPager("res9290", "sto1590", &armstorage.FileSharesClientListOptions{Maxpagesize: nil, - Filter: nil, - Expand: to.Ptr("deleted"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FileShareItems = armstorage.FileShareItems{ - // Value: []*armstorage.FileShareItem{ - // { - // Name: to.Ptr("share1644"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644_1234567890"), - // Etag: to.Ptr("\"0x8D589847D51C7DE\""), - // Properties: &armstorage.FileShareProperties{ - // Deleted: to.Ptr(true), - // DeletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-14T08:20:47Z"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-14T08:20:47Z"); return t}()), - // RemainingRetentionDays: to.Ptr[int32](30), - // ShareQuota: to.Ptr[int32](1024), - // Version: to.Ptr("1234567890"), - // }, - // }, - // { - // Name: to.Ptr("share4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-14T08:20:47Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/FileShareSnapshotsList.json -func ExampleFileSharesClient_NewListPager_listShareSnapshots() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFileSharesClient().NewListPager("res9290", "sto1590", &armstorage.FileSharesClientListOptions{Maxpagesize: nil, - Filter: nil, - Expand: to.Ptr("snapshots"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FileShareItems = armstorage.FileShareItems{ - // Value: []*armstorage.FileShareItem{ - // { - // Name: to.Ptr("share4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-26T05:47:05.0000000Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }, - // { - // Name: to.Ptr("share4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-26T05:47:05.0000000Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // SnapshotTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-26T05:48:07.0000000Z"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/FileSharesList.json -func ExampleFileSharesClient_NewListPager_listShares() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFileSharesClient().NewListPager("res9290", "sto1590", &armstorage.FileSharesClientListOptions{Maxpagesize: nil, - Filter: nil, - Expand: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FileShareItems = armstorage.FileShareItems{ - // Value: []*armstorage.FileShareItem{ - // { - // Name: to.Ptr("share1644"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644"), - // Etag: to.Ptr("\"0x8D589847D51C7DE\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-14T08:20:47Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }, - // { - // Name: to.Ptr("share4052"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052"), - // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), - // Properties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-14T08:20:47Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/FileShareAclsPatch.json -func ExampleFileSharesClient_Update_updateShareAcls() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Update(ctx, "res3376", "sto328", "share6185", armstorage.FileShare{ - FileShareProperties: &armstorage.FileShareProperties{ - SignedIdentifiers: []*armstorage.SignedIdentifier{ - { - AccessPolicy: &armstorage.AccessPolicy{ - ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T08:49:37.0000000Z"); return t }()), - Permission: to.Ptr("rwd"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T08:49:37.0000000Z"); return t }()), - }, - ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185"), - // FileShareProperties: &armstorage.FileShareProperties{ - // SignedIdentifiers: []*armstorage.SignedIdentifier{ - // { - // AccessPolicy: &armstorage.AccessPolicy{ - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T08:49:37.0000000Z"); return t}()), - // Permission: to.Ptr("rwd"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T08:49:37.0000000Z"); return t}()), - // }, - // ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/FileSharesGet_Stats.json -func ExampleFileSharesClient_Get_getShareStats() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Get(ctx, "res9871", "sto6217", "share1634", &armstorage.FileSharesClientGetOptions{Expand: to.Ptr("stats"), - XMSSnapshot: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share1634"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634"), - // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), - // FileShareProperties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-26T05:06:14Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // ShareUsageBytes: to.Ptr[int64](652945), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/FileSharesGet.json -func ExampleFileSharesClient_Get_getShares() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFileSharesClient().Get(ctx, "res9871", "sto6217", "share1634", &armstorage.FileSharesClientGetOptions{Expand: nil, - XMSSnapshot: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FileShare = armstorage.FileShare{ - // Name: to.Ptr("share1634"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634"), - // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), - // FileShareProperties: &armstorage.FileShareProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-26T05:06:14Z"); return t}()), - // ShareQuota: to.Ptr[int32](1024), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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 84dd1af3b81b..2e68b687a038 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.9.0-beta.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 @@ -12,6 +11,7 @@ require ( ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnaeon/go-vcr v1.1.0 // indirect 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 4df2f5fe822e..000000000000 --- a/sdk/resourcemanager/storage/armstorage/localusers_client_example_test.go +++ /dev/null @@ -1,303 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstorage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/LocalUsersList.json -func ExampleLocalUsersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLocalUsersClient().NewListPager("res6977", "sto2527", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LocalUsers = armstorage.LocalUsers{ - // Value: []*armstorage.LocalUser{ - // { - // Name: to.Ptr("user1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), - // Properties: &armstorage.LocalUserProperties{ - // HasSharedKey: to.Ptr(true), - // HasSSHKey: to.Ptr(true), - // HasSSHPassword: to.Ptr(true), - // HomeDirectory: to.Ptr("homedirectory"), - // PermissionScopes: []*armstorage.PermissionScope{ - // { - // Permissions: to.Ptr("rwd"), - // ResourceName: to.Ptr("share1"), - // Service: to.Ptr("file"), - // }, - // { - // Permissions: to.Ptr("rw"), - // ResourceName: to.Ptr("share2"), - // Service: to.Ptr("file"), - // }}, - // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), - // }, - // }, - // { - // Name: to.Ptr("user2"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/loalUsers/user2"), - // Properties: &armstorage.LocalUserProperties{ - // HasSharedKey: to.Ptr(true), - // HasSSHKey: to.Ptr(false), - // HasSSHPassword: to.Ptr(true), - // PermissionScopes: []*armstorage.PermissionScope{ - // { - // Permissions: to.Ptr("rw"), - // ResourceName: to.Ptr("resourcename"), - // Service: to.Ptr("blob"), - // }}, - // Sid: to.Ptr("S-1-2-0-533672-235636-66334-1001"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/LocalUserGet.json -func ExampleLocalUsersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalUsersClient().Get(ctx, "res6977", "sto2527", "user1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalUser = armstorage.LocalUser{ - // Name: to.Ptr("user1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), - // Properties: &armstorage.LocalUserProperties{ - // HasSharedKey: to.Ptr(true), - // HasSSHKey: to.Ptr(true), - // HasSSHPassword: to.Ptr(true), - // HomeDirectory: to.Ptr("homedirectory"), - // PermissionScopes: []*armstorage.PermissionScope{ - // { - // Permissions: to.Ptr("rwd"), - // ResourceName: to.Ptr("share1"), - // Service: to.Ptr("file"), - // }, - // { - // Permissions: to.Ptr("rw"), - // ResourceName: to.Ptr("share2"), - // Service: to.Ptr("file"), - // }}, - // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/LocalUserCreate.json -func ExampleLocalUsersClient_CreateOrUpdate_createLocalUser() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalUsersClient().CreateOrUpdate(ctx, "res6977", "sto2527", "user1", armstorage.LocalUser{ - Properties: &armstorage.LocalUserProperties{ - HasSSHPassword: to.Ptr(true), - HomeDirectory: to.Ptr("homedirectory"), - PermissionScopes: []*armstorage.PermissionScope{ - { - Permissions: to.Ptr("rwd"), - ResourceName: to.Ptr("share1"), - Service: to.Ptr("file"), - }, - { - Permissions: to.Ptr("rw"), - ResourceName: to.Ptr("share2"), - Service: to.Ptr("file"), - }}, - SSHAuthorizedKeys: []*armstorage.SSHPublicKey{ - { - Description: to.Ptr("key name"), - Key: to.Ptr("ssh-rsa keykeykeykeykey="), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalUser = armstorage.LocalUser{ - // Name: to.Ptr("user1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), - // Properties: &armstorage.LocalUserProperties{ - // HomeDirectory: to.Ptr("homedirectory"), - // PermissionScopes: []*armstorage.PermissionScope{ - // { - // Permissions: to.Ptr("rwd"), - // ResourceName: to.Ptr("share1"), - // Service: to.Ptr("file"), - // }, - // { - // Permissions: to.Ptr("rw"), - // ResourceName: to.Ptr("share2"), - // Service: to.Ptr("file"), - // }}, - // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), - // SSHAuthorizedKeys: []*armstorage.SSHPublicKey{ - // { - // Description: to.Ptr("key name"), - // Key: to.Ptr("ssh-rsa keykeykeykeykey="), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/LocalUserUpdate.json -func ExampleLocalUsersClient_CreateOrUpdate_updateLocalUser() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalUsersClient().CreateOrUpdate(ctx, "res6977", "sto2527", "user1", armstorage.LocalUser{ - Properties: &armstorage.LocalUserProperties{ - HasSharedKey: to.Ptr(false), - HasSSHKey: to.Ptr(false), - HasSSHPassword: to.Ptr(false), - HomeDirectory: to.Ptr("homedirectory2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalUser = armstorage.LocalUser{ - // Name: to.Ptr("user1"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), - // Properties: &armstorage.LocalUserProperties{ - // HasSharedKey: to.Ptr(false), - // HasSSHKey: to.Ptr(false), - // HasSSHPassword: to.Ptr(false), - // HomeDirectory: to.Ptr("homedirectory2"), - // Sid: to.Ptr("S-1-2-0-3528686663-1788730862-2791910117-1000"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/managementpolicies_client_example_test.go deleted file mode 100644 index 9bc4d30d8852..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetManagementPolicy.json -func ExampleManagementPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().Get(ctx, "res6977", "sto2527", armstorage.ManagementPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T03:01:55.7168089Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountSetManagementPolicy.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicies() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }, - { - Name: to.Ptr("olcmtest2"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobIndexMatch: []*armstorage.TagFilter{ - { - Name: to.Ptr("tag1"), - Op: to.Ptr("=="), - Value: to.Ptr("val1"), - }, - { - Name: to.Ptr("tag2"), - Op: to.Ptr("=="), - Value: to.Ptr("val2"), - }}, - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer2")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }, - // { - // Name: to.Ptr("olcmtest2"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobIndexMatch: []*armstorage.TagFilter{ - // { - // Name: to.Ptr("tag1"), - // Op: to.Ptr("=="), - // Value: to.Ptr("val1"), - // }, - // { - // Name: to.Ptr("tag2"), - // Op: to.Ptr("=="), - // Value: to.Ptr("val2"), - // }}, - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer2")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountSetManagementPolicyColdTierActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyColdTierActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCold: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - TierToCold: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - TierToCold: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCold: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // TierToCold: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // TierToCold: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyForBlockAndAppendBlobs() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob"), - to.Ptr("appendBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob"), - // to.Ptr("appendBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountSetManagementPolicyHotTierActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyHotTierActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - TierToHot: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - TierToHot: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - TierToHot: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // TierToHot: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // TierToHot: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // TierToHot: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyWithSnapshotAndVersion() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest1"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterCreationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer1")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest1"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer1")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](1000), - }, - EnableAutoTierToHotFromCool: to.Ptr(true), - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - Delete: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](1000), - // }, - // EnableAutoTierToHotFromCool: to.Ptr(true), - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // Delete: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json -func ExampleManagementPoliciesClient_CreateOrUpdate_storageAccountSetManagementPolicyLastTierChangeTimeActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ - Properties: &armstorage.ManagementPolicyProperties{ - Policy: &armstorage.ManagementPolicySchema{ - Rules: []*armstorage.ManagementPolicyRule{ - { - Name: to.Ptr("olcmtest"), - Type: to.Ptr(armstorage.RuleTypeLifecycle), - Definition: &armstorage.ManagementPolicyDefinition{ - Actions: &armstorage.ManagementPolicyAction{ - BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - Delete: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - }, - TierToArchive: &armstorage.DateAfterModification{ - DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](120), - DaysAfterModificationGreaterThan: to.Ptr[float32](90), - }, - TierToCool: &armstorage.DateAfterModification{ - DaysAfterModificationGreaterThan: to.Ptr[float32](30), - }, - }, - Snapshot: &armstorage.ManagementPolicySnapShot{ - TierToArchive: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), - }, - }, - Version: &armstorage.ManagementPolicyVersion{ - TierToArchive: &armstorage.DateAfterCreation{ - DaysAfterCreationGreaterThan: to.Ptr[float32](30), - DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), - }, - }, - }, - Filters: &armstorage.ManagementPolicyFilter{ - BlobTypes: []*string{ - to.Ptr("blockBlob")}, - PrefixMatch: []*string{ - to.Ptr("olcmtestcontainer")}, - }, - }, - Enabled: to.Ptr(true), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementPolicy = armstorage.ManagementPolicy{ - // Name: to.Ptr("DefaultManagementPolicy"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), - // Properties: &armstorage.ManagementPolicyProperties{ - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.0932539Z"); return t}()), - // Policy: &armstorage.ManagementPolicySchema{ - // Rules: []*armstorage.ManagementPolicyRule{ - // { - // Name: to.Ptr("olcmtest"), - // Type: to.Ptr(armstorage.RuleTypeLifecycle), - // Definition: &armstorage.ManagementPolicyDefinition{ - // Actions: &armstorage.ManagementPolicyAction{ - // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ - // Delete: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), - // }, - // TierToArchive: &armstorage.DateAfterModification{ - // DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](120), - // DaysAfterModificationGreaterThan: to.Ptr[float32](90), - // }, - // TierToCool: &armstorage.DateAfterModification{ - // DaysAfterModificationGreaterThan: to.Ptr[float32](30), - // }, - // }, - // Snapshot: &armstorage.ManagementPolicySnapShot{ - // TierToArchive: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), - // }, - // }, - // Version: &armstorage.ManagementPolicyVersion{ - // TierToArchive: &armstorage.DateAfterCreation{ - // DaysAfterCreationGreaterThan: to.Ptr[float32](30), - // DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), - // }, - // }, - // }, - // Filters: &armstorage.ManagementPolicyFilter{ - // BlobTypes: []*string{ - // to.Ptr("blockBlob")}, - // PrefixMatch: []*string{ - // to.Ptr("olcmtestcontainer")}, - // }, - // }, - // Enabled: to.Ptr(true), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/objectreplicationpolicies_client_example_test.go b/sdk/resourcemanager/storage/armstorage/objectreplicationpolicies_client_example_test.go deleted file mode 100644 index bbb58e3d80eb..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountGetObjectReplicationPolicy.json -func ExampleObjectReplicationPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewObjectReplicationPoliciesClient().Get(ctx, "res6977", "sto2527", "{objectReplicationPolicy-Id}", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ - // Name: to.Ptr("{objectReplicationPolicy-Id}"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/{objectReplicationPolicy-Id}"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("destAccount1"), - // EnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-08T03:01:55.7168089Z"); return t}()), - // PolicyID: to.Ptr("{objectReplicationPolicy-Id}"), - // Rules: []*armstorage.ObjectReplicationPolicyRule{ - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // PrefixMatch: []*string{ - // to.Ptr("blobA"), - // to.Ptr("blobB")}, - // }, - // SourceContainer: to.Ptr("sourceContainer1"), - // }, - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // PrefixMatch: []*string{ - // to.Ptr("blobC"), - // to.Ptr("blobD")}, - // }, - // SourceContainer: to.Ptr("sourceContainer1"), - // }}, - // SourceAccount: to.Ptr("sto2527"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountCreateObjectReplicationPolicyOnSource.json -func ExampleObjectReplicationPoliciesClient_CreateOrUpdate_storageAccountCreateObjectReplicationPolicyOnSource() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "src1122", "2a20bb73-5717-4635-985a-5d4cf777438f", armstorage.ObjectReplicationPolicy{ - Properties: &armstorage.ObjectReplicationPolicyProperties{ - DestinationAccount: to.Ptr("dst112"), - Rules: []*armstorage.ObjectReplicationPolicyRule{ - { - DestinationContainer: to.Ptr("dcont139"), - Filters: &armstorage.ObjectReplicationPolicyFilter{ - MinCreationTime: to.Ptr("2020-02-19T16:05:00Z"), - PrefixMatch: []*string{ - to.Ptr("blobA"), - to.Ptr("blobB")}, - }, - RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - SourceContainer: to.Ptr("scont139"), - }}, - SourceAccount: to.Ptr("src1122"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ - // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("dst112"), - // EnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-08T03:01:55.7168089Z"); return t}()), - // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Rules: []*armstorage.ObjectReplicationPolicyRule{ - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // MinCreationTime: to.Ptr("2020-02-19T16:05:00Z"), - // PrefixMatch: []*string{ - // to.Ptr("blobA"), - // to.Ptr("blobB")}, - // }, - // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - // SourceContainer: to.Ptr("sourceContainer1"), - // }}, - // SourceAccount: to.Ptr("src1122"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json -func ExampleObjectReplicationPoliciesClient_CreateOrUpdate_storageAccountUpdateObjectReplicationPolicyOnSource() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "src1122", "2a20bb73-5717-4635-985a-5d4cf777438f", armstorage.ObjectReplicationPolicy{ - Properties: &armstorage.ObjectReplicationPolicyProperties{ - DestinationAccount: to.Ptr("dst112"), - Rules: []*armstorage.ObjectReplicationPolicyRule{ - { - DestinationContainer: to.Ptr("dcont139"), - Filters: &armstorage.ObjectReplicationPolicyFilter{ - PrefixMatch: []*string{ - to.Ptr("blobA"), - to.Ptr("blobB")}, - }, - RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - SourceContainer: to.Ptr("scont139"), - }, - { - DestinationContainer: to.Ptr("dcont179"), - RuleID: to.Ptr("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"), - SourceContainer: to.Ptr("scont179"), - }}, - SourceAccount: to.Ptr("src1122"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ - // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), - // Properties: &armstorage.ObjectReplicationPolicyProperties{ - // DestinationAccount: to.Ptr("dst112"), - // EnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-08T03:01:55.7168089Z"); return t}()), - // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), - // Rules: []*armstorage.ObjectReplicationPolicyRule{ - // { - // DestinationContainer: to.Ptr("destContainer1"), - // Filters: &armstorage.ObjectReplicationPolicyFilter{ - // PrefixMatch: []*string{ - // to.Ptr("blobA"), - // to.Ptr("blobB")}, - // }, - // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), - // SourceContainer: to.Ptr("sourceContainer1"), - // }, - // { - // DestinationContainer: to.Ptr("dcont179"), - // RuleID: to.Ptr("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"), - // SourceContainer: to.Ptr("scont179"), - // }}, - // SourceAccount: to.Ptr("src1122"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/operations_client_example_test.go deleted file mode 100644 index c37b6c31a036..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/OperationsList.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationListResult = armstorage.OperationListResult{ - // Value: []*armstorage.Operation{ - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates a storage account with the specified parameters or update the properties or tags or adds custom domain for the specified storage account."), - // Operation: to.Ptr("Create/Update Storage Account"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/delete"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Deletes an existing storage account."), - // Operation: to.Ptr("Delete Storage Account"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/listkeys/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Returns the access keys for the specified storage account."), - // Operation: to.Ptr("List Storage Account Keys"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/regeneratekey/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Regenerates the access keys for the specified storage account."), - // Operation: to.Ptr("Regenerate Storage Account Keys"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/checknameavailability/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Checks that account name is valid and is not in use."), - // Operation: to.Ptr("Check Name Availability"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Name Availability"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Returns the list of storage accounts or gets the properties for the specified storage account."), - // Operation: to.Ptr("List/Get Storage Account(s)"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/usages/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Returns the limit and the current usage count for resources in the specified subscription"), - // Operation: to.Ptr("Get Subscription Usages"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Usage Metrics"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/listAccountSas/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Returns the Account SAS token for the specified storage account."), - // Operation: to.Ptr("Returns Storage Account SAS Token"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Account SAS Token"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/listServiceSas/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Storage Service SAS Token"), - // Operation: to.Ptr("Returns Storage Service SAS Token"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Returns the Service SAS token for the specified storage account."), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/locations/deleteVirtualNetworkOrSubnets/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Notifies Microsoft.Storage that virtual network or subnet is being deleted"), - // Operation: to.Ptr("Delete virtual network or subnets notifications"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Location"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/operations/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Polls the status of an asynchronous operation."), - // Operation: to.Ptr("Poll Asynchronous Operation"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Operations"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/register/action"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Registers the subscription for the storage resource provider and enables the creation of storage accounts."), - // Operation: to.Ptr("Registers the Storage Resource Provider"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Resource Provider"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/skus/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Lists the Skus supported by Microsoft.Storage."), - // Operation: to.Ptr("List Skus"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Skus"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/services/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Create/Update storage account diagnostic settings."), - // Operation: to.Ptr("Create/Update Diagnostic Settings"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("UsedCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("Account used capacity"), - // DisplayName: to.Ptr("Used capacity"), - // FillGapWithZero: to.Ptr(false), - // ResourceIDDimensionNameOverride: to.Ptr("AccountResourceId"), - // Unit: to.Ptr("Bytes"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Storage Accounts"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Blob service"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("BlobCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // Dimensions: []*armstorage.Dimension{ - // { - // Name: to.Ptr("BlobType"), - // DisplayName: to.Ptr("Blob type"), - // }}, - // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s Blob service in bytes."), - // DisplayName: to.Ptr("Blob Capacity"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("BlobCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // Dimensions: []*armstorage.Dimension{ - // { - // Name: to.Ptr("BlobType"), - // DisplayName: to.Ptr("Blob type"), - // }}, - // DisplayDescription: to.Ptr("The number of Blob in the storage account’s Blob service."), - // DisplayName: to.Ptr("Blob Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("ContainerCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of containers in the storage account’s Blob service."), - // DisplayName: to.Ptr("Blob Container Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("BlobProvisionedSize"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // Dimensions: []*armstorage.Dimension{ - // { - // Name: to.Ptr("BlobType"), - // DisplayName: to.Ptr("Blob type"), - // }}, - // DisplayDescription: to.Ptr("The amount of storage provisioned in the storage account’s Blob service in bytes."), - // DisplayName: to.Ptr("Blob Provisioned Size"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Blob service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Blob service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Table service"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("TableCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s Table service in bytes."), - // DisplayName: to.Ptr("Table Capacity"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("TableCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of table in the storage account’s Table service."), - // DisplayName: to.Ptr("Table Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("TableEntityCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of table entities in the storage account’s Table service."), - // DisplayName: to.Ptr("Table Entity Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Table service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Table service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Queue service"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("QueueCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s Queue service in bytes."), - // DisplayName: to.Ptr("Queue Capacity"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("QueueCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of queue in the storage account’s Queue service."), - // DisplayName: to.Ptr("Queue Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("QueueMessageCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The approximate number of queue messages in the storage account’s Queue service."), - // DisplayName: to.Ptr("Queue Message Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Queue service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("Queue service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), - // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("File service"), - // }, - // Origin: to.Ptr("system"), - // OperationProperties: &armstorage.OperationProperties{ - // ServiceSpecification: &armstorage.ServiceSpecification{ - // MetricSpecifications: []*armstorage.MetricSpecification{ - // { - // Name: to.Ptr("FileCapacity"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s File service in bytes."), - // DisplayName: to.Ptr("File Capacity"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("FileProvisionedSize"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The amount of storage provisioned in the storage account’s File service in bytes."), - // DisplayName: to.Ptr("File Provisioned Size"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("FileCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of file in the storage account’s File service."), - // DisplayName: to.Ptr("File Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("FileShareCount"), - // AggregationType: to.Ptr("Average"), - // Category: to.Ptr("Capacity"), - // DisplayDescription: to.Ptr("The number of file shares in the storage account’s File service."), - // DisplayName: to.Ptr("File Share Count"), - // FillGapWithZero: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("File service"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armstorage.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Storage"), - // Resource: to.Ptr("File service"), - // }, - // Origin: to.Ptr("system"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/storage/armstorage/privateendpointconnections_client_example_test.go deleted file mode 100644 index 82896d65f2b4..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/privatelinkresources_client_example_test.go deleted file mode 100644 index be1088f21a7d..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/queue_client_example_test.go deleted file mode 100644 index 219ca9b67ccf..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/queueservices_client_example_test.go deleted file mode 100644 index 22d24d78c19e..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/skus_client_example_test.go b/sdk/resourcemanager/storage/armstorage/skus_client_example_test.go deleted file mode 100644 index 1e5d71ecba4d..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/table_client_example_test.go deleted file mode 100644 index 568dcb32cfad..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/TableOperationPutOrPatchAcls.json -func ExampleTableClient_Create_tableOperationPutOrPatchAcls() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTableClient().Create(ctx, "res3376", "sto328", "table6185", &armstorage.TableClientCreateOptions{Parameters: &armstorage.Table{ - TableProperties: &armstorage.TableProperties{ - SignedIdentifiers: []*armstorage.TableSignedIdentifier{ - { - AccessPolicy: &armstorage.TableAccessPolicy{ - ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.0000000Z"); return t }()), - Permission: to.Ptr("raud"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.0000000Z"); return t }()), - }, - ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), - }, - { - AccessPolicy: &armstorage.TableAccessPolicy{ - ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.0000000Z"); return t }()), - Permission: to.Ptr("rad"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.0000000Z"); return t }()), - }, - ID: to.Ptr("PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"), - }}, - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Table = armstorage.Table{ - // Name: to.Ptr("table6185"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), - // TableProperties: &armstorage.TableProperties{ - // SignedIdentifiers: []*armstorage.TableSignedIdentifier{ - // { - // AccessPolicy: &armstorage.TableAccessPolicy{ - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.0000000Z"); return t}()), - // Permission: to.Ptr("raud"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.0000000Z"); return t}()), - // }, - // ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), - // }, - // { - // AccessPolicy: &armstorage.TableAccessPolicy{ - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.0000000Z"); return t}()), - // Permission: to.Ptr("rad"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.0000000Z"); return t}()), - // }, - // ID: to.Ptr("PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"), - // }}, - // TableName: to.Ptr("table6185"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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_example_test.go b/sdk/resourcemanager/storage/armstorage/tableservices_client_example_test.go deleted file mode 100644 index 8ced4a1f565f..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/TableServicesGet.json -func ExampleTableServicesClient_GetServiceProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armstorage.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTableServicesClient().GetServiceProperties(ctx, "res4410", "sto8607", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TableServiceProperties = armstorage.TableServiceProperties{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices"), - // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default"), - // TableServiceProperties: &armstorage.TableServicePropertiesProperties{ - // Cors: &armstorage.CorsRules{ - // CorsRules: []*armstorage.CorsRule{ - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.contoso.com"), - // to.Ptr("http://www.fabrikam.com")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-*")}, - // MaxAgeInSeconds: to.Ptr[int32](100), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, - // AllowedOrigins: []*string{ - // to.Ptr("*")}, - // ExposedHeaders: []*string{ - // to.Ptr("*")}, - // MaxAgeInSeconds: to.Ptr[int32](2), - // }, - // { - // AllowedHeaders: []*string{ - // to.Ptr("x-ms-meta-12345675754564*")}, - // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), - // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, - // AllowedOrigins: []*string{ - // to.Ptr("http://www.abc23.com"), - // to.Ptr("https://www.fabrikam.com/*")}, - // ExposedHeaders: []*string{ - // to.Ptr("x-ms-meta-abc"), - // to.Ptr("x-ms-meta-data*"), - // to.Ptr("x-ms-meta-target*")}, - // MaxAgeInSeconds: to.Ptr[int32](2000), - // }}, - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/storage/armstorage/usages_client_example_test.go b/sdk/resourcemanager/storage/armstorage/usages_client_example_test.go deleted file mode 100644 index 81e3f582d01c..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/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-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), - // }}, - // } - } -}