From d9fd724a78ddb88164a0c46891b1fe5dc0ac7be3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 22 May 2024 15:06:07 +0000 Subject: [PATCH] CodeGen from PR 29206 in Azure/azure-rest-api-specs Merge ba3a67d909d4daaf99d5d6b92961528d8ba205d1 into a6ba164815464151a4adb687ea12a7a7090ed7fe --- .../netapp/armnetapp/CHANGELOG.md | 27 + .../netapp/armnetapp/accounts_client.go | 289 ++- .../armnetapp/accounts_client_example_test.go | 277 --- .../netapp/armnetapp/autorest.md | 7 +- .../netapp/armnetapp/backuppolicies_client.go | 26 +- .../backuppolicies_client_example_test.go | 217 --- .../netapp/armnetapp/backups_client.go | 34 +- .../armnetapp/backups_client_example_test.go | 257 --- .../armnetapp/backupsunderaccount_client.go | 6 +- ...backupsunderaccount_client_example_test.go | 42 - .../backupsunderbackupvault_client.go | 6 +- ...upsunderbackupvault_client_example_test.go | 45 - .../armnetapp/backupsundervolume_client.go | 6 +- .../backupsundervolume_client_example_test.go | 42 - .../netapp/armnetapp/backupvaults_client.go | 26 +- .../backupvaults_client_example_test.go | 187 -- .../netapp/armnetapp/constants.go | 242 ++- .../netapp/armnetapp/fake/accounts_server.go | 205 ++- .../netapp/armnetapp/fake/volumes_server.go | 388 +++- sdk/resourcemanager/netapp/armnetapp/go.mod | 12 +- sdk/resourcemanager/netapp/armnetapp/go.sum | 17 - .../netapp/armnetapp/models.go | 105 +- .../netapp/armnetapp/models_serde.go | 253 +++ .../netapp/armnetapp/operations_client.go | 4 +- .../operations_client_example_test.go | 1562 ----------------- .../netapp/armnetapp/options.go | 61 + .../netapp/armnetapp/pools_client.go | 26 +- .../armnetapp/pools_client_example_test.go | 201 --- .../netapp/armnetapp/resource_client.go | 26 +- .../armnetapp/resource_client_example_test.go | 229 --- .../armnetapp/resourcequotalimits_client.go | 8 +- ...resourcequotalimits_client_example_test.go | 147 -- .../armnetapp/resourceregioninfos_client.go | 8 +- ...resourceregioninfos_client_example_test.go | 108 -- .../netapp/armnetapp/responses.go | 42 + .../armnetapp/snapshotpolicies_client.go | 28 +- .../snapshotpolicies_client_example_test.go | 346 ---- .../netapp/armnetapp/snapshots_client.go | 32 +- .../snapshots_client_example_test.go | 193 -- .../netapp/armnetapp/subvolumes_client.go | 32 +- .../subvolumes_client_example_test.go | 220 --- .../netapp/armnetapp/volumegroups_client.go | 20 +- .../volumegroups_client_example_test.go | 1474 ---------------- .../armnetapp/volumequotarules_client.go | 26 +- .../volumequotarules_client_example_test.go | 195 -- .../netapp/armnetapp/volumes_client.go | 567 +++++- .../armnetapp/volumes_client_example_test.go | 640 ------- 47 files changed, 2200 insertions(+), 6711 deletions(-) delete mode 100644 sdk/resourcemanager/netapp/armnetapp/accounts_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/backuppolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/backups_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/backupvaults_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/operations_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/pools_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/resource_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/snapshots_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/subvolumes_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/volumegroups_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/volumequotarules_client_example_test.go delete mode 100644 sdk/resourcemanager/netapp/armnetapp/volumes_client_example_test.go diff --git a/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md b/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md index ebcee386d856..6f4cee7dd14f 100644 --- a/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md +++ b/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md @@ -1,5 +1,32 @@ # Release History +## 7.1.0-beta.1 (2024-05-22) +### Features Added + +- New enum type `AcceptGrowCapacityPoolForShortTermCloneSplit` with values `AcceptGrowCapacityPoolForShortTermCloneSplitAccepted`, `AcceptGrowCapacityPoolForShortTermCloneSplitDeclined` +- New enum type `VolumeLanguage` with values `VolumeLanguageAr`, `VolumeLanguageArUTF8`, `VolumeLanguageC`, `VolumeLanguageCUTF8`, `VolumeLanguageCs`, `VolumeLanguageCsUTF8`, `VolumeLanguageDa`, `VolumeLanguageDaUTF8`, `VolumeLanguageDe`, `VolumeLanguageDeUTF8`, `VolumeLanguageEn`, `VolumeLanguageEnUTF8`, `VolumeLanguageEnUs`, `VolumeLanguageEnUsUTF8`, `VolumeLanguageEs`, `VolumeLanguageEsUTF8`, `VolumeLanguageFi`, `VolumeLanguageFiUTF8`, `VolumeLanguageFr`, `VolumeLanguageFrUTF8`, `VolumeLanguageHe`, `VolumeLanguageHeUTF8`, `VolumeLanguageHr`, `VolumeLanguageHrUTF8`, `VolumeLanguageHu`, `VolumeLanguageHuUTF8`, `VolumeLanguageIt`, `VolumeLanguageItUTF8`, `VolumeLanguageJa`, `VolumeLanguageJaJp932`, `VolumeLanguageJaJp932UTF8`, `VolumeLanguageJaJpPck`, `VolumeLanguageJaJpPckUTF8`, `VolumeLanguageJaJpPckV2`, `VolumeLanguageJaJpPckV2UTF8`, `VolumeLanguageJaUTF8`, `VolumeLanguageJaV1`, `VolumeLanguageJaV1UTF8`, `VolumeLanguageKo`, `VolumeLanguageKoUTF8`, `VolumeLanguageNl`, `VolumeLanguageNlUTF8`, `VolumeLanguageNo`, `VolumeLanguageNoUTF8`, `VolumeLanguagePl`, `VolumeLanguagePlUTF8`, `VolumeLanguagePt`, `VolumeLanguagePtUTF8`, `VolumeLanguageRo`, `VolumeLanguageRoUTF8`, `VolumeLanguageRu`, `VolumeLanguageRuUTF8`, `VolumeLanguageSk`, `VolumeLanguageSkUTF8`, `VolumeLanguageSl`, `VolumeLanguageSlUTF8`, `VolumeLanguageSv`, `VolumeLanguageSvUTF8`, `VolumeLanguageTr`, `VolumeLanguageTrUTF8`, `VolumeLanguageUTF8Mb4`, `VolumeLanguageZh`, `VolumeLanguageZhGbk`, `VolumeLanguageZhGbkUTF8`, `VolumeLanguageZhTw`, `VolumeLanguageZhTwBig5`, `VolumeLanguageZhTwBig5UTF8`, `VolumeLanguageZhTwUTF8`, `VolumeLanguageZhUTF8` +- New function `*AccountsClient.BeginChangeKeyVault(context.Context, string, string, *AccountsClientBeginChangeKeyVaultOptions) (*runtime.Poller[AccountsClientChangeKeyVaultResponse], error)` +- New function `*AccountsClient.BeginGetChangeKeyVaultInformation(context.Context, string, string, *AccountsClientBeginGetChangeKeyVaultInformationOptions) (*runtime.Poller[AccountsClientGetChangeKeyVaultInformationResponse], error)` +- New function `*AccountsClient.BeginMigrateEncryptionKey(context.Context, string, string, *AccountsClientBeginMigrateEncryptionKeyOptions) (*runtime.Poller[AccountsClientMigrateEncryptionKeyResponse], error)` +- New function `*VolumesClient.BeginCreateOnPremMigrationReplication(context.Context, string, string, string, string, *VolumesClientBeginCreateOnPremMigrationReplicationOptions) (*runtime.Poller[VolumesClientCreateOnPremMigrationReplicationResponse], error)` +- New function `*VolumesClient.BeginFinalizeOnPremMigration(context.Context, string, string, string, string, *VolumesClientBeginFinalizeOnPremMigrationOptions) (*runtime.Poller[VolumesClientFinalizeOnPremMigrationResponse], error)` +- New function `*VolumesClient.BeginPeerClusterForOnPremMigration(context.Context, string, string, string, string, PeerClusterForVolumeMigrationRequest, *VolumesClientBeginPeerClusterForOnPremMigrationOptions) (*runtime.Poller[VolumesClientPeerClusterForOnPremMigrationResponse], error)` +- New function `*VolumesClient.BeginPerformReplicationTransfer(context.Context, string, string, string, string, *VolumesClientBeginPerformReplicationTransferOptions) (*runtime.Poller[VolumesClientPerformReplicationTransferResponse], error)` +- New function `*VolumesClient.BeginSplitCloneFromParent(context.Context, string, string, string, string, *VolumesClientBeginSplitCloneFromParentOptions) (*runtime.Poller[VolumesClientSplitCloneFromParentResponse], error)` +- New struct `ChangeKeyVault` +- New struct `ClusterPeerCommandResponse` +- New struct `EncryptionMigrationRequest` +- New struct `KeyVaultPrivateEndpoint` +- New struct `PeerClusterForVolumeMigrationRequest` +- New struct `RemotePath` +- New struct `SvmPeerCommandResponse` +- New field `IsMultiAdEnabled`, `NfsV4IDDomain` in struct `AccountProperties` +- New field `AvailabilityZone` in struct `FilePathAvailabilityRequest` +- New field `ReplicationID` in struct `Replication` +- New field `RemotePath` in struct `ReplicationObject` +- New field `AcceptGrowCapacityPoolForShortTermCloneSplit`, `InheritedSizeInBytes`, `Language` in struct `VolumeProperties` + + ## 7.0.0 (2024-05-24) ### Breaking Changes diff --git a/sdk/resourcemanager/netapp/armnetapp/accounts_client.go b/sdk/resourcemanager/netapp/armnetapp/accounts_client.go index 5f8b8182ef68..eaf8cfbd74d7 100644 --- a/sdk/resourcemanager/netapp/armnetapp/accounts_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/accounts_client.go @@ -43,10 +43,95 @@ func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, return client, nil } +// BeginChangeKeyVault - Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports +// MHSM to Key Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - AccountsClientBeginChangeKeyVaultOptions contains the optional parameters for the AccountsClient.BeginChangeKeyVault +// method. +func (client *AccountsClient) BeginChangeKeyVault(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginChangeKeyVaultOptions) (*runtime.Poller[AccountsClientChangeKeyVaultResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.changeKeyVault(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientChangeKeyVaultResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientChangeKeyVaultResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ChangeKeyVault - Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM +// to Key Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +func (client *AccountsClient) changeKeyVault(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginChangeKeyVaultOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginChangeKeyVault" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.changeKeyVaultCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// changeKeyVaultCreateRequest creates the ChangeKeyVault request. +func (client *AccountsClient) changeKeyVaultCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginChangeKeyVaultOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + // BeginCreateOrUpdate - Create or update the specified NetApp account within the resource group // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - body - NetApp Account object supplied in the body of the operation. @@ -73,7 +158,7 @@ func (client *AccountsClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create or update the specified NetApp account within the resource group // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *AccountsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, body Account, options *AccountsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginCreateOrUpdate" @@ -115,7 +200,7 @@ func (client *AccountsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -127,7 +212,7 @@ func (client *AccountsClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Delete the specified NetApp account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - options - AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method. @@ -152,7 +237,7 @@ func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete the specified NetApp account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *AccountsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginDelete" @@ -194,7 +279,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -203,7 +288,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get the NetApp account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method. @@ -249,7 +334,7 @@ func (client *AccountsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,9 +349,90 @@ func (client *AccountsClient) getHandleResponse(resp *http.Response) (AccountsCl return result, nil } +// BeginGetChangeKeyVaultInformation - Contains data from encryption.keyVaultProperties as well as information about which +// private endpoint is used by each encryption sibling set. Response from this endpoint can be modified and used as +// request body for POST request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - AccountsClientBeginGetChangeKeyVaultInformationOptions contains the optional parameters for the AccountsClient.BeginGetChangeKeyVaultInformation +// method. +func (client *AccountsClient) BeginGetChangeKeyVaultInformation(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginGetChangeKeyVaultInformationOptions) (*runtime.Poller[AccountsClientGetChangeKeyVaultInformationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getChangeKeyVaultInformation(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientGetChangeKeyVaultInformationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientGetChangeKeyVaultInformationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetChangeKeyVaultInformation - Contains data from encryption.keyVaultProperties as well as information about which private +// endpoint is used by each encryption sibling set. Response from this endpoint can be modified and used as +// request body for POST request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +func (client *AccountsClient) getChangeKeyVaultInformation(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginGetChangeKeyVaultInformationOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginGetChangeKeyVaultInformation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getChangeKeyVaultInformationCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getChangeKeyVaultInformationCreateRequest creates the GetChangeKeyVaultInformation request. +func (client *AccountsClient) getChangeKeyVaultInformationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginGetChangeKeyVaultInformationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/getKeyVaultStatus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // NewListPager - List and describe all NetApp accounts in the resource group. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method. func (client *AccountsClient) NewListPager(resourceGroupName string, options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse] { @@ -308,7 +474,7 @@ func (client *AccountsClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -325,7 +491,7 @@ func (client *AccountsClient) listHandleResponse(resp *http.Response) (AccountsC // NewListBySubscriptionPager - List and describe all NetApp accounts in the subscription. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - options - AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager // method. func (client *AccountsClient) NewListBySubscriptionPager(options *AccountsClientListBySubscriptionOptions) *runtime.Pager[AccountsClientListBySubscriptionResponse] { @@ -363,7 +529,7 @@ func (client *AccountsClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -378,12 +544,99 @@ func (client *AccountsClient) listBySubscriptionHandleResponse(resp *http.Respon return result, nil } +// BeginMigrateEncryptionKey - Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key +// or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with volumes from +// another account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - AccountsClientBeginMigrateEncryptionKeyOptions contains the optional parameters for the AccountsClient.BeginMigrateEncryptionKey +// method. +func (client *AccountsClient) BeginMigrateEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginMigrateEncryptionKeyOptions) (*runtime.Poller[AccountsClientMigrateEncryptionKeyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrateEncryptionKey(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientMigrateEncryptionKeyResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientMigrateEncryptionKeyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// MigrateEncryptionKey - Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure +// Key Vault). Operation fails if targeted volumes share encryption sibling set with volumes from +// another account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +func (client *AccountsClient) migrateEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginMigrateEncryptionKeyOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginMigrateEncryptionKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateEncryptionKeyCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateEncryptionKeyCreateRequest creates the MigrateEncryptionKey request. +func (client *AccountsClient) migrateEncryptionKeyCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginMigrateEncryptionKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateEncryption" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + // BeginRenewCredentials - Renew identity credentials that are used to authenticate to key vault, for customer-managed key // encryption. If encryption.identity.principalId does not match identity.principalId, running this // operation will fix it. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - options - AccountsClientBeginRenewCredentialsOptions contains the optional parameters for the AccountsClient.BeginRenewCredentials @@ -411,7 +664,7 @@ func (client *AccountsClient) BeginRenewCredentials(ctx context.Context, resourc // operation will fix it. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *AccountsClient) renewCredentials(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginRenewCredentialsOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginRenewCredentials" @@ -453,7 +706,7 @@ func (client *AccountsClient) renewCredentialsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -462,7 +715,7 @@ func (client *AccountsClient) renewCredentialsCreateRequest(ctx context.Context, // BeginUpdate - Patch the specified NetApp account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - body - NetApp Account object supplied in the body of the operation. @@ -488,7 +741,7 @@ func (client *AccountsClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Patch the specified NetApp account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *AccountsClient) update(ctx context.Context, resourceGroupName string, accountName string, body AccountPatch, options *AccountsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginUpdate" @@ -530,7 +783,7 @@ func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/accounts_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/accounts_client_example_test.go deleted file mode 100644 index 25037d0ef7a1..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/accounts_client_example_test.go +++ /dev/null @@ -1,277 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_List.json -func ExampleAccountsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAccountsClient().NewListBySubscriptionPager(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.AccountList = armnetapp.AccountList{ - // Value: []*armnetapp.Account{ - // { - // Name: to.Ptr("account1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.AccountProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_Get.json -func ExampleAccountsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountsClient().Get(ctx, "myRG", "account1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your 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 = armnetapp.Account{ - // Name: to.Ptr("account1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.AccountProperties{ - // ActiveDirectories: []*armnetapp.ActiveDirectory{ - // { - // ActiveDirectoryID: to.Ptr("02da3711-6c58-2d64-098a-e3af7afaf936"), - // AesEncryption: to.Ptr(true), - // DNS: to.Ptr("10.10.10.3"), - // Domain: to.Ptr("10.10.10.3"), - // LdapSigning: to.Ptr(true), - // OrganizationalUnit: to.Ptr("OU=Engineering"), - // Site: to.Ptr("SiteName"), - // SmbServerName: to.Ptr("SMBServer"), - // Status: to.Ptr(armnetapp.ActiveDirectoryStatusInUse), - // StatusDetails: to.Ptr("Status Details"), - // Username: to.Ptr("ad_user_name"), - // }}, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_CreateOrUpdate.json -func ExampleAccountsClient_BeginCreateOrUpdate_accountsCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreateOrUpdate(ctx, "myRG", "account1", armnetapp.Account{ - Location: to.Ptr("eastus"), - Properties: &armnetapp.AccountProperties{}, - }, 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 = armnetapp.Account{ - // Name: to.Ptr("account1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.AccountProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_CreateOrUpdateAD.json -func ExampleAccountsClient_BeginCreateOrUpdate_accountsCreateOrUpdateWithActiveDirectory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginCreateOrUpdate(ctx, "myRG", "account1", armnetapp.Account{ - Location: to.Ptr("eastus"), - Properties: &armnetapp.AccountProperties{ - ActiveDirectories: []*armnetapp.ActiveDirectory{ - { - AesEncryption: to.Ptr(true), - DNS: to.Ptr("10.10.10.3"), - Domain: to.Ptr("10.10.10.3"), - LdapOverTLS: to.Ptr(false), - LdapSigning: to.Ptr(false), - OrganizationalUnit: to.Ptr("OU=Engineering"), - Password: to.Ptr("ad_password"), - Site: to.Ptr("SiteName"), - SmbServerName: to.Ptr("SMBServer"), - Username: to.Ptr("ad_user_name"), - }}, - }, - }, 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 = armnetapp.Account{ - // Name: to.Ptr("account1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.AccountProperties{ - // ActiveDirectories: []*armnetapp.ActiveDirectory{ - // { - // ActiveDirectoryID: to.Ptr("503d38f9-f17c-f92d-ef26-b0d46374534b"), - // AesEncryption: to.Ptr(true), - // DNS: to.Ptr("10.10.10.3"), - // Domain: to.Ptr("10.10.10.3"), - // LdapOverTLS: to.Ptr(false), - // LdapSigning: to.Ptr(false), - // OrganizationalUnit: to.Ptr("OU=Engineering"), - // Site: to.Ptr("SiteName"), - // SmbServerName: to.Ptr("SMBServer"), - // Username: to.Ptr("ad_user_name"), - // }}, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_Delete.json -func ExampleAccountsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginDelete(ctx, "myRG", "account1", 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_Update.json -func ExampleAccountsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginUpdate(ctx, "myRG", "account1", armnetapp.AccountPatch{ - Tags: map[string]*string{ - "Tag1": to.Ptr("Value1"), - }, - }, 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 = armnetapp.Account{ - // Name: to.Ptr("account1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.AccountProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_RenewCredentials.json -func ExampleAccountsClient_BeginRenewCredentials() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAccountsClient().BeginRenewCredentials(ctx, "myRG", "account1", 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/netapp/armnetapp/autorest.md b/sdk/resourcemanager/netapp/armnetapp/autorest.md index a2ea17cc0e87..5085fa019472 100644 --- a/sdk/resourcemanager/netapp/armnetapp/autorest.md +++ b/sdk/resourcemanager/netapp/armnetapp/autorest.md @@ -5,9 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/netapp/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/netapp/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 7.0.0 -tag: package-netapp-2023-11-01 +module-version: 7.1.0-beta.1 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client.go b/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client.go index b6d115075d68..4fa811cedc99 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client.go @@ -46,7 +46,7 @@ func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCrede // BeginCreate - Create a backup policy for Netapp Account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupPolicyName - Backup policy Name which uniquely identify backup policy. @@ -74,7 +74,7 @@ func (client *BackupPoliciesClient) BeginCreate(ctx context.Context, resourceGro // Create - Create a backup policy for Netapp Account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupPoliciesClient) create(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy, options *BackupPoliciesClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "BackupPoliciesClient.BeginCreate" @@ -120,7 +120,7 @@ func (client *BackupPoliciesClient) createCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *BackupPoliciesClient) createCreateRequest(ctx context.Context, res // BeginDelete - Delete backup policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupPolicyName - Backup policy Name which uniquely identify backup policy. @@ -159,7 +159,7 @@ func (client *BackupPoliciesClient) BeginDelete(ctx context.Context, resourceGro // Delete - Delete backup policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, options *BackupPoliciesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BackupPoliciesClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *BackupPoliciesClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *BackupPoliciesClient) deleteCreateRequest(ctx context.Context, res // Get - Get a particular backup Policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupPolicyName - Backup policy Name which uniquely identify backup policy. @@ -265,7 +265,7 @@ func (client *BackupPoliciesClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -282,7 +282,7 @@ func (client *BackupPoliciesClient) getHandleResponse(resp *http.Response) (Back // NewListPager - List backup policies for Netapp Account // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. @@ -330,7 +330,7 @@ func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,7 +348,7 @@ func (client *BackupPoliciesClient) listHandleResponse(resp *http.Response) (Bac // BeginUpdate - Patch a backup policy for Netapp Account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupPolicyName - Backup policy Name which uniquely identify backup policy. @@ -376,7 +376,7 @@ func (client *BackupPoliciesClient) BeginUpdate(ctx context.Context, resourceGro // Update - Patch a backup policy for Netapp Account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupPoliciesClient) update(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch, options *BackupPoliciesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BackupPoliciesClient.BeginUpdate" @@ -422,7 +422,7 @@ func (client *BackupPoliciesClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client_example_test.go deleted file mode 100644 index 29eb6bdbaa83..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client_example_test.go +++ /dev/null @@ -1,217 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_List.json -func ExampleBackupPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBackupPoliciesClient().NewListPager("myRG", "account1", 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.BackupPoliciesList = armnetapp.BackupPoliciesList{ - // Value: []*armnetapp.BackupPolicy{ - // { - // Name: to.Ptr("account1/backupPolicy1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupPolicies"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolocies/backupPolicy1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.BackupPolicyProperties{ - // DailyBackupsToKeep: to.Ptr[int32](10), - // Enabled: to.Ptr(true), - // MonthlyBackupsToKeep: to.Ptr[int32](10), - // VolumesAssigned: to.Ptr[int32](0), - // WeeklyBackupsToKeep: to.Ptr[int32](10), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Get.json -func ExampleBackupPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBackupPoliciesClient().Get(ctx, "myRG", "account1", "backupPolicyName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BackupPolicy = armnetapp.BackupPolicy{ - // Name: to.Ptr("account1/backupPolicyName"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupPolicies"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolocies/backupPolicyName"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.BackupPolicyProperties{ - // DailyBackupsToKeep: to.Ptr[int32](10), - // Enabled: to.Ptr(true), - // MonthlyBackupsToKeep: to.Ptr[int32](10), - // VolumeBackups: []*armnetapp.VolumeBackups{ - // { - // BackupsCount: to.Ptr[int32](5), - // PolicyEnabled: to.Ptr(true), - // VolumeName: to.Ptr("volume 1"), - // }}, - // VolumesAssigned: to.Ptr[int32](0), - // WeeklyBackupsToKeep: to.Ptr[int32](10), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Create.json -func ExampleBackupPoliciesClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupPoliciesClient().BeginCreate(ctx, "myRG", "account1", "backupPolicyName", armnetapp.BackupPolicy{ - Location: to.Ptr("westus"), - Properties: &armnetapp.BackupPolicyProperties{ - DailyBackupsToKeep: to.Ptr[int32](10), - Enabled: to.Ptr(true), - MonthlyBackupsToKeep: to.Ptr[int32](10), - WeeklyBackupsToKeep: to.Ptr[int32](10), - }, - }, 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.BackupPolicy = armnetapp.BackupPolicy{ - // Name: to.Ptr("account1/backupPolicyName"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupPolicies"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolicies/backupPolicyName"), - // Location: to.Ptr("westus"), - // Properties: &armnetapp.BackupPolicyProperties{ - // DailyBackupsToKeep: to.Ptr[int32](10), - // Enabled: to.Ptr(true), - // MonthlyBackupsToKeep: to.Ptr[int32](10), - // ProvisioningState: to.Ptr("Succeeded"), - // WeeklyBackupsToKeep: to.Ptr[int32](10), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Update.json -func ExampleBackupPoliciesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupPoliciesClient().BeginUpdate(ctx, "myRG", "account1", "backupPolicyName", armnetapp.BackupPolicyPatch{ - Location: to.Ptr("westus"), - Properties: &armnetapp.BackupPolicyProperties{ - DailyBackupsToKeep: to.Ptr[int32](5), - Enabled: to.Ptr(false), - MonthlyBackupsToKeep: to.Ptr[int32](10), - WeeklyBackupsToKeep: to.Ptr[int32](10), - }, - }, 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.BackupPolicy = armnetapp.BackupPolicy{ - // Name: to.Ptr("account1/backupPolicyName"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupPolicies"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolocies/backupPolicyName"), - // Location: to.Ptr("westus"), - // Properties: &armnetapp.BackupPolicyProperties{ - // DailyBackupsToKeep: to.Ptr[int32](5), - // Enabled: to.Ptr(false), - // MonthlyBackupsToKeep: to.Ptr[int32](10), - // ProvisioningState: to.Ptr("Succeeded"), - // VolumeBackups: []*armnetapp.VolumeBackups{ - // { - // BackupsCount: to.Ptr[int32](5), - // PolicyEnabled: to.Ptr(true), - // VolumeName: to.Ptr("volume 1"), - // }}, - // VolumesAssigned: to.Ptr[int32](1), - // WeeklyBackupsToKeep: to.Ptr[int32](10), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Delete.json -func ExampleBackupPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupPoliciesClient().BeginDelete(ctx, "resourceGroup", "accountName", "backupPolicyName", 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/netapp/armnetapp/backups_client.go b/sdk/resourcemanager/netapp/armnetapp/backups_client.go index 6967caf4f337..c59bc5823918 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backups_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backups_client.go @@ -46,7 +46,7 @@ func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Create a backup under the Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -74,7 +74,7 @@ func (client *BackupsClient) BeginCreate(ctx context.Context, resourceGroupName // Create - Create a backup under the Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupsClient) create(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body Backup, options *BackupsClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "BackupsClient.BeginCreate" @@ -124,7 +124,7 @@ func (client *BackupsClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -136,7 +136,7 @@ func (client *BackupsClient) createCreateRequest(ctx context.Context, resourceGr // BeginDelete - Delete a Backup under the Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -163,7 +163,7 @@ func (client *BackupsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete a Backup under the Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, options *BackupsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BackupsClient.BeginDelete" @@ -213,7 +213,7 @@ func (client *BackupsClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -222,7 +222,7 @@ func (client *BackupsClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Get the specified Backup under Backup Vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -278,7 +278,7 @@ func (client *BackupsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,7 +296,7 @@ func (client *BackupsClient) getHandleResponse(resp *http.Response) (BackupsClie // GetLatestStatus - Get the latest status of the backup for a volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -352,7 +352,7 @@ func (client *BackupsClient) getLatestStatusCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,7 +370,7 @@ func (client *BackupsClient) getLatestStatusHandleResponse(resp *http.Response) // GetVolumeLatestRestoreStatus - Get the latest status of the restore for a volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -427,7 +427,7 @@ func (client *BackupsClient) getVolumeLatestRestoreStatusCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -444,7 +444,7 @@ func (client *BackupsClient) getVolumeLatestRestoreStatusHandleResponse(resp *ht // NewListByVaultPager - List all backups Under a Backup Vault // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -499,7 +499,7 @@ func (client *BackupsClient) listByVaultCreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -517,7 +517,7 @@ func (client *BackupsClient) listByVaultHandleResponse(resp *http.Response) (Bac // BeginUpdate - Patch a Backup under the Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -545,7 +545,7 @@ func (client *BackupsClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Patch a Backup under the Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupsClient) update(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body BackupPatch, options *BackupsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BackupsClient.BeginUpdate" @@ -595,7 +595,7 @@ func (client *BackupsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backups_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/backups_client_example_test.go deleted file mode 100644 index f5ea812b7dff..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/backups_client_example_test.go +++ /dev/null @@ -1,257 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_LatestBackupStatus.json -func ExampleBackupsClient_GetLatestStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBackupsClient().GetLatestStatus(ctx, "myRG", "account1", "pool1", "volume1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BackupStatus = armnetapp.BackupStatus{ - // ErrorMessage: to.Ptr(""), - // Healthy: to.Ptr(true), - // LastTransferSize: to.Ptr[int64](100000), - // LastTransferType: to.Ptr(""), - // MirrorState: to.Ptr(armnetapp.MirrorStateMirrored), - // RelationshipStatus: to.Ptr(armnetapp.RelationshipStatusIdle), - // TotalTransferBytes: to.Ptr[int64](100000), - // UnhealthyReason: to.Ptr(""), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_LatestRestoreStatus.json -func ExampleBackupsClient_GetVolumeLatestRestoreStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBackupsClient().GetVolumeLatestRestoreStatus(ctx, "myRG", "account1", "pool1", "volume1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RestoreStatus = armnetapp.RestoreStatus{ - // ErrorMessage: to.Ptr(""), - // Healthy: to.Ptr(true), - // MirrorState: to.Ptr(armnetapp.MirrorStateUninitialized), - // RelationshipStatus: to.Ptr(armnetapp.RelationshipStatusIdle), - // TotalTransferBytes: to.Ptr[int64](100000), - // UnhealthyReason: to.Ptr(""), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_List.json -func ExampleBackupsClient_NewListByVaultPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBackupsClient().NewListByVaultPager("myRG", "account1", "backupVault1", &armnetapp.BackupsClientListByVaultOptions{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.BackupsList = armnetapp.BackupsList{ - // Value: []*armnetapp.Backup{ - // { - // Name: to.Ptr("account1/backupVault1/backup1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupVaults/backups"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1/backups/backup1"), - // Properties: &armnetapp.BackupProperties{ - // BackupPolicyResourceID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolicies/policy1"), - // BackupType: to.Ptr(armnetapp.BackupTypeManual), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // Label: to.Ptr("myLabel"), - // ProvisioningState: to.Ptr("Succeeded"), - // Size: to.Ptr[int64](10011), - // SnapshotName: to.Ptr("backup1"), - // VolumeResourceID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Get.json -func ExampleBackupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBackupsClient().Get(ctx, "myRG", "account1", "backupVault1", "backup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Backup = armnetapp.Backup{ - // Name: to.Ptr("account1/backupVault1/backup1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupVaults/backups"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1/backups/backup1"), - // Properties: &armnetapp.BackupProperties{ - // BackupPolicyResourceID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolicies/policy1"), - // BackupType: to.Ptr(armnetapp.BackupTypeManual), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // Label: to.Ptr("myLabel"), - // ProvisioningState: to.Ptr("Succeeded"), - // Size: to.Ptr[int64](10011), - // SnapshotName: to.Ptr("backup1"), - // VolumeResourceID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Create.json -func ExampleBackupsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupsClient().BeginCreate(ctx, "myRG", "account1", "backupVault1", "backup1", armnetapp.Backup{ - Properties: &armnetapp.BackupProperties{ - Label: to.Ptr("myLabel"), - VolumeResourceID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1"), - }, - }, 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.Backup = armnetapp.Backup{ - // Name: to.Ptr("account1/backupVault1/backup1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupVaults/backups"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1/backups/backup1"), - // Properties: &armnetapp.BackupProperties{ - // BackupType: to.Ptr(armnetapp.BackupTypeManual), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // Label: to.Ptr("myLabel"), - // ProvisioningState: to.Ptr("Succeeded"), - // Size: to.Ptr[int64](10011), - // SnapshotName: to.Ptr("backup1"), - // VolumeResourceID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Update.json -func ExampleBackupsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupsClient().BeginUpdate(ctx, "myRG", "account1", "backupVault1", "backup1", armnetapp.BackupPatch{}, 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.Backup = armnetapp.Backup{ - // Name: to.Ptr("account1/backupVault1/backup1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupVaults/backups"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1/backups/backup1"), - // Properties: &armnetapp.BackupProperties{ - // BackupType: to.Ptr(armnetapp.BackupTypeManual), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // Label: to.Ptr("myLabel"), - // ProvisioningState: to.Ptr("Succeeded"), - // Size: to.Ptr[int64](10011), - // SnapshotName: to.Ptr("backup1"), - // VolumeResourceID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Delete.json -func ExampleBackupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupsClient().BeginDelete(ctx, "resourceGroup", "account1", "backupVault1", "backup1", 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/netapp/armnetapp/backupsunderaccount_client.go b/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client.go index 12a57d0dd772..f18ccd9b4717 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client.go @@ -46,7 +46,7 @@ func NewBackupsUnderAccountClient(subscriptionID string, credential azcore.Token // BeginMigrateBackups - Migrate the backups under a NetApp account to backup vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - body - Migrate backups under an account payload supplied in the body of the operation. @@ -73,7 +73,7 @@ func (client *BackupsUnderAccountClient) BeginMigrateBackups(ctx context.Context // MigrateBackups - Migrate the backups under a NetApp account to backup vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupsUnderAccountClient) migrateBackups(ctx context.Context, resourceGroupName string, accountName string, body BackupsMigrationRequest, options *BackupsUnderAccountClientBeginMigrateBackupsOptions) (*http.Response, error) { var err error const operationName = "BackupsUnderAccountClient.BeginMigrateBackups" @@ -115,7 +115,7 @@ func (client *BackupsUnderAccountClient) migrateBackupsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client_example_test.go deleted file mode 100644 index 17ca4eaa92d6..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client_example_test.go +++ /dev/null @@ -1,42 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderAccount_Migrate.json -func ExampleBackupsUnderAccountClient_BeginMigrateBackups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupsUnderAccountClient().BeginMigrateBackups(ctx, "myRG", "account1", armnetapp.BackupsMigrationRequest{ - BackupVaultID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - }, 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/netapp/armnetapp/backupsunderbackupvault_client.go b/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client.go index 887ddff55985..3e344f9c3a5d 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client.go @@ -46,7 +46,7 @@ func NewBackupsUnderBackupVaultClient(subscriptionID string, credential azcore.T // BeginRestoreFiles - Restore the specified files from the specified backup to the active filesystem // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -75,7 +75,7 @@ func (client *BackupsUnderBackupVaultClient) BeginRestoreFiles(ctx context.Conte // RestoreFiles - Restore the specified files from the specified backup to the active filesystem // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupsUnderBackupVaultClient) restoreFiles(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body BackupRestoreFiles, options *BackupsUnderBackupVaultClientBeginRestoreFilesOptions) (*http.Response, error) { var err error const operationName = "BackupsUnderBackupVaultClient.BeginRestoreFiles" @@ -125,7 +125,7 @@ func (client *BackupsUnderBackupVaultClient) restoreFilesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client_example_test.go deleted file mode 100644 index 34fa9e743938..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client_example_test.go +++ /dev/null @@ -1,45 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_SingleFileRestore.json -func ExampleBackupsUnderBackupVaultClient_BeginRestoreFiles() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupsUnderBackupVaultClient().BeginRestoreFiles(ctx, "myRG", "account1", "backupVault1", "backup1", armnetapp.BackupRestoreFiles{ - DestinationVolumeID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), - FileList: []*string{ - to.Ptr("/dir1/customer1.db"), - to.Ptr("/dir1/customer2.db")}, - }, 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/netapp/armnetapp/backupsundervolume_client.go b/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client.go index 6b7d7934d0c9..669195b764ce 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client.go @@ -46,7 +46,7 @@ func NewBackupsUnderVolumeClient(subscriptionID string, credential azcore.TokenC // BeginMigrateBackups - Migrate the backups under volume to backup vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -75,7 +75,7 @@ func (client *BackupsUnderVolumeClient) BeginMigrateBackups(ctx context.Context, // MigrateBackups - Migrate the backups under volume to backup vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupsUnderVolumeClient) migrateBackups(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body BackupsMigrationRequest, options *BackupsUnderVolumeClientBeginMigrateBackupsOptions) (*http.Response, error) { var err error const operationName = "BackupsUnderVolumeClient.BeginMigrateBackups" @@ -125,7 +125,7 @@ func (client *BackupsUnderVolumeClient) migrateBackupsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client_example_test.go deleted file mode 100644 index d9e00f6e53fa..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client_example_test.go +++ /dev/null @@ -1,42 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderVolume_Migrate.json -func ExampleBackupsUnderVolumeClient_BeginMigrateBackups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupsUnderVolumeClient().BeginMigrateBackups(ctx, "myRG", "account1", "pool1", "volume1", armnetapp.BackupsMigrationRequest{ - BackupVaultID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - }, 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/netapp/armnetapp/backupvaults_client.go b/sdk/resourcemanager/netapp/armnetapp/backupvaults_client.go index bef43168c0ec..ac83fed91f07 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupvaults_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupvaults_client.go @@ -46,7 +46,7 @@ func NewBackupVaultsClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Create or update the specified Backup Vault in the NetApp account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -74,7 +74,7 @@ func (client *BackupVaultsClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Create or update the specified Backup Vault in the NetApp account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupVaultsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, body BackupVault, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "BackupVaultsClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *BackupVaultsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *BackupVaultsClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Delete the specified Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -159,7 +159,7 @@ func (client *BackupVaultsClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Delete the specified Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupVaultsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, options *BackupVaultsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BackupVaultsClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *BackupVaultsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *BackupVaultsClient) deleteCreateRequest(ctx context.Context, resou // Get - Get the Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -265,7 +265,7 @@ func (client *BackupVaultsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -282,7 +282,7 @@ func (client *BackupVaultsClient) getHandleResponse(resp *http.Response) (Backup // NewListByNetAppAccountPager - List and describe all Backup Vaults in the NetApp account. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - options - BackupVaultsClientListByNetAppAccountOptions contains the optional parameters for the BackupVaultsClient.NewListByNetAppAccountPager @@ -330,7 +330,7 @@ func (client *BackupVaultsClient) listByNetAppAccountCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,7 +348,7 @@ func (client *BackupVaultsClient) listByNetAppAccountHandleResponse(resp *http.R // BeginUpdate - Patch the specified NetApp Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - backupVaultName - The name of the Backup Vault @@ -376,7 +376,7 @@ func (client *BackupVaultsClient) BeginUpdate(ctx context.Context, resourceGroup // Update - Patch the specified NetApp Backup Vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *BackupVaultsClient) update(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, body BackupVaultPatch, options *BackupVaultsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BackupVaultsClient.BeginUpdate" @@ -422,7 +422,7 @@ func (client *BackupVaultsClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backupvaults_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/backupvaults_client_example_test.go deleted file mode 100644 index 009752070b7b..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/backupvaults_client_example_test.go +++ /dev/null @@ -1,187 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_List.json -func ExampleBackupVaultsClient_NewListByNetAppAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBackupVaultsClient().NewListByNetAppAccountPager("myRG", "account1", 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.BackupVaultsList = armnetapp.BackupVaultsList{ - // Value: []*armnetapp.BackupVault{ - // { - // Name: to.Ptr("account1/backupVault1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupVaults"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "Tag1": to.Ptr("Value1"), - // }, - // Properties: &armnetapp.BackupVaultProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Get.json -func ExampleBackupVaultsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBackupVaultsClient().Get(ctx, "myRG", "account1", "backupVault1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BackupVault = armnetapp.BackupVault{ - // Name: to.Ptr("account1/backupVault1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupVaults"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "Tag1": to.Ptr("Value1"), - // }, - // Properties: &armnetapp.BackupVaultProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Create.json -func ExampleBackupVaultsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupVaultsClient().BeginCreateOrUpdate(ctx, "myRG", "account1", "backupVault1", armnetapp.BackupVault{ - Location: to.Ptr("eastus"), - }, 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.BackupVault = armnetapp.BackupVault{ - // Name: to.Ptr("account1/backupVault1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupVaults"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.BackupVaultProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Update.json -func ExampleBackupVaultsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupVaultsClient().BeginUpdate(ctx, "myRG", "account1", "backupVault1", armnetapp.BackupVaultPatch{ - Tags: map[string]*string{ - "Tag1": to.Ptr("Value1"), - }, - }, 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.BackupVault = armnetapp.BackupVault{ - // Name: to.Ptr("account1/backupVault1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/backupVaults"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "Tag1": to.Ptr("Value1"), - // }, - // Properties: &armnetapp.BackupVaultProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Delete.json -func ExampleBackupVaultsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBackupVaultsClient().BeginDelete(ctx, "resourceGroup", "account1", "backupVault1", 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/netapp/armnetapp/constants.go b/sdk/resourcemanager/netapp/armnetapp/constants.go index d70c6e9d2f78..09c086ea40d3 100644 --- a/sdk/resourcemanager/netapp/armnetapp/constants.go +++ b/sdk/resourcemanager/netapp/armnetapp/constants.go @@ -10,9 +10,30 @@ package armnetapp const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp" - moduleVersion = "v7.0.0" + moduleVersion = "v7.1.0-beta.1" ) +// AcceptGrowCapacityPoolForShortTermCloneSplit - While auto splitting the short term clone volume, if the parent pool does +// not have enough space to accommodate the volume after split, it will be automatically resized, which will lead to increased +// billing. To accept capacity pool size auto grow and create a short term clone volume, set the property as accepted. +type AcceptGrowCapacityPoolForShortTermCloneSplit string + +const ( + // AcceptGrowCapacityPoolForShortTermCloneSplitAccepted - Auto grow capacity pool for short term clone split is accepted. + AcceptGrowCapacityPoolForShortTermCloneSplitAccepted AcceptGrowCapacityPoolForShortTermCloneSplit = "Accepted" + // AcceptGrowCapacityPoolForShortTermCloneSplitDeclined - Auto grow capacity pool for short term clone split is declined. + // Short term clone volume creation will not be allowed, to create short term clone volume accept auto grow capacity pool. + AcceptGrowCapacityPoolForShortTermCloneSplitDeclined AcceptGrowCapacityPoolForShortTermCloneSplit = "Declined" +) + +// PossibleAcceptGrowCapacityPoolForShortTermCloneSplitValues returns the possible values for the AcceptGrowCapacityPoolForShortTermCloneSplit const type. +func PossibleAcceptGrowCapacityPoolForShortTermCloneSplitValues() []AcceptGrowCapacityPoolForShortTermCloneSplit { + return []AcceptGrowCapacityPoolForShortTermCloneSplit{ + AcceptGrowCapacityPoolForShortTermCloneSplitAccepted, + AcceptGrowCapacityPoolForShortTermCloneSplitDeclined, + } +} + // ActiveDirectoryStatus - Status of the Active Directory type ActiveDirectoryStatus string @@ -660,6 +681,225 @@ func PossibleTypeValues() []Type { } } +// VolumeLanguage - Language supported for volume. +type VolumeLanguage string + +const ( + // VolumeLanguageAr - Arabic - Deprecated + VolumeLanguageAr VolumeLanguage = "ar" + // VolumeLanguageArUTF8 - Arabic with UTF-8 + VolumeLanguageArUTF8 VolumeLanguage = "ar.utf-8" + // VolumeLanguageC - Posix - Deprecated + VolumeLanguageC VolumeLanguage = "c" + // VolumeLanguageCUTF8 - Posix with UTF-8 + VolumeLanguageCUTF8 VolumeLanguage = "c.utf-8" + // VolumeLanguageCs - Czech - Deprecated + VolumeLanguageCs VolumeLanguage = "cs" + // VolumeLanguageCsUTF8 - Czech with UTF-8 + VolumeLanguageCsUTF8 VolumeLanguage = "cs.utf-8" + // VolumeLanguageDa - Danish - Deprecated + VolumeLanguageDa VolumeLanguage = "da" + // VolumeLanguageDaUTF8 - Danish with UTF-8 + VolumeLanguageDaUTF8 VolumeLanguage = "da.utf-8" + // VolumeLanguageDe - German - Deprecated + VolumeLanguageDe VolumeLanguage = "de" + // VolumeLanguageDeUTF8 - German with UTF-8 + VolumeLanguageDeUTF8 VolumeLanguage = "de.utf-8" + // VolumeLanguageEn - English - Deprecated + VolumeLanguageEn VolumeLanguage = "en" + // VolumeLanguageEnUTF8 - English with UTF-8 + VolumeLanguageEnUTF8 VolumeLanguage = "en.utf-8" + // VolumeLanguageEnUs - US English - Deprecated + VolumeLanguageEnUs VolumeLanguage = "en-us" + // VolumeLanguageEnUsUTF8 - US English with UTF-8 + VolumeLanguageEnUsUTF8 VolumeLanguage = "en-us.utf-8" + // VolumeLanguageEs - Spanish - Deprecated + VolumeLanguageEs VolumeLanguage = "es" + // VolumeLanguageEsUTF8 - Spanish with UTF-8 + VolumeLanguageEsUTF8 VolumeLanguage = "es.utf-8" + // VolumeLanguageFi - Finnish - Deprecated + VolumeLanguageFi VolumeLanguage = "fi" + // VolumeLanguageFiUTF8 - Finnish with UTF-8 + VolumeLanguageFiUTF8 VolumeLanguage = "fi.utf-8" + // VolumeLanguageFr - French - Deprecated + VolumeLanguageFr VolumeLanguage = "fr" + // VolumeLanguageFrUTF8 - French with UTF-8 + VolumeLanguageFrUTF8 VolumeLanguage = "fr.utf-8" + // VolumeLanguageHe - Hebrew - Deprecated + VolumeLanguageHe VolumeLanguage = "he" + // VolumeLanguageHeUTF8 - Hebrew with UTF-8 + VolumeLanguageHeUTF8 VolumeLanguage = "he.utf-8" + // VolumeLanguageHr - Croatian - Deprecated + VolumeLanguageHr VolumeLanguage = "hr" + // VolumeLanguageHrUTF8 - Croatian with UTF-8 + VolumeLanguageHrUTF8 VolumeLanguage = "hr.utf-8" + // VolumeLanguageHu - Hungarian - Deprecated + VolumeLanguageHu VolumeLanguage = "hu" + // VolumeLanguageHuUTF8 - Hungarian with UTF-8 + VolumeLanguageHuUTF8 VolumeLanguage = "hu.utf-8" + // VolumeLanguageIt - Italian - Deprecated + VolumeLanguageIt VolumeLanguage = "it" + // VolumeLanguageItUTF8 - Italian with UTF-8 + VolumeLanguageItUTF8 VolumeLanguage = "it.utf-8" + // VolumeLanguageJa - Japanese euc-j - Deprecated + VolumeLanguageJa VolumeLanguage = "ja" + // VolumeLanguageJaJp932 - Japanese cp932 + VolumeLanguageJaJp932 VolumeLanguage = "ja-jp.932" + // VolumeLanguageJaJp932UTF8 - Japanese cp932 with UTF-8 - Deprecated + VolumeLanguageJaJp932UTF8 VolumeLanguage = "ja-jp.932.utf-8" + // VolumeLanguageJaJpPck - Japanese pck + VolumeLanguageJaJpPck VolumeLanguage = "ja-jp.pck" + // VolumeLanguageJaJpPckUTF8 - Japanese pck with UTF-8 - Deprecated + VolumeLanguageJaJpPckUTF8 VolumeLanguage = "ja-jp.pck.utf-8" + // VolumeLanguageJaJpPckV2 - Japanese pck - sjis + VolumeLanguageJaJpPckV2 VolumeLanguage = "ja-jp.pck-v2" + // VolumeLanguageJaJpPckV2UTF8 - Japanese pck - sjis with UTF-8 - Deprecated + VolumeLanguageJaJpPckV2UTF8 VolumeLanguage = "ja-jp.pck-v2.utf-8" + // VolumeLanguageJaUTF8 - Japanese euc-j with UTF-8 + VolumeLanguageJaUTF8 VolumeLanguage = "ja.utf-8" + // VolumeLanguageJaV1 - Japanese euc-j - Deprecated + VolumeLanguageJaV1 VolumeLanguage = "ja-v1" + // VolumeLanguageJaV1UTF8 - Japanese euc-j with UTF-8 + VolumeLanguageJaV1UTF8 VolumeLanguage = "ja-v1.utf-8" + // VolumeLanguageKo - Korean - Deprecated + VolumeLanguageKo VolumeLanguage = "ko" + // VolumeLanguageKoUTF8 - Korean with UTF-8 + VolumeLanguageKoUTF8 VolumeLanguage = "ko.utf-8" + // VolumeLanguageNl - Dutch - Deprecated + VolumeLanguageNl VolumeLanguage = "nl" + // VolumeLanguageNlUTF8 - Dutch with UTF-8 + VolumeLanguageNlUTF8 VolumeLanguage = "nl.utf-8" + // VolumeLanguageNo - Norwegian - Deprecated + VolumeLanguageNo VolumeLanguage = "no" + // VolumeLanguageNoUTF8 - Norwegian with UTF-8 + VolumeLanguageNoUTF8 VolumeLanguage = "no.utf-8" + // VolumeLanguagePl - Polish - Deprecated + VolumeLanguagePl VolumeLanguage = "pl" + // VolumeLanguagePlUTF8 - Polish with UTF-8 + VolumeLanguagePlUTF8 VolumeLanguage = "pl.utf-8" + // VolumeLanguagePt - Portuguese - Deprecated + VolumeLanguagePt VolumeLanguage = "pt" + // VolumeLanguagePtUTF8 - Portuguese with UTF-8 + VolumeLanguagePtUTF8 VolumeLanguage = "pt.utf-8" + // VolumeLanguageRo - Romanian - Deprecated + VolumeLanguageRo VolumeLanguage = "ro" + // VolumeLanguageRoUTF8 - Romanian with UTF-8 + VolumeLanguageRoUTF8 VolumeLanguage = "ro.utf-8" + // VolumeLanguageRu - Russian - Deprecated + VolumeLanguageRu VolumeLanguage = "ru" + // VolumeLanguageRuUTF8 - Russian with UTF-8 + VolumeLanguageRuUTF8 VolumeLanguage = "ru.utf-8" + // VolumeLanguageSk - Slovak - Deprecated + VolumeLanguageSk VolumeLanguage = "sk" + // VolumeLanguageSkUTF8 - Slovak with UTF-8 + VolumeLanguageSkUTF8 VolumeLanguage = "sk.utf-8" + // VolumeLanguageSl - Slovenian - Deprecated + VolumeLanguageSl VolumeLanguage = "sl" + // VolumeLanguageSlUTF8 - Slovenian with UTF-8 + VolumeLanguageSlUTF8 VolumeLanguage = "sl.utf-8" + // VolumeLanguageSv - Swedish - Deprecated + VolumeLanguageSv VolumeLanguage = "sv" + // VolumeLanguageSvUTF8 - Swedish with UTF-8 + VolumeLanguageSvUTF8 VolumeLanguage = "sv.utf-8" + // VolumeLanguageTr - Turkish - Deprecated + VolumeLanguageTr VolumeLanguage = "tr" + // VolumeLanguageTrUTF8 - Turkish with UTF-8 + VolumeLanguageTrUTF8 VolumeLanguage = "tr.utf-8" + // VolumeLanguageUTF8Mb4 - UTF-8 with 4 byte character support + VolumeLanguageUTF8Mb4 VolumeLanguage = "utf8mb4" + // VolumeLanguageZh - Simplified Chinese - Deprecated + VolumeLanguageZh VolumeLanguage = "zh" + // VolumeLanguageZhGbk - Simplified gbk Chinese + VolumeLanguageZhGbk VolumeLanguage = "zh.gbk" + // VolumeLanguageZhGbkUTF8 - Simplified gbk Chinese with UTF-8 - Deprecated + VolumeLanguageZhGbkUTF8 VolumeLanguage = "zh.gbk.utf-8" + // VolumeLanguageZhTw - Traditional Chinese EUC-TW + VolumeLanguageZhTw VolumeLanguage = "zh-tw" + // VolumeLanguageZhTwBig5 - Traditional Chinese BIG 5 + VolumeLanguageZhTwBig5 VolumeLanguage = "zh-tw.big5" + // VolumeLanguageZhTwBig5UTF8 - Traditional Chinese BIG 5 with UTF-8 - Deprecated + VolumeLanguageZhTwBig5UTF8 VolumeLanguage = "zh-tw.big5.utf-8" + // VolumeLanguageZhTwUTF8 - Traditional Chinese EUC-TW with UTF-8 - Deprecated + VolumeLanguageZhTwUTF8 VolumeLanguage = "zh-tw.utf-8" + // VolumeLanguageZhUTF8 - Simplified Chinese with UTF-8 + VolumeLanguageZhUTF8 VolumeLanguage = "zh.utf-8" +) + +// PossibleVolumeLanguageValues returns the possible values for the VolumeLanguage const type. +func PossibleVolumeLanguageValues() []VolumeLanguage { + return []VolumeLanguage{ + VolumeLanguageAr, + VolumeLanguageArUTF8, + VolumeLanguageC, + VolumeLanguageCUTF8, + VolumeLanguageCs, + VolumeLanguageCsUTF8, + VolumeLanguageDa, + VolumeLanguageDaUTF8, + VolumeLanguageDe, + VolumeLanguageDeUTF8, + VolumeLanguageEn, + VolumeLanguageEnUTF8, + VolumeLanguageEnUs, + VolumeLanguageEnUsUTF8, + VolumeLanguageEs, + VolumeLanguageEsUTF8, + VolumeLanguageFi, + VolumeLanguageFiUTF8, + VolumeLanguageFr, + VolumeLanguageFrUTF8, + VolumeLanguageHe, + VolumeLanguageHeUTF8, + VolumeLanguageHr, + VolumeLanguageHrUTF8, + VolumeLanguageHu, + VolumeLanguageHuUTF8, + VolumeLanguageIt, + VolumeLanguageItUTF8, + VolumeLanguageJa, + VolumeLanguageJaJp932, + VolumeLanguageJaJp932UTF8, + VolumeLanguageJaJpPck, + VolumeLanguageJaJpPckUTF8, + VolumeLanguageJaJpPckV2, + VolumeLanguageJaJpPckV2UTF8, + VolumeLanguageJaUTF8, + VolumeLanguageJaV1, + VolumeLanguageJaV1UTF8, + VolumeLanguageKo, + VolumeLanguageKoUTF8, + VolumeLanguageNl, + VolumeLanguageNlUTF8, + VolumeLanguageNo, + VolumeLanguageNoUTF8, + VolumeLanguagePl, + VolumeLanguagePlUTF8, + VolumeLanguagePt, + VolumeLanguagePtUTF8, + VolumeLanguageRo, + VolumeLanguageRoUTF8, + VolumeLanguageRu, + VolumeLanguageRuUTF8, + VolumeLanguageSk, + VolumeLanguageSkUTF8, + VolumeLanguageSl, + VolumeLanguageSlUTF8, + VolumeLanguageSv, + VolumeLanguageSvUTF8, + VolumeLanguageTr, + VolumeLanguageTrUTF8, + VolumeLanguageUTF8Mb4, + VolumeLanguageZh, + VolumeLanguageZhGbk, + VolumeLanguageZhGbkUTF8, + VolumeLanguageZhTw, + VolumeLanguageZhTwBig5, + VolumeLanguageZhTwBig5UTF8, + VolumeLanguageZhTwUTF8, + VolumeLanguageZhUTF8, + } +} + // VolumeStorageToNetworkProximity - Provides storage to network proximity information for the volume. type VolumeStorageToNetworkProximity string diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/accounts_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/accounts_server.go index e570d6dbe421..874830b66381 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/accounts_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/accounts_server.go @@ -19,11 +19,16 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" "net/http" "net/url" + "reflect" "regexp" ) // AccountsServer is a fake server for instances of the armnetapp.AccountsClient type. type AccountsServer struct { + // BeginChangeKeyVault is the fake for method AccountsClient.BeginChangeKeyVault + // HTTP status codes to indicate success: http.StatusAccepted + BeginChangeKeyVault func(ctx context.Context, resourceGroupName string, accountName string, options *armnetapp.AccountsClientBeginChangeKeyVaultOptions) (resp azfake.PollerResponder[armnetapp.AccountsClientChangeKeyVaultResponse], errResp azfake.ErrorResponder) + // BeginCreateOrUpdate is the fake for method AccountsClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, accountName string, body armnetapp.Account, options *armnetapp.AccountsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armnetapp.AccountsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -36,6 +41,10 @@ type AccountsServer struct { // HTTP status codes to indicate success: http.StatusOK Get func(ctx context.Context, resourceGroupName string, accountName string, options *armnetapp.AccountsClientGetOptions) (resp azfake.Responder[armnetapp.AccountsClientGetResponse], errResp azfake.ErrorResponder) + // BeginGetChangeKeyVaultInformation is the fake for method AccountsClient.BeginGetChangeKeyVaultInformation + // HTTP status codes to indicate success: http.StatusAccepted + BeginGetChangeKeyVaultInformation func(ctx context.Context, resourceGroupName string, accountName string, options *armnetapp.AccountsClientBeginGetChangeKeyVaultInformationOptions) (resp azfake.PollerResponder[armnetapp.AccountsClientGetChangeKeyVaultInformationResponse], errResp azfake.ErrorResponder) + // NewListPager is the fake for method AccountsClient.NewListPager // HTTP status codes to indicate success: http.StatusOK NewListPager func(resourceGroupName string, options *armnetapp.AccountsClientListOptions) (resp azfake.PagerResponder[armnetapp.AccountsClientListResponse]) @@ -44,6 +53,10 @@ type AccountsServer struct { // HTTP status codes to indicate success: http.StatusOK NewListBySubscriptionPager func(options *armnetapp.AccountsClientListBySubscriptionOptions) (resp azfake.PagerResponder[armnetapp.AccountsClientListBySubscriptionResponse]) + // BeginMigrateEncryptionKey is the fake for method AccountsClient.BeginMigrateEncryptionKey + // HTTP status codes to indicate success: http.StatusAccepted + BeginMigrateEncryptionKey func(ctx context.Context, resourceGroupName string, accountName string, options *armnetapp.AccountsClientBeginMigrateEncryptionKeyOptions) (resp azfake.PollerResponder[armnetapp.AccountsClientMigrateEncryptionKeyResponse], errResp azfake.ErrorResponder) + // BeginRenewCredentials is the fake for method AccountsClient.BeginRenewCredentials // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginRenewCredentials func(ctx context.Context, resourceGroupName string, accountName string, options *armnetapp.AccountsClientBeginRenewCredentialsOptions) (resp azfake.PollerResponder[armnetapp.AccountsClientRenewCredentialsResponse], errResp azfake.ErrorResponder) @@ -58,26 +71,32 @@ type AccountsServer struct { // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAccountsServerTransport(srv *AccountsServer) *AccountsServerTransport { return &AccountsServerTransport{ - srv: srv, - beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetapp.AccountsClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[armnetapp.AccountsClientDeleteResponse]](), - newListPager: newTracker[azfake.PagerResponder[armnetapp.AccountsClientListResponse]](), - newListBySubscriptionPager: newTracker[azfake.PagerResponder[armnetapp.AccountsClientListBySubscriptionResponse]](), - beginRenewCredentials: newTracker[azfake.PollerResponder[armnetapp.AccountsClientRenewCredentialsResponse]](), - beginUpdate: newTracker[azfake.PollerResponder[armnetapp.AccountsClientUpdateResponse]](), + srv: srv, + beginChangeKeyVault: newTracker[azfake.PollerResponder[armnetapp.AccountsClientChangeKeyVaultResponse]](), + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetapp.AccountsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetapp.AccountsClientDeleteResponse]](), + beginGetChangeKeyVaultInformation: newTracker[azfake.PollerResponder[armnetapp.AccountsClientGetChangeKeyVaultInformationResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetapp.AccountsClientListResponse]](), + newListBySubscriptionPager: newTracker[azfake.PagerResponder[armnetapp.AccountsClientListBySubscriptionResponse]](), + beginMigrateEncryptionKey: newTracker[azfake.PollerResponder[armnetapp.AccountsClientMigrateEncryptionKeyResponse]](), + beginRenewCredentials: newTracker[azfake.PollerResponder[armnetapp.AccountsClientRenewCredentialsResponse]](), + beginUpdate: newTracker[azfake.PollerResponder[armnetapp.AccountsClientUpdateResponse]](), } } // AccountsServerTransport connects instances of armnetapp.AccountsClient to instances of AccountsServer. // Don't use this type directly, use NewAccountsServerTransport instead. type AccountsServerTransport struct { - srv *AccountsServer - beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetapp.AccountsClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[armnetapp.AccountsClientDeleteResponse]] - newListPager *tracker[azfake.PagerResponder[armnetapp.AccountsClientListResponse]] - newListBySubscriptionPager *tracker[azfake.PagerResponder[armnetapp.AccountsClientListBySubscriptionResponse]] - beginRenewCredentials *tracker[azfake.PollerResponder[armnetapp.AccountsClientRenewCredentialsResponse]] - beginUpdate *tracker[azfake.PollerResponder[armnetapp.AccountsClientUpdateResponse]] + srv *AccountsServer + beginChangeKeyVault *tracker[azfake.PollerResponder[armnetapp.AccountsClientChangeKeyVaultResponse]] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetapp.AccountsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetapp.AccountsClientDeleteResponse]] + beginGetChangeKeyVaultInformation *tracker[azfake.PollerResponder[armnetapp.AccountsClientGetChangeKeyVaultInformationResponse]] + newListPager *tracker[azfake.PagerResponder[armnetapp.AccountsClientListResponse]] + newListBySubscriptionPager *tracker[azfake.PagerResponder[armnetapp.AccountsClientListBySubscriptionResponse]] + beginMigrateEncryptionKey *tracker[azfake.PollerResponder[armnetapp.AccountsClientMigrateEncryptionKeyResponse]] + beginRenewCredentials *tracker[azfake.PollerResponder[armnetapp.AccountsClientRenewCredentialsResponse]] + beginUpdate *tracker[azfake.PollerResponder[armnetapp.AccountsClientUpdateResponse]] } // Do implements the policy.Transporter interface for AccountsServerTransport. @@ -92,16 +111,22 @@ func (a *AccountsServerTransport) Do(req *http.Request) (*http.Response, error) var err error switch method { + case "AccountsClient.BeginChangeKeyVault": + resp, err = a.dispatchBeginChangeKeyVault(req) case "AccountsClient.BeginCreateOrUpdate": resp, err = a.dispatchBeginCreateOrUpdate(req) case "AccountsClient.BeginDelete": resp, err = a.dispatchBeginDelete(req) case "AccountsClient.Get": resp, err = a.dispatchGet(req) + case "AccountsClient.BeginGetChangeKeyVaultInformation": + resp, err = a.dispatchBeginGetChangeKeyVaultInformation(req) case "AccountsClient.NewListPager": resp, err = a.dispatchNewListPager(req) case "AccountsClient.NewListBySubscriptionPager": resp, err = a.dispatchNewListBySubscriptionPager(req) + case "AccountsClient.BeginMigrateEncryptionKey": + resp, err = a.dispatchBeginMigrateEncryptionKey(req) case "AccountsClient.BeginRenewCredentials": resp, err = a.dispatchBeginRenewCredentials(req) case "AccountsClient.BeginUpdate": @@ -117,6 +142,60 @@ func (a *AccountsServerTransport) Do(req *http.Request) (*http.Response, error) return resp, nil } +func (a *AccountsServerTransport) dispatchBeginChangeKeyVault(req *http.Request) (*http.Response, error) { + if a.srv.BeginChangeKeyVault == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginChangeKeyVault not implemented")} + } + beginChangeKeyVault := a.beginChangeKeyVault.get(req) + if beginChangeKeyVault == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/changeKeyVault` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetapp.ChangeKeyVault](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + var options *armnetapp.AccountsClientBeginChangeKeyVaultOptions + if !reflect.ValueOf(body).IsZero() { + options = &armnetapp.AccountsClientBeginChangeKeyVaultOptions{ + Body: &body, + } + } + respr, errRespr := a.srv.BeginChangeKeyVault(req.Context(), resourceGroupNameParam, accountNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginChangeKeyVault = &respr + a.beginChangeKeyVault.add(req, beginChangeKeyVault) + } + + resp, err := server.PollerResponderNext(beginChangeKeyVault, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + a.beginChangeKeyVault.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginChangeKeyVault) { + a.beginChangeKeyVault.remove(req) + } + + return resp, nil +} + func (a *AccountsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { if a.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} @@ -242,6 +321,50 @@ func (a *AccountsServerTransport) dispatchGet(req *http.Request) (*http.Response return resp, nil } +func (a *AccountsServerTransport) dispatchBeginGetChangeKeyVaultInformation(req *http.Request) (*http.Response, error) { + if a.srv.BeginGetChangeKeyVaultInformation == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginGetChangeKeyVaultInformation not implemented")} + } + beginGetChangeKeyVaultInformation := a.beginGetChangeKeyVaultInformation.get(req) + if beginGetChangeKeyVaultInformation == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getKeyVaultStatus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + respr, errRespr := a.srv.BeginGetChangeKeyVaultInformation(req.Context(), resourceGroupNameParam, accountNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginGetChangeKeyVaultInformation = &respr + a.beginGetChangeKeyVaultInformation.add(req, beginGetChangeKeyVaultInformation) + } + + resp, err := server.PollerResponderNext(beginGetChangeKeyVaultInformation, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + a.beginGetChangeKeyVaultInformation.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginGetChangeKeyVaultInformation) { + a.beginGetChangeKeyVaultInformation.remove(req) + } + + return resp, nil +} + func (a *AccountsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} @@ -312,6 +435,60 @@ func (a *AccountsServerTransport) dispatchNewListBySubscriptionPager(req *http.R return resp, nil } +func (a *AccountsServerTransport) dispatchBeginMigrateEncryptionKey(req *http.Request) (*http.Response, error) { + if a.srv.BeginMigrateEncryptionKey == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginMigrateEncryptionKey not implemented")} + } + beginMigrateEncryptionKey := a.beginMigrateEncryptionKey.get(req) + if beginMigrateEncryptionKey == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/migrateEncryption` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetapp.EncryptionMigrationRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + var options *armnetapp.AccountsClientBeginMigrateEncryptionKeyOptions + if !reflect.ValueOf(body).IsZero() { + options = &armnetapp.AccountsClientBeginMigrateEncryptionKeyOptions{ + Body: &body, + } + } + respr, errRespr := a.srv.BeginMigrateEncryptionKey(req.Context(), resourceGroupNameParam, accountNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginMigrateEncryptionKey = &respr + a.beginMigrateEncryptionKey.add(req, beginMigrateEncryptionKey) + } + + resp, err := server.PollerResponderNext(beginMigrateEncryptionKey, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + a.beginMigrateEncryptionKey.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginMigrateEncryptionKey) { + a.beginMigrateEncryptionKey.remove(req) + } + + return resp, nil +} + func (a *AccountsServerTransport) dispatchBeginRenewCredentials(req *http.Request) (*http.Response, error) { if a.srv.BeginRenewCredentials == nil { return nil, &nonRetriableError{errors.New("fake for method BeginRenewCredentials not implemented")} diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/volumes_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/volumes_server.go index 1e57933f0bd7..fa51738153e8 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/volumes_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/volumes_server.go @@ -38,6 +38,10 @@ type VolumesServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginBreakReplication func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientBeginBreakReplicationOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientBreakReplicationResponse], errResp azfake.ErrorResponder) + // BeginCreateOnPremMigrationReplication is the fake for method VolumesClient.BeginCreateOnPremMigrationReplication + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateOnPremMigrationReplication func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientBeginCreateOnPremMigrationReplicationOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientCreateOnPremMigrationReplicationResponse], errResp azfake.ErrorResponder) + // BeginCreateOrUpdate is the fake for method VolumesClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body armnetapp.Volume, options *armnetapp.VolumesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -50,6 +54,10 @@ type VolumesServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginDeleteReplication func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientBeginDeleteReplicationOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientDeleteReplicationResponse], errResp azfake.ErrorResponder) + // BeginFinalizeOnPremMigration is the fake for method VolumesClient.BeginFinalizeOnPremMigration + // HTTP status codes to indicate success: http.StatusAccepted + BeginFinalizeOnPremMigration func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientBeginFinalizeOnPremMigrationOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientFinalizeOnPremMigrationResponse], errResp azfake.ErrorResponder) + // BeginFinalizeRelocation is the fake for method VolumesClient.BeginFinalizeRelocation // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginFinalizeRelocation func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientBeginFinalizeRelocationOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientFinalizeRelocationResponse], errResp azfake.ErrorResponder) @@ -70,6 +78,14 @@ type VolumesServer struct { // HTTP status codes to indicate success: http.StatusOK NewListReplicationsPager func(resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientListReplicationsOptions) (resp azfake.PagerResponder[armnetapp.VolumesClientListReplicationsResponse]) + // BeginPeerClusterForOnPremMigration is the fake for method VolumesClient.BeginPeerClusterForOnPremMigration + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginPeerClusterForOnPremMigration func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body armnetapp.PeerClusterForVolumeMigrationRequest, options *armnetapp.VolumesClientBeginPeerClusterForOnPremMigrationOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientPeerClusterForOnPremMigrationResponse], errResp azfake.ErrorResponder) + + // BeginPerformReplicationTransfer is the fake for method VolumesClient.BeginPerformReplicationTransfer + // HTTP status codes to indicate success: http.StatusAccepted + BeginPerformReplicationTransfer func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientBeginPerformReplicationTransferOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientPerformReplicationTransferResponse], errResp azfake.ErrorResponder) + // BeginPoolChange is the fake for method VolumesClient.BeginPoolChange // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginPoolChange func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body armnetapp.PoolChangeRequest, options *armnetapp.VolumesClientBeginPoolChangeOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientPoolChangeResponse], errResp azfake.ErrorResponder) @@ -110,6 +126,10 @@ type VolumesServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginRevertRelocation func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientBeginRevertRelocationOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientRevertRelocationResponse], errResp azfake.ErrorResponder) + // BeginSplitCloneFromParent is the fake for method VolumesClient.BeginSplitCloneFromParent + // HTTP status codes to indicate success: http.StatusAccepted + BeginSplitCloneFromParent func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientBeginSplitCloneFromParentOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientSplitCloneFromParentResponse], errResp azfake.ErrorResponder) + // BeginUpdate is the fake for method VolumesClient.BeginUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginUpdate func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body armnetapp.VolumePatch, options *armnetapp.VolumesClientBeginUpdateOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientUpdateResponse], errResp azfake.ErrorResponder) @@ -120,54 +140,64 @@ type VolumesServer struct { // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVolumesServerTransport(srv *VolumesServer) *VolumesServerTransport { return &VolumesServerTransport{ - srv: srv, - beginAuthorizeReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientAuthorizeReplicationResponse]](), - beginBreakFileLocks: newTracker[azfake.PollerResponder[armnetapp.VolumesClientBreakFileLocksResponse]](), - beginBreakReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientBreakReplicationResponse]](), - beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetapp.VolumesClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[armnetapp.VolumesClientDeleteResponse]](), - beginDeleteReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientDeleteReplicationResponse]](), - beginFinalizeRelocation: newTracker[azfake.PollerResponder[armnetapp.VolumesClientFinalizeRelocationResponse]](), - newListPager: newTracker[azfake.PagerResponder[armnetapp.VolumesClientListResponse]](), - beginListGetGroupIDListForLdapUser: newTracker[azfake.PollerResponder[armnetapp.VolumesClientListGetGroupIDListForLdapUserResponse]](), - newListReplicationsPager: newTracker[azfake.PagerResponder[armnetapp.VolumesClientListReplicationsResponse]](), - beginPoolChange: newTracker[azfake.PollerResponder[armnetapp.VolumesClientPoolChangeResponse]](), - beginPopulateAvailabilityZone: newTracker[azfake.PollerResponder[armnetapp.VolumesClientPopulateAvailabilityZoneResponse]](), - beginReInitializeReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientReInitializeReplicationResponse]](), - beginReestablishReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientReestablishReplicationResponse]](), - beginRelocate: newTracker[azfake.PollerResponder[armnetapp.VolumesClientRelocateResponse]](), - beginResetCifsPassword: newTracker[azfake.PollerResponder[armnetapp.VolumesClientResetCifsPasswordResponse]](), - beginResyncReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientResyncReplicationResponse]](), - beginRevert: newTracker[azfake.PollerResponder[armnetapp.VolumesClientRevertResponse]](), - beginRevertRelocation: newTracker[azfake.PollerResponder[armnetapp.VolumesClientRevertRelocationResponse]](), - beginUpdate: newTracker[azfake.PollerResponder[armnetapp.VolumesClientUpdateResponse]](), + srv: srv, + beginAuthorizeReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientAuthorizeReplicationResponse]](), + beginBreakFileLocks: newTracker[azfake.PollerResponder[armnetapp.VolumesClientBreakFileLocksResponse]](), + beginBreakReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientBreakReplicationResponse]](), + beginCreateOnPremMigrationReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientCreateOnPremMigrationReplicationResponse]](), + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetapp.VolumesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetapp.VolumesClientDeleteResponse]](), + beginDeleteReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientDeleteReplicationResponse]](), + beginFinalizeOnPremMigration: newTracker[azfake.PollerResponder[armnetapp.VolumesClientFinalizeOnPremMigrationResponse]](), + beginFinalizeRelocation: newTracker[azfake.PollerResponder[armnetapp.VolumesClientFinalizeRelocationResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetapp.VolumesClientListResponse]](), + beginListGetGroupIDListForLdapUser: newTracker[azfake.PollerResponder[armnetapp.VolumesClientListGetGroupIDListForLdapUserResponse]](), + newListReplicationsPager: newTracker[azfake.PagerResponder[armnetapp.VolumesClientListReplicationsResponse]](), + beginPeerClusterForOnPremMigration: newTracker[azfake.PollerResponder[armnetapp.VolumesClientPeerClusterForOnPremMigrationResponse]](), + beginPerformReplicationTransfer: newTracker[azfake.PollerResponder[armnetapp.VolumesClientPerformReplicationTransferResponse]](), + beginPoolChange: newTracker[azfake.PollerResponder[armnetapp.VolumesClientPoolChangeResponse]](), + beginPopulateAvailabilityZone: newTracker[azfake.PollerResponder[armnetapp.VolumesClientPopulateAvailabilityZoneResponse]](), + beginReInitializeReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientReInitializeReplicationResponse]](), + beginReestablishReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientReestablishReplicationResponse]](), + beginRelocate: newTracker[azfake.PollerResponder[armnetapp.VolumesClientRelocateResponse]](), + beginResetCifsPassword: newTracker[azfake.PollerResponder[armnetapp.VolumesClientResetCifsPasswordResponse]](), + beginResyncReplication: newTracker[azfake.PollerResponder[armnetapp.VolumesClientResyncReplicationResponse]](), + beginRevert: newTracker[azfake.PollerResponder[armnetapp.VolumesClientRevertResponse]](), + beginRevertRelocation: newTracker[azfake.PollerResponder[armnetapp.VolumesClientRevertRelocationResponse]](), + beginSplitCloneFromParent: newTracker[azfake.PollerResponder[armnetapp.VolumesClientSplitCloneFromParentResponse]](), + beginUpdate: newTracker[azfake.PollerResponder[armnetapp.VolumesClientUpdateResponse]](), } } // VolumesServerTransport connects instances of armnetapp.VolumesClient to instances of VolumesServer. // Don't use this type directly, use NewVolumesServerTransport instead. type VolumesServerTransport struct { - srv *VolumesServer - beginAuthorizeReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientAuthorizeReplicationResponse]] - beginBreakFileLocks *tracker[azfake.PollerResponder[armnetapp.VolumesClientBreakFileLocksResponse]] - beginBreakReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientBreakReplicationResponse]] - beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetapp.VolumesClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[armnetapp.VolumesClientDeleteResponse]] - beginDeleteReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientDeleteReplicationResponse]] - beginFinalizeRelocation *tracker[azfake.PollerResponder[armnetapp.VolumesClientFinalizeRelocationResponse]] - newListPager *tracker[azfake.PagerResponder[armnetapp.VolumesClientListResponse]] - beginListGetGroupIDListForLdapUser *tracker[azfake.PollerResponder[armnetapp.VolumesClientListGetGroupIDListForLdapUserResponse]] - newListReplicationsPager *tracker[azfake.PagerResponder[armnetapp.VolumesClientListReplicationsResponse]] - beginPoolChange *tracker[azfake.PollerResponder[armnetapp.VolumesClientPoolChangeResponse]] - beginPopulateAvailabilityZone *tracker[azfake.PollerResponder[armnetapp.VolumesClientPopulateAvailabilityZoneResponse]] - beginReInitializeReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientReInitializeReplicationResponse]] - beginReestablishReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientReestablishReplicationResponse]] - beginRelocate *tracker[azfake.PollerResponder[armnetapp.VolumesClientRelocateResponse]] - beginResetCifsPassword *tracker[azfake.PollerResponder[armnetapp.VolumesClientResetCifsPasswordResponse]] - beginResyncReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientResyncReplicationResponse]] - beginRevert *tracker[azfake.PollerResponder[armnetapp.VolumesClientRevertResponse]] - beginRevertRelocation *tracker[azfake.PollerResponder[armnetapp.VolumesClientRevertRelocationResponse]] - beginUpdate *tracker[azfake.PollerResponder[armnetapp.VolumesClientUpdateResponse]] + srv *VolumesServer + beginAuthorizeReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientAuthorizeReplicationResponse]] + beginBreakFileLocks *tracker[azfake.PollerResponder[armnetapp.VolumesClientBreakFileLocksResponse]] + beginBreakReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientBreakReplicationResponse]] + beginCreateOnPremMigrationReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientCreateOnPremMigrationReplicationResponse]] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetapp.VolumesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetapp.VolumesClientDeleteResponse]] + beginDeleteReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientDeleteReplicationResponse]] + beginFinalizeOnPremMigration *tracker[azfake.PollerResponder[armnetapp.VolumesClientFinalizeOnPremMigrationResponse]] + beginFinalizeRelocation *tracker[azfake.PollerResponder[armnetapp.VolumesClientFinalizeRelocationResponse]] + newListPager *tracker[azfake.PagerResponder[armnetapp.VolumesClientListResponse]] + beginListGetGroupIDListForLdapUser *tracker[azfake.PollerResponder[armnetapp.VolumesClientListGetGroupIDListForLdapUserResponse]] + newListReplicationsPager *tracker[azfake.PagerResponder[armnetapp.VolumesClientListReplicationsResponse]] + beginPeerClusterForOnPremMigration *tracker[azfake.PollerResponder[armnetapp.VolumesClientPeerClusterForOnPremMigrationResponse]] + beginPerformReplicationTransfer *tracker[azfake.PollerResponder[armnetapp.VolumesClientPerformReplicationTransferResponse]] + beginPoolChange *tracker[azfake.PollerResponder[armnetapp.VolumesClientPoolChangeResponse]] + beginPopulateAvailabilityZone *tracker[azfake.PollerResponder[armnetapp.VolumesClientPopulateAvailabilityZoneResponse]] + beginReInitializeReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientReInitializeReplicationResponse]] + beginReestablishReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientReestablishReplicationResponse]] + beginRelocate *tracker[azfake.PollerResponder[armnetapp.VolumesClientRelocateResponse]] + beginResetCifsPassword *tracker[azfake.PollerResponder[armnetapp.VolumesClientResetCifsPasswordResponse]] + beginResyncReplication *tracker[azfake.PollerResponder[armnetapp.VolumesClientResyncReplicationResponse]] + beginRevert *tracker[azfake.PollerResponder[armnetapp.VolumesClientRevertResponse]] + beginRevertRelocation *tracker[azfake.PollerResponder[armnetapp.VolumesClientRevertRelocationResponse]] + beginSplitCloneFromParent *tracker[azfake.PollerResponder[armnetapp.VolumesClientSplitCloneFromParentResponse]] + beginUpdate *tracker[azfake.PollerResponder[armnetapp.VolumesClientUpdateResponse]] } // Do implements the policy.Transporter interface for VolumesServerTransport. @@ -188,12 +218,16 @@ func (v *VolumesServerTransport) Do(req *http.Request) (*http.Response, error) { resp, err = v.dispatchBeginBreakFileLocks(req) case "VolumesClient.BeginBreakReplication": resp, err = v.dispatchBeginBreakReplication(req) + case "VolumesClient.BeginCreateOnPremMigrationReplication": + resp, err = v.dispatchBeginCreateOnPremMigrationReplication(req) case "VolumesClient.BeginCreateOrUpdate": resp, err = v.dispatchBeginCreateOrUpdate(req) case "VolumesClient.BeginDelete": resp, err = v.dispatchBeginDelete(req) case "VolumesClient.BeginDeleteReplication": resp, err = v.dispatchBeginDeleteReplication(req) + case "VolumesClient.BeginFinalizeOnPremMigration": + resp, err = v.dispatchBeginFinalizeOnPremMigration(req) case "VolumesClient.BeginFinalizeRelocation": resp, err = v.dispatchBeginFinalizeRelocation(req) case "VolumesClient.Get": @@ -204,6 +238,10 @@ func (v *VolumesServerTransport) Do(req *http.Request) (*http.Response, error) { resp, err = v.dispatchBeginListGetGroupIDListForLdapUser(req) case "VolumesClient.NewListReplicationsPager": resp, err = v.dispatchNewListReplicationsPager(req) + case "VolumesClient.BeginPeerClusterForOnPremMigration": + resp, err = v.dispatchBeginPeerClusterForOnPremMigration(req) + case "VolumesClient.BeginPerformReplicationTransfer": + resp, err = v.dispatchBeginPerformReplicationTransfer(req) case "VolumesClient.BeginPoolChange": resp, err = v.dispatchBeginPoolChange(req) case "VolumesClient.BeginPopulateAvailabilityZone": @@ -224,6 +262,8 @@ func (v *VolumesServerTransport) Do(req *http.Request) (*http.Response, error) { resp, err = v.dispatchBeginRevert(req) case "VolumesClient.BeginRevertRelocation": resp, err = v.dispatchBeginRevertRelocation(req) + case "VolumesClient.BeginSplitCloneFromParent": + resp, err = v.dispatchBeginSplitCloneFromParent(req) case "VolumesClient.BeginUpdate": resp, err = v.dispatchBeginUpdate(req) default: @@ -417,6 +457,58 @@ func (v *VolumesServerTransport) dispatchBeginBreakReplication(req *http.Request return resp, nil } +func (v *VolumesServerTransport) dispatchBeginCreateOnPremMigrationReplication(req *http.Request) (*http.Response, error) { + if v.srv.BeginCreateOnPremMigrationReplication == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOnPremMigrationReplication not implemented")} + } + beginCreateOnPremMigrationReplication := v.beginCreateOnPremMigrationReplication.get(req) + if beginCreateOnPremMigrationReplication == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/capacityPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/volumes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/createOnPremMigrationReplication` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + poolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("poolName")]) + if err != nil { + return nil, err + } + volumeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("volumeName")]) + if err != nil { + return nil, err + } + respr, errRespr := v.srv.BeginCreateOnPremMigrationReplication(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOnPremMigrationReplication = &respr + v.beginCreateOnPremMigrationReplication.add(req, beginCreateOnPremMigrationReplication) + } + + resp, err := server.PollerResponderNext(beginCreateOnPremMigrationReplication, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginCreateOnPremMigrationReplication.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOnPremMigrationReplication) { + v.beginCreateOnPremMigrationReplication.remove(req) + } + + return resp, nil +} + func (v *VolumesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} @@ -592,6 +684,58 @@ func (v *VolumesServerTransport) dispatchBeginDeleteReplication(req *http.Reques return resp, nil } +func (v *VolumesServerTransport) dispatchBeginFinalizeOnPremMigration(req *http.Request) (*http.Response, error) { + if v.srv.BeginFinalizeOnPremMigration == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginFinalizeOnPremMigration not implemented")} + } + beginFinalizeOnPremMigration := v.beginFinalizeOnPremMigration.get(req) + if beginFinalizeOnPremMigration == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/capacityPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/volumes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/finalizeOnPremMigration` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + poolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("poolName")]) + if err != nil { + return nil, err + } + volumeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("volumeName")]) + if err != nil { + return nil, err + } + respr, errRespr := v.srv.BeginFinalizeOnPremMigration(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginFinalizeOnPremMigration = &respr + v.beginFinalizeOnPremMigration.add(req, beginFinalizeOnPremMigration) + } + + resp, err := server.PollerResponderNext(beginFinalizeOnPremMigration, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + v.beginFinalizeOnPremMigration.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginFinalizeOnPremMigration) { + v.beginFinalizeOnPremMigration.remove(req) + } + + return resp, nil +} + func (v *VolumesServerTransport) dispatchBeginFinalizeRelocation(req *http.Request) (*http.Response, error) { if v.srv.BeginFinalizeRelocation == nil { return nil, &nonRetriableError{errors.New("fake for method BeginFinalizeRelocation not implemented")} @@ -832,6 +976,114 @@ func (v *VolumesServerTransport) dispatchNewListReplicationsPager(req *http.Requ return resp, nil } +func (v *VolumesServerTransport) dispatchBeginPeerClusterForOnPremMigration(req *http.Request) (*http.Response, error) { + if v.srv.BeginPeerClusterForOnPremMigration == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginPeerClusterForOnPremMigration not implemented")} + } + beginPeerClusterForOnPremMigration := v.beginPeerClusterForOnPremMigration.get(req) + if beginPeerClusterForOnPremMigration == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/capacityPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/volumes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerClusterForOnPremMigration` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetapp.PeerClusterForVolumeMigrationRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + poolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("poolName")]) + if err != nil { + return nil, err + } + volumeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("volumeName")]) + if err != nil { + return nil, err + } + respr, errRespr := v.srv.BeginPeerClusterForOnPremMigration(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginPeerClusterForOnPremMigration = &respr + v.beginPeerClusterForOnPremMigration.add(req, beginPeerClusterForOnPremMigration) + } + + resp, err := server.PollerResponderNext(beginPeerClusterForOnPremMigration, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginPeerClusterForOnPremMigration.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginPeerClusterForOnPremMigration) { + v.beginPeerClusterForOnPremMigration.remove(req) + } + + return resp, nil +} + +func (v *VolumesServerTransport) dispatchBeginPerformReplicationTransfer(req *http.Request) (*http.Response, error) { + if v.srv.BeginPerformReplicationTransfer == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginPerformReplicationTransfer not implemented")} + } + beginPerformReplicationTransfer := v.beginPerformReplicationTransfer.get(req) + if beginPerformReplicationTransfer == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/capacityPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/volumes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/performReplicationTransfer` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + poolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("poolName")]) + if err != nil { + return nil, err + } + volumeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("volumeName")]) + if err != nil { + return nil, err + } + respr, errRespr := v.srv.BeginPerformReplicationTransfer(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginPerformReplicationTransfer = &respr + v.beginPerformReplicationTransfer.add(req, beginPerformReplicationTransfer) + } + + resp, err := server.PollerResponderNext(beginPerformReplicationTransfer, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + v.beginPerformReplicationTransfer.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginPerformReplicationTransfer) { + v.beginPerformReplicationTransfer.remove(req) + } + + return resp, nil +} + func (v *VolumesServerTransport) dispatchBeginPoolChange(req *http.Request) (*http.Response, error) { if v.srv.BeginPoolChange == nil { return nil, &nonRetriableError{errors.New("fake for method BeginPoolChange not implemented")} @@ -1363,6 +1615,58 @@ func (v *VolumesServerTransport) dispatchBeginRevertRelocation(req *http.Request return resp, nil } +func (v *VolumesServerTransport) dispatchBeginSplitCloneFromParent(req *http.Request) (*http.Response, error) { + if v.srv.BeginSplitCloneFromParent == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginSplitCloneFromParent not implemented")} + } + beginSplitCloneFromParent := v.beginSplitCloneFromParent.get(req) + if beginSplitCloneFromParent == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/capacityPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/volumes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/splitCloneFromParent` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + poolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("poolName")]) + if err != nil { + return nil, err + } + volumeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("volumeName")]) + if err != nil { + return nil, err + } + respr, errRespr := v.srv.BeginSplitCloneFromParent(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginSplitCloneFromParent = &respr + v.beginSplitCloneFromParent.add(req, beginSplitCloneFromParent) + } + + resp, err := server.PollerResponderNext(beginSplitCloneFromParent, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + v.beginSplitCloneFromParent.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginSplitCloneFromParent) { + v.beginSplitCloneFromParent.remove(req) + } + + return resp, nil +} + func (v *VolumesServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response, error) { if v.srv.BeginUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdate not implemented")} diff --git a/sdk/resourcemanager/netapp/armnetapp/go.mod b/sdk/resourcemanager/netapp/armnetapp/go.mod index 0ab646bc1d51..a90737317d5a 100644 --- a/sdk/resourcemanager/netapp/armnetapp/go.mod +++ b/sdk/resourcemanager/netapp/armnetapp/go.mod @@ -2,20 +2,10 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7 go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.7.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect - github.com/golang-jwt/jwt/v5 v5.2.1 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect - golang.org/x/crypto v0.22.0 // indirect golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect ) diff --git a/sdk/resourcemanager/netapp/armnetapp/go.sum b/sdk/resourcemanager/netapp/armnetapp/go.sum index 453385ef9f88..ffdff03203f8 100644 --- a/sdk/resourcemanager/netapp/armnetapp/go.sum +++ b/sdk/resourcemanager/netapp/armnetapp/go.sum @@ -1,29 +1,12 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU= github.com/Azure/azure-sdk-for-go/sdk/internal v1.7.0 h1:rTfKOCZGy5ViVrlA74ZPE99a+SgoEE2K/yg3RyW9dFA= github.com/Azure/azure-sdk-for-go/sdk/internal v1.7.0/go.mod h1:4OG6tQ9EOP/MT0NMjDlRzWoVFxfu9rN9B2X+tlSVktg= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= -github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= -github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/netapp/armnetapp/models.go b/sdk/resourcemanager/netapp/armnetapp/models.go index 8acbab33ccc3..6eaf1ba1f334 100644 --- a/sdk/resourcemanager/netapp/armnetapp/models.go +++ b/sdk/resourcemanager/netapp/armnetapp/models.go @@ -93,9 +93,16 @@ type AccountProperties struct { // Encryption settings Encryption *AccountEncryption + // Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and + // only affect non ldap NFSv4 volumes. + NfsV4IDDomain *string + // READ-ONLY; Shows the status of disableShowmount for all volumes under the subscription, null equals false DisableShowmount *bool + // READ-ONLY; This will have true value only if account is Multiple AD enabled. + IsMultiAdEnabled *bool + // READ-ONLY; Azure lifecycle management ProvisioningState *string } @@ -507,6 +514,22 @@ type CapacityPoolPatch struct { Type *string } +// ChangeKeyVault - Change key vault request +type ChangeKeyVault struct { + // REQUIRED; The name of the key that should be used for encryption. + KeyName *string + + // REQUIRED; Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with customer-managed + // keys needs its own key vault private endpoint. + KeyVaultPrivateEndpoints []*KeyVaultPrivateEndpoint + + // REQUIRED; Azure resource ID of the key vault/managed HSM that should be used for encryption. + KeyVaultResourceID *string + + // REQUIRED; The URI of the key vault/managed HSM that should be used for encryption. + KeyVaultURI *string +} + // CheckAvailabilityResponse - Information regarding availability of a resource. type CheckAvailabilityResponse struct { // true indicates name is valid and available. false indicates the name is invalid, unavailable, or both. @@ -522,6 +545,13 @@ type CheckAvailabilityResponse struct { Reason *InAvailabilityReasonType } +// ClusterPeerCommandResponse - Information about cluster peering process +type ClusterPeerCommandResponse struct { + // A command that needs to be run on the external ONTAP to accept cluster peering. Will only be present if clusterPeeringStatus + // is pending + PeerAcceptCommand *string +} + // DailySchedule - Daily Schedule properties type DailySchedule struct { // Indicates which hour in UTC timezone a snapshot should be taken @@ -556,6 +586,15 @@ type EncryptionIdentity struct { PrincipalID *string } +// EncryptionMigrationRequest - Encryption migration request +type EncryptionMigrationRequest struct { + // REQUIRED; Identifier of the private endpoint to reach the Azure Key Vault + PrivateEndpointID *string + + // REQUIRED; Identifier for the virtual network + VirtualNetworkID *string +} + // ExportPolicyRule - Volume Export Policy Rule type ExportPolicyRule struct { // Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names @@ -613,6 +652,10 @@ type FilePathAvailabilityRequest struct { // REQUIRED; The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes SubnetID *string + + // The Azure Resource logical availability zone which is used within zone mapping lookup for the subscription and region. + // The lookup will retrieve the physical zone where volume is placed. + AvailabilityZone *string } // GetGroupIDListForLDAPUserRequest - Get group Id list for LDAP User request @@ -639,6 +682,16 @@ type HourlySchedule struct { UsedBytes *int64 } +// KeyVaultPrivateEndpoint - Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted +// with customer-managed keys needs its own key vault private endpoint. +type KeyVaultPrivateEndpoint struct { + // Identifier of the private endpoint to reach the Azure Key Vault + PrivateEndpointID *string + + // Identifier for the virtual network id + VirtualNetworkID *string +} + // KeyVaultProperties - Properties of key vault. type KeyVaultProperties struct { // REQUIRED; The name of KeyVault key. @@ -862,6 +915,15 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification } +// PeerClusterForVolumeMigrationRequest - Source cluster properties for a cluster peer request +type PeerClusterForVolumeMigrationRequest struct { + // REQUIRED; A list of IC-LIF IPs that can be used to connect to the on-prem cluster + PeerAddresses []*string + + // The full path to a volume that is to be migrated into ANF. Required for Migration volumes + RemotePath *RemotePath +} + // PlacementKeyValuePairs - Application specific parameters for the placement of volumes in the volume group type PlacementKeyValuePairs struct { // REQUIRED; Key for an application specific parameter for the placement of volumes in the volume group @@ -885,7 +947,7 @@ type PoolPatchProperties struct { // The qos type of the pool QosType *QosType - // Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 1099511627776). + // Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 4398046511104). Size *int64 } @@ -998,6 +1060,18 @@ type RelocateVolumeRequest struct { CreationToken *string } +// RemotePath - The full path to a volume that is to be migrated into ANF. Required for Migration volumes +type RemotePath struct { + // REQUIRED; The Path to a ONTAP Host + ExternalHostName *string + + // REQUIRED; The name of a server on the ONTAP Host + ServerName *string + + // REQUIRED; The name of a volume on the server + VolumeName *string +} + // Replication properties type Replication struct { // REQUIRED; The resource ID of the remote volume. @@ -1011,16 +1085,22 @@ type Replication struct { // Schedule ReplicationSchedule *ReplicationSchedule + + // READ-ONLY; UUID v4 used to identify the replication. + ReplicationID *string } // ReplicationObject - Replication properties type ReplicationObject struct { - // REQUIRED; The resource ID of the remote volume. + // REQUIRED; The resource ID of the remote volume. Required for cross region and cross zone replication RemoteVolumeResourceID *string // Indicates whether the local volume is the source or destination for the Volume Replication EndpointType *EndpointType + // The full path to a volume that is to be migrated into ANF. Required for Migration volumes + RemotePath *RemotePath + // The remote region for the other end of the Volume Replication. RemoteVolumeRegion *string @@ -1358,6 +1438,13 @@ type SubvolumesList struct { Value []*SubvolumeInfo } +// SvmPeerCommandResponse - Information about SVM peering process +type SvmPeerCommandResponse struct { + // A command that needs to be run on the external ONTAP to accept SVM peering. Will only be present if svmPeeringStatus is + // pending + SvmPeeringCommand *string +} + // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). @@ -1681,6 +1768,11 @@ type VolumeProperties struct { // on exceptional basis. Specified in bytes. UsageThreshold *int64 + // While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate the volume + // after split, it will be automatically resized, which will lead to increased + // billing. To accept capacity pool size auto grow and create a short term clone volume, set the property as accepted. + AcceptGrowCapacityPoolForShortTermCloneSplit *AcceptGrowCapacityPoolForShortTermCloneSplit + // Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose AvsDataStore *AvsDataStore @@ -1743,6 +1835,9 @@ type VolumeProperties struct { // = 'Microsoft.KeyVault'. KeyVaultPrivateEndpointResourceID *string + // Language supported for volume. + Language *VolumeLanguage + // Specifies whether LDAP is enabled or not for a given NFS volume. LdapEnabled *bool @@ -1799,7 +1894,8 @@ type VolumeProperties struct { // e.g. data, log VolumeSpecName *string - // What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection + // What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. For creating + // clone volume, set type to ShortTermClone VolumeType *string // READ-ONLY; Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel @@ -1826,6 +1922,9 @@ type VolumeProperties struct { // READ-ONLY; Unique FileSystem Identifier. FileSystemID *string + // READ-ONLY; Space shared by short term clone volume with parent volume in bytes. + InheritedSizeInBytes *int64 + // READ-ONLY; Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed // if volume quota is more than 4TiB. MaximumNumberOfFiles *int64 diff --git a/sdk/resourcemanager/netapp/armnetapp/models_serde.go b/sdk/resourcemanager/netapp/armnetapp/models_serde.go index f3ed9cf74a5c..ab4ddc693e49 100644 --- a/sdk/resourcemanager/netapp/armnetapp/models_serde.go +++ b/sdk/resourcemanager/netapp/armnetapp/models_serde.go @@ -197,6 +197,8 @@ func (a AccountProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "activeDirectories", a.ActiveDirectories) populate(objectMap, "disableShowmount", a.DisableShowmount) populate(objectMap, "encryption", a.Encryption) + populate(objectMap, "isMultiAdEnabled", a.IsMultiAdEnabled) + populate(objectMap, "nfsV4IDDomain", a.NfsV4IDDomain) populate(objectMap, "provisioningState", a.ProvisioningState) return json.Marshal(objectMap) } @@ -219,6 +221,12 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { case "encryption": err = unpopulate(val, "Encryption", &a.Encryption) delete(rawMsg, key) + case "isMultiAdEnabled": + err = unpopulate(val, "IsMultiAdEnabled", &a.IsMultiAdEnabled) + delete(rawMsg, key) + case "nfsV4IDDomain": + err = unpopulate(val, "NfsV4IDDomain", &a.NfsV4IDDomain) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) delete(rawMsg, key) @@ -1199,6 +1207,45 @@ func (c *CapacityPoolPatch) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ChangeKeyVault. +func (c ChangeKeyVault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyName", c.KeyName) + populate(objectMap, "keyVaultPrivateEndpoints", c.KeyVaultPrivateEndpoints) + populate(objectMap, "keyVaultResourceId", c.KeyVaultResourceID) + populate(objectMap, "keyVaultUri", c.KeyVaultURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ChangeKeyVault. +func (c *ChangeKeyVault) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyName": + err = unpopulate(val, "KeyName", &c.KeyName) + delete(rawMsg, key) + case "keyVaultPrivateEndpoints": + err = unpopulate(val, "KeyVaultPrivateEndpoints", &c.KeyVaultPrivateEndpoints) + delete(rawMsg, key) + case "keyVaultResourceId": + err = unpopulate(val, "KeyVaultResourceID", &c.KeyVaultResourceID) + delete(rawMsg, key) + case "keyVaultUri": + err = unpopulate(val, "KeyVaultURI", &c.KeyVaultURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CheckAvailabilityResponse. func (c CheckAvailabilityResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1234,6 +1281,33 @@ func (c *CheckAvailabilityResponse) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ClusterPeerCommandResponse. +func (c ClusterPeerCommandResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "peerAcceptCommand", c.PeerAcceptCommand) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPeerCommandResponse. +func (c *ClusterPeerCommandResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "peerAcceptCommand": + err = unpopulate(val, "PeerAcceptCommand", &c.PeerAcceptCommand) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DailySchedule. func (d DailySchedule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1335,6 +1409,37 @@ func (e *EncryptionIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EncryptionMigrationRequest. +func (e EncryptionMigrationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpointId", e.PrivateEndpointID) + populate(objectMap, "virtualNetworkId", e.VirtualNetworkID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionMigrationRequest. +func (e *EncryptionMigrationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpointId": + err = unpopulate(val, "PrivateEndpointID", &e.PrivateEndpointID) + delete(rawMsg, key) + case "virtualNetworkId": + err = unpopulate(val, "VirtualNetworkID", &e.VirtualNetworkID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ExportPolicyRule. func (e ExportPolicyRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1421,6 +1526,7 @@ func (e *ExportPolicyRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FilePathAvailabilityRequest. func (f FilePathAvailabilityRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "availabilityZone", f.AvailabilityZone) populate(objectMap, "name", f.Name) populate(objectMap, "subnetId", f.SubnetID) return json.Marshal(objectMap) @@ -1435,6 +1541,9 @@ func (f *FilePathAvailabilityRequest) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "availabilityZone": + err = unpopulate(val, "AvailabilityZone", &f.AvailabilityZone) + delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &f.Name) delete(rawMsg, key) @@ -1538,6 +1647,37 @@ func (h *HourlySchedule) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type KeyVaultPrivateEndpoint. +func (k KeyVaultPrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpointId", k.PrivateEndpointID) + populate(objectMap, "virtualNetworkId", k.VirtualNetworkID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultPrivateEndpoint. +func (k *KeyVaultPrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpointId": + err = unpopulate(val, "PrivateEndpointID", &k.PrivateEndpointID) + delete(rawMsg, key) + case "virtualNetworkId": + err = unpopulate(val, "VirtualNetworkID", &k.VirtualNetworkID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties. func (k KeyVaultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2092,6 +2232,37 @@ func (o *OperationProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type PeerClusterForVolumeMigrationRequest. +func (p PeerClusterForVolumeMigrationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "peerAddresses", p.PeerAddresses) + populate(objectMap, "remotePath", p.RemotePath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PeerClusterForVolumeMigrationRequest. +func (p *PeerClusterForVolumeMigrationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "peerAddresses": + err = unpopulate(val, "PeerAddresses", &p.PeerAddresses) + delete(rawMsg, key) + case "remotePath": + err = unpopulate(val, "RemotePath", &p.RemotePath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type PlacementKeyValuePairs. func (p PlacementKeyValuePairs) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2500,12 +2671,48 @@ func (r *RelocateVolumeRequest) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type RemotePath. +func (r RemotePath) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "externalHostName", r.ExternalHostName) + populate(objectMap, "serverName", r.ServerName) + populate(objectMap, "volumeName", r.VolumeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePath. +func (r *RemotePath) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "externalHostName": + err = unpopulate(val, "ExternalHostName", &r.ExternalHostName) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &r.ServerName) + delete(rawMsg, key) + case "volumeName": + err = unpopulate(val, "VolumeName", &r.VolumeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Replication. func (r Replication) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "endpointType", r.EndpointType) populate(objectMap, "remoteVolumeRegion", r.RemoteVolumeRegion) populate(objectMap, "remoteVolumeResourceId", r.RemoteVolumeResourceID) + populate(objectMap, "replicationId", r.ReplicationID) populate(objectMap, "replicationSchedule", r.ReplicationSchedule) return json.Marshal(objectMap) } @@ -2528,6 +2735,9 @@ func (r *Replication) UnmarshalJSON(data []byte) error { case "remoteVolumeResourceId": err = unpopulate(val, "RemoteVolumeResourceID", &r.RemoteVolumeResourceID) delete(rawMsg, key) + case "replicationId": + err = unpopulate(val, "ReplicationID", &r.ReplicationID) + delete(rawMsg, key) case "replicationSchedule": err = unpopulate(val, "ReplicationSchedule", &r.ReplicationSchedule) delete(rawMsg, key) @@ -2543,6 +2753,7 @@ func (r *Replication) UnmarshalJSON(data []byte) error { func (r ReplicationObject) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "endpointType", r.EndpointType) + populate(objectMap, "remotePath", r.RemotePath) populate(objectMap, "remoteVolumeRegion", r.RemoteVolumeRegion) populate(objectMap, "remoteVolumeResourceId", r.RemoteVolumeResourceID) populate(objectMap, "replicationId", r.ReplicationID) @@ -2562,6 +2773,9 @@ func (r *ReplicationObject) UnmarshalJSON(data []byte) error { case "endpointType": err = unpopulate(val, "EndpointType", &r.EndpointType) delete(rawMsg, key) + case "remotePath": + err = unpopulate(val, "RemotePath", &r.RemotePath) + delete(rawMsg, key) case "remoteVolumeRegion": err = unpopulate(val, "RemoteVolumeRegion", &r.RemoteVolumeRegion) delete(rawMsg, key) @@ -3455,6 +3669,33 @@ func (s *SubvolumesList) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SvmPeerCommandResponse. +func (s SvmPeerCommandResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "svmPeeringCommand", s.SvmPeeringCommand) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SvmPeerCommandResponse. +func (s *SvmPeerCommandResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "svmPeeringCommand": + err = unpopulate(val, "SvmPeeringCommand", &s.SvmPeeringCommand) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4196,6 +4437,7 @@ func (v *VolumePatchPropertiesExportPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VolumeProperties. func (v VolumeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "acceptGrowCapacityPoolForShortTermCloneSplit", v.AcceptGrowCapacityPoolForShortTermCloneSplit) populate(objectMap, "actualThroughputMibps", v.ActualThroughputMibps) populate(objectMap, "avsDataStore", v.AvsDataStore) populate(objectMap, "backupId", v.BackupID) @@ -4217,11 +4459,13 @@ func (v VolumeProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "exportPolicy", v.ExportPolicy) populate(objectMap, "fileAccessLogs", v.FileAccessLogs) populate(objectMap, "fileSystemId", v.FileSystemID) + populate(objectMap, "inheritedSizeInBytes", v.InheritedSizeInBytes) populate(objectMap, "isDefaultQuotaEnabled", v.IsDefaultQuotaEnabled) populate(objectMap, "isLargeVolume", v.IsLargeVolume) populate(objectMap, "isRestoring", v.IsRestoring) populate(objectMap, "kerberosEnabled", v.KerberosEnabled) populate(objectMap, "keyVaultPrivateEndpointResourceId", v.KeyVaultPrivateEndpointResourceID) + populate(objectMap, "language", v.Language) populate(objectMap, "ldapEnabled", v.LdapEnabled) populate(objectMap, "maximumNumberOfFiles", v.MaximumNumberOfFiles) populate(objectMap, "mountTargets", v.MountTargets) @@ -4262,6 +4506,9 @@ func (v *VolumeProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "acceptGrowCapacityPoolForShortTermCloneSplit": + err = unpopulate(val, "AcceptGrowCapacityPoolForShortTermCloneSplit", &v.AcceptGrowCapacityPoolForShortTermCloneSplit) + delete(rawMsg, key) case "actualThroughputMibps": err = unpopulate(val, "ActualThroughputMibps", &v.ActualThroughputMibps) delete(rawMsg, key) @@ -4325,6 +4572,9 @@ func (v *VolumeProperties) UnmarshalJSON(data []byte) error { case "fileSystemId": err = unpopulate(val, "FileSystemID", &v.FileSystemID) delete(rawMsg, key) + case "inheritedSizeInBytes": + err = unpopulate(val, "InheritedSizeInBytes", &v.InheritedSizeInBytes) + delete(rawMsg, key) case "isDefaultQuotaEnabled": err = unpopulate(val, "IsDefaultQuotaEnabled", &v.IsDefaultQuotaEnabled) delete(rawMsg, key) @@ -4340,6 +4590,9 @@ func (v *VolumeProperties) UnmarshalJSON(data []byte) error { case "keyVaultPrivateEndpointResourceId": err = unpopulate(val, "KeyVaultPrivateEndpointResourceID", &v.KeyVaultPrivateEndpointResourceID) delete(rawMsg, key) + case "language": + err = unpopulate(val, "Language", &v.Language) + delete(rawMsg, key) case "ldapEnabled": err = unpopulate(val, "LdapEnabled", &v.LdapEnabled) delete(rawMsg, key) diff --git a/sdk/resourcemanager/netapp/armnetapp/operations_client.go b/sdk/resourcemanager/netapp/armnetapp/operations_client.go index 00ae61aa32ec..a6f46c9ed77a 100644 --- a/sdk/resourcemanager/netapp/armnetapp/operations_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Microsoft.NetApp Rest API operations // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -73,7 +73,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/netapp/armnetapp/operations_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/operations_client_example_test.go deleted file mode 100644 index 67e20faf39e2..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/operations_client_example_test.go +++ /dev/null @@ -1,1562 +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 armnetapp_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/OperationList.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 := armnetapp.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 = armnetapp.OperationListResult{ - // Value: []*armnetapp.Operation{ - // { - // Name: to.Ptr("Microsoft.NetApp/register/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Subscription Registration Action"), - // Operation: to.Ptr("Subscription Registration Action"), - // Provider: to.Ptr("Microsoft.NetApp"), - // Resource: to.Ptr("Subscription"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a volume resource."), - // Operation: to.Ptr("Read volume resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Writes a volume resource."), - // Operation: to.Ptr("Write volume resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/delete"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Deletes a volume resource."), - // Operation: to.Ptr("Delete volume resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/Revert/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Revert volume to specific snapshot"), - // Operation: to.Ptr("Revert volume resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/BreakReplication/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Break volume replication relations"), - // Operation: to.Ptr("Break volume replication resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/ReplicationStatus/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads the statuses of the Volume Replication."), - // Operation: to.Ptr("Read Volume Replication Status."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/ListReplications/action"), - // Display: &armnetapp.OperationDisplay{ - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/ReInitializeReplication/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Attempts to re-initialize an uninitialized replication"), - // Operation: to.Ptr("Re-Initialize replication"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Gets the available metrics for Volume resource."), - // Operation: to.Ptr("Read volume metric definitions."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armnetapp.OperationProperties{ - // ServiceSpecification: &armnetapp.ServiceSpecification{ - // MetricSpecifications: []*armnetapp.MetricSpecification{ - // { - // Name: to.Ptr("AverageReadLatency"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Average read latency in milliseconds per operation"), - // DisplayName: to.Ptr("Average read latency"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("AverageReadLatency"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("MilliSeconds"), - // }, - // { - // Name: to.Ptr("AverageWriteLatency"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Average write latency in milliseconds per operation"), - // DisplayName: to.Ptr("Average write latency"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("AverageWriteLatency"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("MilliSeconds"), - // }, - // { - // Name: to.Ptr("VolumeLogicalSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Logical size of the volume (used bytes)"), - // DisplayName: to.Ptr("Volume Consumed Size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumeLogicalSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("VolumeSnapshotSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Size of all snapshots in volume"), - // DisplayName: to.Ptr("Volume snapshot size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumeSnapshotSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("ReadIops"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Read In/out operations per second"), - // DisplayName: to.Ptr("Read iops"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("ReadIops"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("CountPerSecond"), - // }, - // { - // Name: to.Ptr("WriteIops"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Write In/out operations per second"), - // DisplayName: to.Ptr("Write iops"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("WriteIops"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("CountPerSecond"), - // }, - // { - // Name: to.Ptr("VolumeAllocatedSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("The provisioned size of a volume"), - // DisplayName: to.Ptr("Volume allocated size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumeAllocatedSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("VolumeCoolTierSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Volume Footprint for Cool Tier"), - // DisplayName: to.Ptr("Volume cool tier size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumeCoolTierSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("VolumeCoolTierDataReadSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Data read in using GET per volume"), - // DisplayName: to.Ptr("Volume cool tier data read size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumeCoolTierDataReadSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("VolumeCoolTierDataWriteSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Data tiered out using PUT per volume"), - // DisplayName: to.Ptr("Volume cool tier data write size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumeCoolTierDataWriteSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("XregionReplicationLastTransferDuration"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("The amount of time in seconds it took for the last transfer to complete."), - // DisplayName: to.Ptr("Volume replication last transfer duration"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("XregionReplicationLastTransferDuration"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Seconds"), - // }, - // { - // Name: to.Ptr("XregionReplicationLastTransferSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("The total number of bytes transferred as part of the last transfer."), - // DisplayName: to.Ptr("Volume replication last transfer size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("XregionReplicationLastTransferSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("XregionReplicationHealthy"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Condition of the relationship, 1 or 0."), - // DisplayName: to.Ptr("Is volume replication status healthy"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("XregionReplicationHealthy"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("XregionReplicationLagTime"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("The amount of time in seconds by which the data on the mirror lags behind the source."), - // DisplayName: to.Ptr("Volume replication lag time"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("XregionReplicationLagTime"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Seconds"), - // }, - // { - // Name: to.Ptr("XregionReplicationTotalTransferBytes"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Cumulative bytes transferred for the relationship."), - // DisplayName: to.Ptr("Volume replication total transfer"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("XregionReplicationTotalTransferBytes"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("XregionReplicationRelationshipProgress"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Total amount of data transferred for the current transfer operation."), - // DisplayName: to.Ptr("Volume replication progress"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("XregionReplicationRelationshipProgress"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("XregionReplicationRelationshipTransferring"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Whether the status of the Volume Replication is 'transferring'."), - // DisplayName: to.Ptr("Is volume replication transferring"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("XregionReplicationRelationshipTransferring"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("CbsVolumeLogicalBackupBytes"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Total bytes backed up for this Volume."), - // DisplayName: to.Ptr("Volume Backup Bytes"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("CbsVolumeLogicalBackupBytes"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("CbsVolumeProtected"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Is backup enabled for the volume? 1 if yes, 0 if no."), - // DisplayName: to.Ptr("Is Volume Backup Enabled"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("CbsVolumeProtected"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("CbsVolumeBackupActive"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Is the backup policy suspended for the volume? 0 if yes, 1 if no."), - // DisplayName: to.Ptr("Is Volume Backup suspended"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("CbsVolumeBackupActive"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("CbsVolumeOperationTransferredBytes"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Total bytes transferred for last backup or restore operation."), - // DisplayName: to.Ptr("Volume Backup Last Transferred Bytes"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("CbsVolumeOperationTransferredBytes"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("CbsVolumeOperationComplete"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Did the last volume backup or restore operation complete successfully? 1 if yes, 0 if no."), - // DisplayName: to.Ptr("Is Volume Backup Operation Complete"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("CbsVolumeOperationComplete"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("VolumeConsumedSizePercentage"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("The percentage of the volume consumed including snapshots."), - // DisplayName: to.Ptr("Percentage Volume Consumed Size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumeConsumedSizePercentage"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Percent"), - // }, - // { - // Name: to.Ptr("OtherThroughput"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Other throughput (that is not read or write) in bytes per second"), - // DisplayName: to.Ptr("Other throughput"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("OtherThroughput"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("BytesPerSecond"), - // }, - // { - // Name: to.Ptr("ReadThroughput"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Read throughput in bytes per second"), - // DisplayName: to.Ptr("Read throughput"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("ReadThroughput"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("BytesPerSecond"), - // }, - // { - // Name: to.Ptr("TotalThroughput"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Sum of all throughput in bytes per second"), - // DisplayName: to.Ptr("Total throughput"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("TotalThroughput"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("BytesPerSecond"), - // }, - // { - // Name: to.Ptr("WriteThroughput"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Write throughput in bytes per second"), - // DisplayName: to.Ptr("Write throughput"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("WriteThroughput"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("BytesPerSecond"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/AuthorizeReplication/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Authorize the source volume replication"), - // Operation: to.Ptr("Authorize Replication"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/ResyncReplication/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Resync the replication on the destination volume"), - // Operation: to.Ptr("Resync Replication"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/DeleteReplication/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Delete the replication on the destination volume"), - // Operation: to.Ptr("Delete Replication"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/ReplicationStatus/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads the statuses of the Volume Replication."), - // Operation: to.Ptr("Read Volume Replication Status."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/MountTargets/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a mount target resource."), - // Operation: to.Ptr("Read mount target resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/BackupStatus/read"), - // Display: &armnetapp.OperationDisplay{ - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/RestoreStatus/read"), - // Display: &armnetapp.OperationDisplay{ - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/PoolChange/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Moves volume to another pool."), - // Operation: to.Ptr("Change pool for volume"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/RelocateVolume/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Relocate volume to a new stamp."), - // Operation: to.Ptr("Relocate volume to a new stamp."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/FinalizeRelocation/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Finalize relocation by cleaning up the old volume."), - // Operation: to.Ptr("Finalize relocation of volume."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/RevertRelocation/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Revert the relocation and revert back to the old volume."), - // Operation: to.Ptr("Revert the relocation of volume."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads an account resource."), - // Operation: to.Ptr("Read account resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Accounts resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Writes an account resource."), - // Operation: to.Ptr("Write account resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Accounts resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/delete"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Deletes a account resource."), - // Operation: to.Ptr("Delete account resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Accounts resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/RenewCredentials/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Renews MSI credentials of account, if account has MSI credentials that are due for renewal."), - // Operation: to.Ptr("Renew MSI credentials, if possible."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Accounts resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a pool resource."), - // Operation: to.Ptr("Read pool resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Pools resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Writes a pool resource."), - // Operation: to.Ptr("Write pool resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Pools resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/delete"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Deletes a pool resource."), - // Operation: to.Ptr("Delete pool resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Pools resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Gets the available metrics for Volume resource."), - // Operation: to.Ptr("Read volume metric definitions."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Pools resource type"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armnetapp.OperationProperties{ - // ServiceSpecification: &armnetapp.ServiceSpecification{ - // MetricSpecifications: []*armnetapp.MetricSpecification{ - // { - // Name: to.Ptr("VolumePoolAllocatedUsed"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Allocated used size of the pool"), - // DisplayName: to.Ptr("Pool Allocated To Volume Size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumePoolAllocatedUsed"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("VolumePoolTotalLogicalSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Sum of the logical size of all the volumes belonging to the pool"), - // DisplayName: to.Ptr("Pool Consumed Size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumePoolTotalLogicalSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage), - // to.Ptr(armnetapp.MetricAggregationType("Total"))}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("VolumePoolAllocatedSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Provisioned size of this pool"), - // DisplayName: to.Ptr("Pool Allocated Size"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumePoolAllocatedSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage), - // to.Ptr(armnetapp.MetricAggregationType("Total"))}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("VolumePoolTotalSnapshotSize"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Sum of snapshot size of all volumes in this pool"), - // DisplayName: to.Ptr("Total Snapshot size for the pool"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumePoolTotalSnapshotSize"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("VolumePoolProvisionedThroughput"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Provisioned throughput of this pool"), - // DisplayName: to.Ptr("Provisioned throughput for the pool"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumePoolProvisionedThroughput"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("BytesPerSecond"), - // }, - // { - // Name: to.Ptr("VolumePoolAllocatedToVolumeThroughput"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armnetapp.Dimension{ - // }, - // DisplayDescription: to.Ptr("Sum of the throughput of all the volumes belonging to the pool"), - // DisplayName: to.Ptr("Pool allocated throughput"), - // EnableRegionalMdmAccount: to.Ptr(true), - // FillGapWithZero: to.Ptr(false), - // InternalMetricName: to.Ptr("VolumePoolAllocatedToVolumeThroughput"), - // IsInternal: to.Ptr(false), - // SourceMdmAccount: to.Ptr("MicrosoftNetAppShoebox2"), - // SourceMdmNamespace: to.Ptr("NetAppUsageAndMetrics"), - // SupportedAggregationTypes: []*armnetapp.MetricAggregationType{ - // to.Ptr(armnetapp.MetricAggregationTypeAverage)}, - // SupportedTimeGrainTypes: []*string{ - // to.Ptr("PT5M"), - // to.Ptr("PT15M"), - // to.Ptr("PT30M"), - // to.Ptr("PT1H"), - // to.Ptr("PT6H"), - // to.Ptr("PT12H"), - // to.Ptr("P1D")}, - // Unit: to.Ptr("BytesPerSecond"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/providers/Microsoft.Insights/logDefinitions/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Gets the log definitions for the resource."), - // Operation: to.Ptr("Read log definitions."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Pools resource type"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armnetapp.OperationProperties{ - // ServiceSpecification: &armnetapp.ServiceSpecification{ - // LogSpecifications: []*armnetapp.LogSpecification{ - // { - // Name: to.Ptr("Autoscale"), - // DisplayName: to.Ptr("Capacity Pool Autoscaled"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource."), - // Operation: to.Ptr("Read diagnostic setting."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Pools resource type"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), - // Operation: to.Ptr("Write diagnostic setting."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Pools resource type"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a snapshot resource."), - // Operation: to.Ptr("Read snapshot resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Snapshots resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Writes a snapshot resource."), - // Operation: to.Ptr("Write snapshot resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Snapshots resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots/delete"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Deletes a snapshot resource."), - // Operation: to.Ptr("Delete snapshot resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Snapshots resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots/RestoreFiles/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Restores files from a snapshot resource"), - // Operation: to.Ptr("Single File Snapshot Restore"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Snapshots resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/subvolumes/read"), - // Display: &armnetapp.OperationDisplay{ - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Subvolume resource type."), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/subvolumes/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Write a subvolume resource."), - // Operation: to.Ptr("Write subvolume Resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Subvolume resource type."), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/subvolumes/delete"), - // Display: &armnetapp.OperationDisplay{ - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Subvolume resource type."), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/subvolumes/GetMetadata/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Read subvolume metadata resource."), - // Operation: to.Ptr("Subvolume Metadata resource."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Subvolume resource type."), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/snapshotPolicies/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a snapshot policy resource."), - // Operation: to.Ptr("Read snapshot policy resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Snapshot Policies resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/snapshotPolicies/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Writes a snapshot policy resource."), - // Operation: to.Ptr("Write snapshot policy resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Snapshot Policies resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/snapshotPolicies/delete"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Deletes a snapshot policy resource."), - // Operation: to.Ptr("Delete snapshot policy resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Snapshot Policies resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/snapshotPolicies/Volumes/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("List volumes connected to snapshot policy"), - // Operation: to.Ptr("List connected volumes"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Snapshot Policies resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/snapshotPolicies/ListVolumes/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("List volumes connected to snapshot policy"), - // Operation: to.Ptr("List connected volumes"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Snapshot Policies resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a backup resource."), - // Operation: to.Ptr("Read backup resource."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Backup resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Writes a backup resource."), - // Operation: to.Ptr("Write backup resource."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Backup resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups/delete"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Deletes a backup resource."), - // Operation: to.Ptr("Delete backup resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Backup resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/backupPolicies/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a backup policy resource."), - // Operation: to.Ptr("Read backup policy resource."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Backup Policy resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/backupPolicies/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Writes a backup policy resource."), - // Operation: to.Ptr("Write backup policy resource."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Backup Policy resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/backupPolicies/delete"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Deletes a backup policy resource."), - // Operation: to.Ptr("Delete backup policy resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Backup Policy resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/vaults/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a vault resource."), - // Operation: to.Ptr("Read vault resource."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Vault resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/accountBackups/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads an account backup resource."), - // Operation: to.Ptr("Read an account backup resource."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Account backup resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/accountBackups/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Writes an account backup resource."), - // Operation: to.Ptr("Write an account backup resource."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Account backup resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/accountBackups/delete"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Deletes an account backup resource."), - // Operation: to.Ptr("Delete an account backup resource."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Account backup resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/volumeGroups/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a volume group resource."), - // Operation: to.Ptr("Read volume group resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volume Group resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/volumeGroups/write"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Writes a volume group resource."), - // Operation: to.Ptr("Write volume group resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volume Group resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/netAppAccounts/volumeGroups/delete"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Deletes a volume group resource."), - // Operation: to.Ptr("Delete volume group resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volume Group resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/locations/quotaLimits/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a Quotalimit resource type."), - // Operation: to.Ptr("Read QuotaLimit resource type"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("QuotaLimit resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/Operations/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads an operation resources."), - // Operation: to.Ptr("Read operation resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Operations resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/locations/operationresults/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads an operation result resource."), - // Operation: to.Ptr("Read operation result resource"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Operation results resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/locations/read"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Reads a location wide operation."), - // Operation: to.Ptr("Read location wide operation"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Location wide operation"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/locations/checknameavailability/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Check if resource name is available"), - // Operation: to.Ptr("Check if resource name is available"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("NetApp resources"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/locations/checkfilepathavailability/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Check if file path is available"), - // Operation: to.Ptr("Check if file path is available"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Volumes resource type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/unregister/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Unregisters Subscription with Microsoft.NetApp resource provider"), - // Operation: to.Ptr("Unregister Subscription for Azure NetApp Files"), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("Subscription"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.NetApp/locations/checkinventory/action"), - // Display: &armnetapp.OperationDisplay{ - // Description: to.Ptr("Checks ReservedCapacity inventory."), - // Operation: to.Ptr("Checks ReservedCapacity inventory."), - // Provider: to.Ptr("Microsoft.NetApp Resource Provider"), - // Resource: to.Ptr("ReservedCapacity reservation resource."), - // }, - // Origin: to.Ptr("user,system"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/netapp/armnetapp/options.go b/sdk/resourcemanager/netapp/armnetapp/options.go index b62c0e57bb8a..26ec12267b13 100644 --- a/sdk/resourcemanager/netapp/armnetapp/options.go +++ b/sdk/resourcemanager/netapp/armnetapp/options.go @@ -8,6 +8,15 @@ package armnetapp +// AccountsClientBeginChangeKeyVaultOptions contains the optional parameters for the AccountsClient.BeginChangeKeyVault method. +type AccountsClientBeginChangeKeyVaultOptions struct { + // The required parameters to perform encryption migration. + Body *ChangeKeyVault + + // Resumes the LRO from the provided token. + ResumeToken string +} + // AccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the AccountsClient.BeginCreateOrUpdate method. type AccountsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. @@ -20,6 +29,23 @@ type AccountsClientBeginDeleteOptions struct { ResumeToken string } +// AccountsClientBeginGetChangeKeyVaultInformationOptions contains the optional parameters for the AccountsClient.BeginGetChangeKeyVaultInformation +// method. +type AccountsClientBeginGetChangeKeyVaultInformationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AccountsClientBeginMigrateEncryptionKeyOptions contains the optional parameters for the AccountsClient.BeginMigrateEncryptionKey +// method. +type AccountsClientBeginMigrateEncryptionKeyOptions struct { + // The required parameters to perform encryption migration. + Body *EncryptionMigrationRequest + + // Resumes the LRO from the provided token. + ResumeToken string +} + // AccountsClientBeginRenewCredentialsOptions contains the optional parameters for the AccountsClient.BeginRenewCredentials // method. type AccountsClientBeginRenewCredentialsOptions struct { @@ -435,6 +461,13 @@ type VolumesClientBeginBreakReplicationOptions struct { ResumeToken string } +// VolumesClientBeginCreateOnPremMigrationReplicationOptions contains the optional parameters for the VolumesClient.BeginCreateOnPremMigrationReplication +// method. +type VolumesClientBeginCreateOnPremMigrationReplicationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // VolumesClientBeginCreateOrUpdateOptions contains the optional parameters for the VolumesClient.BeginCreateOrUpdate method. type VolumesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. @@ -457,6 +490,13 @@ type VolumesClientBeginDeleteReplicationOptions struct { ResumeToken string } +// VolumesClientBeginFinalizeOnPremMigrationOptions contains the optional parameters for the VolumesClient.BeginFinalizeOnPremMigration +// method. +type VolumesClientBeginFinalizeOnPremMigrationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // VolumesClientBeginFinalizeRelocationOptions contains the optional parameters for the VolumesClient.BeginFinalizeRelocation // method. type VolumesClientBeginFinalizeRelocationOptions struct { @@ -471,6 +511,20 @@ type VolumesClientBeginListGetGroupIDListForLdapUserOptions struct { ResumeToken string } +// VolumesClientBeginPeerClusterForOnPremMigrationOptions contains the optional parameters for the VolumesClient.BeginPeerClusterForOnPremMigration +// method. +type VolumesClientBeginPeerClusterForOnPremMigrationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VolumesClientBeginPerformReplicationTransferOptions contains the optional parameters for the VolumesClient.BeginPerformReplicationTransfer +// method. +type VolumesClientBeginPerformReplicationTransferOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // VolumesClientBeginPoolChangeOptions contains the optional parameters for the VolumesClient.BeginPoolChange method. type VolumesClientBeginPoolChangeOptions struct { // Resumes the LRO from the provided token. @@ -534,6 +588,13 @@ type VolumesClientBeginRevertRelocationOptions struct { ResumeToken string } +// VolumesClientBeginSplitCloneFromParentOptions contains the optional parameters for the VolumesClient.BeginSplitCloneFromParent +// method. +type VolumesClientBeginSplitCloneFromParentOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // VolumesClientBeginUpdateOptions contains the optional parameters for the VolumesClient.BeginUpdate method. type VolumesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. diff --git a/sdk/resourcemanager/netapp/armnetapp/pools_client.go b/sdk/resourcemanager/netapp/armnetapp/pools_client.go index 343474f57e8f..f9c0d1609815 100644 --- a/sdk/resourcemanager/netapp/armnetapp/pools_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/pools_client.go @@ -46,7 +46,7 @@ func NewPoolsClient(subscriptionID string, credential azcore.TokenCredential, op // BeginCreateOrUpdate - Create or Update a capacity pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -74,7 +74,7 @@ func (client *PoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou // CreateOrUpdate - Create or Update a capacity pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *PoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPool, options *PoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "PoolsClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *PoolsClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *PoolsClient) createOrUpdateCreateRequest(ctx context.Context, reso // BeginDelete - Delete the specified capacity pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -158,7 +158,7 @@ func (client *PoolsClient) BeginDelete(ctx context.Context, resourceGroupName st // Delete - Delete the specified capacity pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *PoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "PoolsClient.BeginDelete" @@ -204,7 +204,7 @@ func (client *PoolsClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -213,7 +213,7 @@ func (client *PoolsClient) deleteCreateRequest(ctx context.Context, resourceGrou // Get - Get details of the specified capacity pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -264,7 +264,7 @@ func (client *PoolsClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +281,7 @@ func (client *PoolsClient) getHandleResponse(resp *http.Response) (PoolsClientGe // NewListPager - List all capacity pools in the NetApp Account // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - options - PoolsClientListOptions contains the optional parameters for the PoolsClient.NewListPager method. @@ -328,7 +328,7 @@ func (client *PoolsClient) listCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,7 +346,7 @@ func (client *PoolsClient) listHandleResponse(resp *http.Response) (PoolsClientL // BeginUpdate - Patch the specified capacity pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -373,7 +373,7 @@ func (client *PoolsClient) BeginUpdate(ctx context.Context, resourceGroupName st // Update - Patch the specified capacity pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *PoolsClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPoolPatch, options *PoolsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "PoolsClient.BeginUpdate" @@ -419,7 +419,7 @@ func (client *PoolsClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/pools_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/pools_client_example_test.go deleted file mode 100644 index 368fa767b35b..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/pools_client_example_test.go +++ /dev/null @@ -1,201 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_List.json -func ExamplePoolsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPoolsClient().NewListPager("myRG", "account1", 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.CapacityPoolList = armnetapp.CapacityPoolList{ - // Value: []*armnetapp.CapacityPool{ - // { - // Name: to.Ptr("account1/pool1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.PoolProperties{ - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // ProvisioningState: to.Ptr("Succeeded"), - // QosType: to.Ptr(armnetapp.QosTypeAuto), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // Size: to.Ptr[int64](4398046511104), - // TotalThroughputMibps: to.Ptr[float32](281.474), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_Get.json -func ExamplePoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPoolsClient().Get(ctx, "myRG", "account1", "pool1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CapacityPool = armnetapp.CapacityPool{ - // Name: to.Ptr("account1/pool1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.PoolProperties{ - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // ProvisioningState: to.Ptr("Succeeded"), - // QosType: to.Ptr(armnetapp.QosTypeManual), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // Size: to.Ptr[int64](4398046511104), - // TotalThroughputMibps: to.Ptr[float32](281.474), - // UtilizedThroughputMibps: to.Ptr[float32](100.47), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_CreateOrUpdate.json -func ExamplePoolsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPoolsClient().BeginCreateOrUpdate(ctx, "myRG", "account1", "pool1", armnetapp.CapacityPool{ - Location: to.Ptr("eastus"), - Properties: &armnetapp.PoolProperties{ - QosType: to.Ptr(armnetapp.QosTypeAuto), - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - Size: to.Ptr[int64](4398046511104), - }, - }, 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.CapacityPool = armnetapp.CapacityPool{ - // Name: to.Ptr("account1/pool1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.PoolProperties{ - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // ProvisioningState: to.Ptr("Succeeded"), - // QosType: to.Ptr(armnetapp.QosTypeAuto), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // Size: to.Ptr[int64](4398046511104), - // TotalThroughputMibps: to.Ptr[float32](281.474), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_Update.json -func ExamplePoolsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPoolsClient().BeginUpdate(ctx, "myRG", "account1", "pool1", armnetapp.CapacityPoolPatch{}, 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.CapacityPool = armnetapp.CapacityPool{ - // Name: to.Ptr("account1/pool1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.PoolProperties{ - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // ProvisioningState: to.Ptr("Succeeded"), - // QosType: to.Ptr(armnetapp.QosTypeManual), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // Size: to.Ptr[int64](4398046511104), - // TotalThroughputMibps: to.Ptr[float32](281.474), - // UtilizedThroughputMibps: to.Ptr[float32](100.47), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_Delete.json -func ExamplePoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPoolsClient().BeginDelete(ctx, "myRG", "account1", "pool1", 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/netapp/armnetapp/resource_client.go b/sdk/resourcemanager/netapp/armnetapp/resource_client.go index 24c0bcd02505..cd576837d826 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resource_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/resource_client.go @@ -46,7 +46,7 @@ func NewResourceClient(subscriptionID string, credential azcore.TokenCredential, // CheckFilePathAvailability - Check if a file path is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - body - File path availability request. // - options - ResourceClientCheckFilePathAvailabilityOptions contains the optional parameters for the ResourceClient.CheckFilePathAvailability @@ -89,7 +89,7 @@ func (client *ResourceClient) checkFilePathAvailabilityCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -110,7 +110,7 @@ func (client *ResourceClient) checkFilePathAvailabilityHandleResponse(resp *http // CheckNameAvailability - Check if a resource name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - body - Name availability request. // - options - ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability @@ -153,7 +153,7 @@ func (client *ResourceClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -174,7 +174,7 @@ func (client *ResourceClient) checkNameAvailabilityHandleResponse(resp *http.Res // CheckQuotaAvailability - Check if a quota is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - body - Quota availability request. // - options - ResourceClientCheckQuotaAvailabilityOptions contains the optional parameters for the ResourceClient.CheckQuotaAvailability @@ -217,7 +217,7 @@ func (client *ResourceClient) checkQuotaAvailabilityCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -238,7 +238,7 @@ func (client *ResourceClient) checkQuotaAvailabilityHandleResponse(resp *http.Re // QueryNetworkSiblingSet - Get details of the specified network sibling set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - body - Network sibling set to query. // - options - ResourceClientQueryNetworkSiblingSetOptions contains the optional parameters for the ResourceClient.QueryNetworkSiblingSet @@ -281,7 +281,7 @@ func (client *ResourceClient) queryNetworkSiblingSetCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -302,7 +302,7 @@ func (client *ResourceClient) queryNetworkSiblingSetHandleResponse(resp *http.Re // QueryRegionInfo - Provides storage to network proximity and logical zone mapping information. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - options - ResourceClientQueryRegionInfoOptions contains the optional parameters for the ResourceClient.QueryRegionInfo // method. @@ -344,7 +344,7 @@ func (client *ResourceClient) queryRegionInfoCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -362,7 +362,7 @@ func (client *ResourceClient) queryRegionInfoHandleResponse(resp *http.Response) // BeginUpdateNetworkSiblingSet - Update the network features of the specified network sibling set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - body - Update for the specified network sibling set. // - options - ResourceClientBeginUpdateNetworkSiblingSetOptions contains the optional parameters for the ResourceClient.BeginUpdateNetworkSiblingSet @@ -388,7 +388,7 @@ func (client *ResourceClient) BeginUpdateNetworkSiblingSet(ctx context.Context, // UpdateNetworkSiblingSet - Update the network features of the specified network sibling set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *ResourceClient) updateNetworkSiblingSet(ctx context.Context, location string, body UpdateNetworkSiblingSetRequest, options *ResourceClientBeginUpdateNetworkSiblingSetOptions) (*http.Response, error) { var err error const operationName = "ResourceClient.BeginUpdateNetworkSiblingSet" @@ -426,7 +426,7 @@ func (client *ResourceClient) updateNetworkSiblingSetCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/resource_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/resource_client_example_test.go deleted file mode 100644 index 4ea916e01d97..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/resource_client_example_test.go +++ /dev/null @@ -1,229 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/CheckNameAvailability.json -func ExampleResourceClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewResourceClient().CheckNameAvailability(ctx, "eastus", armnetapp.ResourceNameAvailabilityRequest{ - Name: to.Ptr("accName"), - Type: to.Ptr(armnetapp.CheckNameResourceTypesMicrosoftNetAppNetAppAccounts), - ResourceGroup: to.Ptr("myRG"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckAvailabilityResponse = armnetapp.CheckAvailabilityResponse{ - // IsAvailable: to.Ptr(true), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/CheckFilePathAvailability.json -func ExampleResourceClient_CheckFilePathAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewResourceClient().CheckFilePathAvailability(ctx, "eastus", armnetapp.FilePathAvailabilityRequest{ - Name: to.Ptr("my-exact-filepth"), - SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckAvailabilityResponse = armnetapp.CheckAvailabilityResponse{ - // IsAvailable: to.Ptr(true), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/CheckQuotaAvailability.json -func ExampleResourceClient_CheckQuotaAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewResourceClient().CheckQuotaAvailability(ctx, "eastus", armnetapp.QuotaAvailabilityRequest{ - Name: to.Ptr("resource1"), - Type: to.Ptr(armnetapp.CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccounts), - ResourceGroup: to.Ptr("myRG"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckAvailabilityResponse = armnetapp.CheckAvailabilityResponse{ - // IsAvailable: to.Ptr(true), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/RegionInfo.json -func ExampleResourceClient_QueryRegionInfo() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewResourceClient().QueryRegionInfo(ctx, "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.RegionInfo = armnetapp.RegionInfo{ - // AvailabilityZoneMappings: []*armnetapp.RegionInfoAvailabilityZoneMappingsItem{ - // { - // AvailabilityZone: to.Ptr("1"), - // IsAvailable: to.Ptr(true), - // }}, - // StorageToNetworkProximity: to.Ptr(armnetapp.RegionStorageToNetworkProximityT2), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/NetworkSiblingSet_Query.json -func ExampleResourceClient_QueryNetworkSiblingSet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewResourceClient().QueryNetworkSiblingSet(ctx, "eastus", armnetapp.QueryNetworkSiblingSetRequest{ - NetworkSiblingSetID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca3333"), - SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.NetworkSiblingSet = armnetapp.NetworkSiblingSet{ - // NetworkFeatures: to.Ptr(armnetapp.NetworkFeaturesStandard), - // NetworkSiblingSetID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca3333"), - // NetworkSiblingSetStateID: to.Ptr("12345_44420.8001578125"), - // NicInfoList: []*armnetapp.NicInfo{ - // { - // IPAddress: to.Ptr("1.2.3.4"), - // VolumeResourceIDs: []*string{ - // to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume10"), - // to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume11")}, - // }, - // { - // IPAddress: to.Ptr("1.2.3.5"), - // VolumeResourceIDs: []*string{ - // to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account2/capacityPools/pool2/volumes/volume20"), - // to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account2/capacityPools/pool2/volumes/volume21")}, - // }, - // { - // IPAddress: to.Ptr("1.2.3.9"), - // VolumeResourceIDs: []*string{ - // }, - // }}, - // ProvisioningState: to.Ptr(armnetapp.NetworkSiblingSetProvisioningStateSucceeded), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/NetworkSiblingSet_Update.json -func ExampleResourceClient_BeginUpdateNetworkSiblingSet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewResourceClient().BeginUpdateNetworkSiblingSet(ctx, "eastus", armnetapp.UpdateNetworkSiblingSetRequest{ - NetworkFeatures: to.Ptr(armnetapp.NetworkFeaturesStandard), - NetworkSiblingSetID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca3333"), - NetworkSiblingSetStateID: to.Ptr("12345_44420.8001578125"), - SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), - }, 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.NetworkSiblingSet = armnetapp.NetworkSiblingSet{ - // NetworkFeatures: to.Ptr(armnetapp.NetworkFeaturesStandard), - // NetworkSiblingSetID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca3333"), - // NetworkSiblingSetStateID: to.Ptr("12345_44420.8001578125"), - // NicInfoList: []*armnetapp.NicInfo{ - // { - // IPAddress: to.Ptr("1.2.3.4"), - // VolumeResourceIDs: []*string{ - // to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume10"), - // to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume11")}, - // }, - // { - // IPAddress: to.Ptr("1.2.3.5"), - // VolumeResourceIDs: []*string{ - // to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account2/capacityPools/pool2/volumes/volume20"), - // to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account2/capacityPools/pool2/volumes/volume21")}, - // }, - // { - // IPAddress: to.Ptr("1.2.3.9"), - // VolumeResourceIDs: []*string{ - // }, - // }}, - // ProvisioningState: to.Ptr(armnetapp.NetworkSiblingSetProvisioningStateSucceeded), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), - // } -} diff --git a/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client.go b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client.go index bd24100063e8..7f4dccb9f55a 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client.go @@ -46,7 +46,7 @@ func NewResourceQuotaLimitsClient(subscriptionID string, credential azcore.Token // Get - Get the default and current subscription quota limit // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - quotaLimitName - The name of the Quota Limit // - options - ResourceQuotaLimitsClientGetOptions contains the optional parameters for the ResourceQuotaLimitsClient.Get method. @@ -92,7 +92,7 @@ func (client *ResourceQuotaLimitsClient) getCreateRequest(ctx context.Context, l return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -109,7 +109,7 @@ func (client *ResourceQuotaLimitsClient) getHandleResponse(resp *http.Response) // NewListPager - Get the default and current limits for quotas // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - options - ResourceQuotaLimitsClientListOptions contains the optional parameters for the ResourceQuotaLimitsClient.NewListPager // method. @@ -153,7 +153,7 @@ func (client *ResourceQuotaLimitsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client_example_test.go deleted file mode 100644 index ee0ae3afee83..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client_example_test.go +++ /dev/null @@ -1,147 +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 armnetapp_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/QuotaLimits_List.json -func ExampleResourceQuotaLimitsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewResourceQuotaLimitsClient().NewListPager("eastus", 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.SubscriptionQuotaItemList = armnetapp.SubscriptionQuotaItemList{ - // Value: []*armnetapp.SubscriptionQuotaItem{ - // { - // Name: to.Ptr("eastus/accountsPerSubscription"), - // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/quotaLimits/accountsPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ - // Default: to.Ptr[int32](10), - // Current: to.Ptr[int32](10), - // }, - // }, - // { - // Name: to.Ptr("eastus/poolsPerAccount"), - // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/quotaLimits/poolsPerAccount"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ - // Default: to.Ptr[int32](25), - // Current: to.Ptr[int32](25), - // }, - // }, - // { - // Name: to.Ptr("eastus/volumesPerPool"), - // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/quotaLimits/volumesPerPool"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ - // Default: to.Ptr[int32](500), - // Current: to.Ptr[int32](500), - // }, - // }, - // { - // Name: to.Ptr("eastus/snapshotsPerVolume"), - // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/quotaLimits/snapshotsPerVolume"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ - // Default: to.Ptr[int32](255), - // Current: to.Ptr[int32](255), - // }, - // }, - // { - // Name: to.Ptr("eastus/totalTiBsPerSubscription"), - // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalTiBsPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ - // Default: to.Ptr[int32](25), - // Current: to.Ptr[int32](1000), - // }, - // }, - // { - // Name: to.Ptr("eastus/totalDPVolumesPerSubscription"), - // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalDPVolumesPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ - // Default: to.Ptr[int32](10), - // Current: to.Ptr[int32](10), - // }, - // }, - // { - // Name: to.Ptr("eastus/totalVolumesPerSubscription"), - // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalVolumesPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ - // Default: to.Ptr[int32](500), - // Current: to.Ptr[int32](500), - // }, - // }, - // { - // Name: to.Ptr("eastus/totalCoolAccessVolumesPerSubscription"), - // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalCoolAccessVolumesPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ - // Default: to.Ptr[int32](10), - // Current: to.Ptr[int32](10), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/QuotaLimits_Get.json -func ExampleResourceQuotaLimitsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewResourceQuotaLimitsClient().Get(ctx, "eastus", "totalCoolAccessVolumesPerSubscription", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SubscriptionQuotaItem = armnetapp.SubscriptionQuotaItem{ - // Name: to.Ptr("eastus/totalCoolAccessVolumesPerSubscription"), - // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalCoolAccessVolumesPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ - // Default: to.Ptr[int32](10), - // Current: to.Ptr[int32](10), - // }, - // } -} diff --git a/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client.go b/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client.go index dc50439a1502..4a7cfb271fc3 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client.go @@ -46,7 +46,7 @@ func NewResourceRegionInfosClient(subscriptionID string, credential azcore.Token // Get - Provides storage to network proximity and logical zone mapping information. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - options - ResourceRegionInfosClientGetOptions contains the optional parameters for the ResourceRegionInfosClient.Get method. func (client *ResourceRegionInfosClient) Get(ctx context.Context, location string, options *ResourceRegionInfosClientGetOptions) (ResourceRegionInfosClientGetResponse, error) { @@ -87,7 +87,7 @@ func (client *ResourceRegionInfosClient) getCreateRequest(ctx context.Context, l return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -104,7 +104,7 @@ func (client *ResourceRegionInfosClient) getHandleResponse(resp *http.Response) // NewListPager - Provides region specific information. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - location - The name of the Azure region. // - options - ResourceRegionInfosClientListOptions contains the optional parameters for the ResourceRegionInfosClient.NewListPager // method. @@ -147,7 +147,7 @@ func (client *ResourceRegionInfosClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client_example_test.go deleted file mode 100644 index 6a1cce3e8e4e..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client_example_test.go +++ /dev/null @@ -1,108 +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 armnetapp_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/RegionInfos_List.json -func ExampleResourceRegionInfosClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewResourceRegionInfosClient().NewListPager("eastus", 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.RegionInfosList = armnetapp.RegionInfosList{ - // Value: []*armnetapp.RegionInfoResource{ - // { - // Name: to.Ptr("eastus/default"), - // Type: to.Ptr("Microsoft.NetApp/locations/regionInfos"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/regionInfos/default"), - // Properties: &armnetapp.RegionInfo{ - // AvailabilityZoneMappings: []*armnetapp.RegionInfoAvailabilityZoneMappingsItem{ - // { - // AvailabilityZone: to.Ptr("1"), - // IsAvailable: to.Ptr(true), - // }, - // { - // AvailabilityZone: to.Ptr("2"), - // IsAvailable: to.Ptr(true), - // }, - // { - // AvailabilityZone: to.Ptr("3"), - // IsAvailable: to.Ptr(true), - // }}, - // StorageToNetworkProximity: to.Ptr(armnetapp.RegionStorageToNetworkProximityT2), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/RegionInfos_Get.json -func ExampleResourceRegionInfosClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewResourceRegionInfosClient().Get(ctx, "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.RegionInfoResource = armnetapp.RegionInfoResource{ - // Name: to.Ptr("eastus/default"), - // Type: to.Ptr("Microsoft.NetApp/locations/regionInfos"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/regionInfos/default"), - // Properties: &armnetapp.RegionInfo{ - // AvailabilityZoneMappings: []*armnetapp.RegionInfoAvailabilityZoneMappingsItem{ - // { - // AvailabilityZone: to.Ptr("1"), - // IsAvailable: to.Ptr(true), - // }, - // { - // AvailabilityZone: to.Ptr("2"), - // IsAvailable: to.Ptr(true), - // }, - // { - // AvailabilityZone: to.Ptr("3"), - // IsAvailable: to.Ptr(true), - // }}, - // StorageToNetworkProximity: to.Ptr(armnetapp.RegionStorageToNetworkProximityT2), - // }, - // } -} diff --git a/sdk/resourcemanager/netapp/armnetapp/responses.go b/sdk/resourcemanager/netapp/armnetapp/responses.go index 8e0dfdd06a31..99ec47a09413 100644 --- a/sdk/resourcemanager/netapp/armnetapp/responses.go +++ b/sdk/resourcemanager/netapp/armnetapp/responses.go @@ -8,6 +8,11 @@ package armnetapp +// AccountsClientChangeKeyVaultResponse contains the response from method AccountsClient.BeginChangeKeyVault. +type AccountsClientChangeKeyVaultResponse struct { + // placeholder for future response values +} + // AccountsClientCreateOrUpdateResponse contains the response from method AccountsClient.BeginCreateOrUpdate. type AccountsClientCreateOrUpdateResponse struct { // NetApp account resource @@ -19,6 +24,11 @@ type AccountsClientDeleteResponse struct { // placeholder for future response values } +// AccountsClientGetChangeKeyVaultInformationResponse contains the response from method AccountsClient.BeginGetChangeKeyVaultInformation. +type AccountsClientGetChangeKeyVaultInformationResponse struct { + // placeholder for future response values +} + // AccountsClientGetResponse contains the response from method AccountsClient.Get. type AccountsClientGetResponse struct { // NetApp account resource @@ -37,6 +47,11 @@ type AccountsClientListResponse struct { AccountList } +// AccountsClientMigrateEncryptionKeyResponse contains the response from method AccountsClient.BeginMigrateEncryptionKey. +type AccountsClientMigrateEncryptionKeyResponse struct { + // placeholder for future response values +} + // AccountsClientRenewCredentialsResponse contains the response from method AccountsClient.BeginRenewCredentials. type AccountsClientRenewCredentialsResponse struct { // placeholder for future response values @@ -429,6 +444,12 @@ type VolumesClientBreakReplicationResponse struct { // placeholder for future response values } +// VolumesClientCreateOnPremMigrationReplicationResponse contains the response from method VolumesClient.BeginCreateOnPremMigrationReplication. +type VolumesClientCreateOnPremMigrationReplicationResponse struct { + // Information about SVM peering process + SvmPeerCommandResponse +} + // VolumesClientCreateOrUpdateResponse contains the response from method VolumesClient.BeginCreateOrUpdate. type VolumesClientCreateOrUpdateResponse struct { // Volume resource @@ -445,6 +466,11 @@ type VolumesClientDeleteResponse struct { // placeholder for future response values } +// VolumesClientFinalizeOnPremMigrationResponse contains the response from method VolumesClient.BeginFinalizeOnPremMigration. +type VolumesClientFinalizeOnPremMigrationResponse struct { + // placeholder for future response values +} + // VolumesClientFinalizeRelocationResponse contains the response from method VolumesClient.BeginFinalizeRelocation. type VolumesClientFinalizeRelocationResponse struct { // placeholder for future response values @@ -474,6 +500,17 @@ type VolumesClientListResponse struct { VolumeList } +// VolumesClientPeerClusterForOnPremMigrationResponse contains the response from method VolumesClient.BeginPeerClusterForOnPremMigration. +type VolumesClientPeerClusterForOnPremMigrationResponse struct { + // Information about cluster peering process + ClusterPeerCommandResponse +} + +// VolumesClientPerformReplicationTransferResponse contains the response from method VolumesClient.BeginPerformReplicationTransfer. +type VolumesClientPerformReplicationTransferResponse struct { + // placeholder for future response values +} + // VolumesClientPoolChangeResponse contains the response from method VolumesClient.BeginPoolChange. type VolumesClientPoolChangeResponse struct { // placeholder for future response values @@ -526,6 +563,11 @@ type VolumesClientRevertResponse struct { // placeholder for future response values } +// VolumesClientSplitCloneFromParentResponse contains the response from method VolumesClient.BeginSplitCloneFromParent. +type VolumesClientSplitCloneFromParentResponse struct { + // placeholder for future response values +} + // VolumesClientUpdateResponse contains the response from method VolumesClient.BeginUpdate. type VolumesClientUpdateResponse struct { // Volume resource diff --git a/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client.go b/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client.go index a19e3b927ede..4e241ad8eb0e 100644 --- a/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client.go @@ -46,7 +46,7 @@ func NewSnapshotPoliciesClient(subscriptionID string, credential azcore.TokenCre // Create - Create a snapshot policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - snapshotPolicyName - The name of the snapshot policy @@ -98,7 +98,7 @@ func (client *SnapshotPoliciesClient) createCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -119,7 +119,7 @@ func (client *SnapshotPoliciesClient) createHandleResponse(resp *http.Response) // BeginDelete - Delete snapshot policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - snapshotPolicyName - The name of the snapshot policy @@ -146,7 +146,7 @@ func (client *SnapshotPoliciesClient) BeginDelete(ctx context.Context, resourceG // Delete - Delete snapshot policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SnapshotPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "SnapshotPoliciesClient.BeginDelete" @@ -192,7 +192,7 @@ func (client *SnapshotPoliciesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,7 +201,7 @@ func (client *SnapshotPoliciesClient) deleteCreateRequest(ctx context.Context, r // Get - Get a snapshot Policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - snapshotPolicyName - The name of the snapshot policy @@ -252,7 +252,7 @@ func (client *SnapshotPoliciesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,7 +269,7 @@ func (client *SnapshotPoliciesClient) getHandleResponse(resp *http.Response) (Sn // NewListPager - List snapshot policy // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - options - SnapshotPoliciesClientListOptions contains the optional parameters for the SnapshotPoliciesClient.NewListPager @@ -318,7 +318,7 @@ func (client *SnapshotPoliciesClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -336,7 +336,7 @@ func (client *SnapshotPoliciesClient) listHandleResponse(resp *http.Response) (S // ListVolumes - Get volumes associated with snapshot policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - snapshotPolicyName - The name of the snapshot policy @@ -388,7 +388,7 @@ func (client *SnapshotPoliciesClient) listVolumesCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -406,7 +406,7 @@ func (client *SnapshotPoliciesClient) listVolumesHandleResponse(resp *http.Respo // BeginUpdate - Patch a snapshot policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - snapshotPolicyName - The name of the snapshot policy @@ -434,7 +434,7 @@ func (client *SnapshotPoliciesClient) BeginUpdate(ctx context.Context, resourceG // Update - Patch a snapshot policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SnapshotPoliciesClient) update(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicyPatch, options *SnapshotPoliciesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "SnapshotPoliciesClient.BeginUpdate" @@ -480,7 +480,7 @@ func (client *SnapshotPoliciesClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client_example_test.go deleted file mode 100644 index 2e2408c6e891..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client_example_test.go +++ /dev/null @@ -1,346 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_List.json -func ExampleSnapshotPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSnapshotPoliciesClient().NewListPager("myRG", "account1", 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.SnapshotPoliciesList = armnetapp.SnapshotPoliciesList{ - // Value: []*armnetapp.SnapshotPolicy{ - // { - // Name: to.Ptr("account1/snapshotPolicy1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/snapshotPolicies"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.SnapshotPolicyProperties{ - // DailySchedule: &armnetapp.DailySchedule{ - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](30), - // SnapshotsToKeep: to.Ptr[int32](4), - // }, - // Enabled: to.Ptr(true), - // HourlySchedule: &armnetapp.HourlySchedule{ - // Minute: to.Ptr[int32](50), - // SnapshotsToKeep: to.Ptr[int32](2), - // }, - // MonthlySchedule: &armnetapp.MonthlySchedule{ - // DaysOfMonth: to.Ptr("10,11,12"), - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](15), - // SnapshotsToKeep: to.Ptr[int32](5), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // WeeklySchedule: &armnetapp.WeeklySchedule{ - // Day: to.Ptr("Wednesday"), - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](45), - // SnapshotsToKeep: to.Ptr[int32](3), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Get.json -func ExampleSnapshotPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSnapshotPoliciesClient().Get(ctx, "myRG", "account1", "snapshotPolicyName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SnapshotPolicy = armnetapp.SnapshotPolicy{ - // Name: to.Ptr("account1/snapshotPolicy1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/snapshotPolicies"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.SnapshotPolicyProperties{ - // DailySchedule: &armnetapp.DailySchedule{ - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](30), - // SnapshotsToKeep: to.Ptr[int32](4), - // }, - // Enabled: to.Ptr(true), - // HourlySchedule: &armnetapp.HourlySchedule{ - // Minute: to.Ptr[int32](50), - // SnapshotsToKeep: to.Ptr[int32](2), - // }, - // MonthlySchedule: &armnetapp.MonthlySchedule{ - // DaysOfMonth: to.Ptr("10,11,12"), - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](15), - // SnapshotsToKeep: to.Ptr[int32](5), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // WeeklySchedule: &armnetapp.WeeklySchedule{ - // Day: to.Ptr("Wednesday"), - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](45), - // SnapshotsToKeep: to.Ptr[int32](3), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Create.json -func ExampleSnapshotPoliciesClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSnapshotPoliciesClient().Create(ctx, "myRG", "account1", "snapshotPolicyName", armnetapp.SnapshotPolicy{ - Location: to.Ptr("eastus"), - Properties: &armnetapp.SnapshotPolicyProperties{ - DailySchedule: &armnetapp.DailySchedule{ - Hour: to.Ptr[int32](14), - Minute: to.Ptr[int32](30), - SnapshotsToKeep: to.Ptr[int32](4), - }, - Enabled: to.Ptr(true), - HourlySchedule: &armnetapp.HourlySchedule{ - Minute: to.Ptr[int32](50), - SnapshotsToKeep: to.Ptr[int32](2), - }, - MonthlySchedule: &armnetapp.MonthlySchedule{ - DaysOfMonth: to.Ptr("10,11,12"), - Hour: to.Ptr[int32](14), - Minute: to.Ptr[int32](15), - SnapshotsToKeep: to.Ptr[int32](5), - }, - WeeklySchedule: &armnetapp.WeeklySchedule{ - Day: to.Ptr("Wednesday"), - Hour: to.Ptr[int32](14), - Minute: to.Ptr[int32](45), - SnapshotsToKeep: to.Ptr[int32](3), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SnapshotPolicy = armnetapp.SnapshotPolicy{ - // Name: to.Ptr("account1/snapshotPolicy1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/snapshotPolicies"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.SnapshotPolicyProperties{ - // DailySchedule: &armnetapp.DailySchedule{ - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](30), - // SnapshotsToKeep: to.Ptr[int32](4), - // }, - // Enabled: to.Ptr(true), - // HourlySchedule: &armnetapp.HourlySchedule{ - // Minute: to.Ptr[int32](50), - // SnapshotsToKeep: to.Ptr[int32](2), - // }, - // MonthlySchedule: &armnetapp.MonthlySchedule{ - // DaysOfMonth: to.Ptr("10,11,12"), - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](15), - // SnapshotsToKeep: to.Ptr[int32](5), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // WeeklySchedule: &armnetapp.WeeklySchedule{ - // Day: to.Ptr("Wednesday"), - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](45), - // SnapshotsToKeep: to.Ptr[int32](3), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Update.json -func ExampleSnapshotPoliciesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSnapshotPoliciesClient().BeginUpdate(ctx, "myRG", "account1", "snapshotPolicyName", armnetapp.SnapshotPolicyPatch{ - Location: to.Ptr("eastus"), - Properties: &armnetapp.SnapshotPolicyProperties{ - DailySchedule: &armnetapp.DailySchedule{ - Hour: to.Ptr[int32](14), - Minute: to.Ptr[int32](30), - SnapshotsToKeep: to.Ptr[int32](4), - }, - Enabled: to.Ptr(true), - HourlySchedule: &armnetapp.HourlySchedule{ - Minute: to.Ptr[int32](50), - SnapshotsToKeep: to.Ptr[int32](2), - }, - MonthlySchedule: &armnetapp.MonthlySchedule{ - DaysOfMonth: to.Ptr("10,11,12"), - Hour: to.Ptr[int32](14), - Minute: to.Ptr[int32](15), - SnapshotsToKeep: to.Ptr[int32](5), - }, - WeeklySchedule: &armnetapp.WeeklySchedule{ - Day: to.Ptr("Wednesday"), - Hour: to.Ptr[int32](14), - Minute: to.Ptr[int32](45), - SnapshotsToKeep: to.Ptr[int32](3), - }, - }, - }, 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.SnapshotPolicy = armnetapp.SnapshotPolicy{ - // Name: to.Ptr("account1/snapshotPolicy1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/snapshotPolicies"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.SnapshotPolicyProperties{ - // DailySchedule: &armnetapp.DailySchedule{ - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](30), - // SnapshotsToKeep: to.Ptr[int32](4), - // }, - // Enabled: to.Ptr(true), - // HourlySchedule: &armnetapp.HourlySchedule{ - // Minute: to.Ptr[int32](50), - // SnapshotsToKeep: to.Ptr[int32](2), - // }, - // MonthlySchedule: &armnetapp.MonthlySchedule{ - // DaysOfMonth: to.Ptr("10,11,12"), - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](15), - // SnapshotsToKeep: to.Ptr[int32](5), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // WeeklySchedule: &armnetapp.WeeklySchedule{ - // Day: to.Ptr("Wednesday"), - // Hour: to.Ptr[int32](14), - // Minute: to.Ptr[int32](45), - // SnapshotsToKeep: to.Ptr[int32](3), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Delete.json -func ExampleSnapshotPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSnapshotPoliciesClient().BeginDelete(ctx, "resourceGroup", "accountName", "snapshotPolicyName", 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_ListVolumes.json -func ExampleSnapshotPoliciesClient_ListVolumes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSnapshotPoliciesClient().ListVolumes(ctx, "myRG", "account1", "snapshotPolicyName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SnapshotPolicyVolumeList = armnetapp.SnapshotPolicyVolumeList{ - // Value: []*armnetapp.Volume{ - // { - // Name: to.Ptr("account1/pool1/volume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("some-amazing-filepath"), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](128), - // UsageThreshold: to.Ptr[int64](107374182400), - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/netapp/armnetapp/snapshots_client.go b/sdk/resourcemanager/netapp/armnetapp/snapshots_client.go index 7a3a0f22932d..b74093301ba8 100644 --- a/sdk/resourcemanager/netapp/armnetapp/snapshots_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/snapshots_client.go @@ -46,7 +46,7 @@ func NewSnapshotsClient(subscriptionID string, credential azcore.TokenCredential // BeginCreate - Create the specified snapshot within the given volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -75,7 +75,7 @@ func (client *SnapshotsClient) BeginCreate(ctx context.Context, resourceGroupNam // Create - Create the specified snapshot within the given volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SnapshotsClient) create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body Snapshot, options *SnapshotsClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "SnapshotsClient.BeginCreate" @@ -129,7 +129,7 @@ func (client *SnapshotsClient) createCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -141,7 +141,7 @@ func (client *SnapshotsClient) createCreateRequest(ctx context.Context, resource // BeginDelete - Delete snapshot // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -169,7 +169,7 @@ func (client *SnapshotsClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Delete snapshot // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SnapshotsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "SnapshotsClient.BeginDelete" @@ -223,7 +223,7 @@ func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +232,7 @@ func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resource // Get - Get details of the specified snapshot // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -293,7 +293,7 @@ func (client *SnapshotsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,7 +310,7 @@ func (client *SnapshotsClient) getHandleResponse(resp *http.Response) (Snapshots // NewListPager - List all snapshots associated with the volume // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -368,7 +368,7 @@ func (client *SnapshotsClient) listCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -386,7 +386,7 @@ func (client *SnapshotsClient) listHandleResponse(resp *http.Response) (Snapshot // BeginRestoreFiles - Restore the specified files from the specified snapshot to the active filesystem // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -416,7 +416,7 @@ func (client *SnapshotsClient) BeginRestoreFiles(ctx context.Context, resourceGr // RestoreFiles - Restore the specified files from the specified snapshot to the active filesystem // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SnapshotsClient) restoreFiles(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body SnapshotRestoreFiles, options *SnapshotsClientBeginRestoreFilesOptions) (*http.Response, error) { var err error const operationName = "SnapshotsClient.BeginRestoreFiles" @@ -470,7 +470,7 @@ func (client *SnapshotsClient) restoreFilesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -482,7 +482,7 @@ func (client *SnapshotsClient) restoreFilesCreateRequest(ctx context.Context, re // BeginUpdate - Patch a snapshot // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -511,7 +511,7 @@ func (client *SnapshotsClient) BeginUpdate(ctx context.Context, resourceGroupNam // Update - Patch a snapshot // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SnapshotsClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body any, options *SnapshotsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "SnapshotsClient.BeginUpdate" @@ -565,7 +565,7 @@ func (client *SnapshotsClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/snapshots_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/snapshots_client_example_test.go deleted file mode 100644 index 7dd44732b0db..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/snapshots_client_example_test.go +++ /dev/null @@ -1,193 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_List.json -func ExampleSnapshotsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSnapshotsClient().NewListPager("myRG", "account1", "pool1", "volume1", 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.SnapshotsList = armnetapp.SnapshotsList{ - // Value: []*armnetapp.Snapshot{ - // { - // Name: to.Ptr("account1/pool1/volume1/snapshot1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.SnapshotProperties{ - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // SnapshotID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca3333"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Get.json -func ExampleSnapshotsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSnapshotsClient().Get(ctx, "myRG", "account1", "pool1", "volume1", "snapshot1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Snapshot = armnetapp.Snapshot{ - // Name: to.Ptr("account1/pool1/volume1/snapshot1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.SnapshotProperties{ - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // SnapshotID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca3333"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Create.json -func ExampleSnapshotsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSnapshotsClient().BeginCreate(ctx, "myRG", "account1", "pool1", "volume1", "snapshot1", armnetapp.Snapshot{ - Location: to.Ptr("eastus"), - }, 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Update.json -func ExampleSnapshotsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSnapshotsClient().BeginUpdate(ctx, "myRG", "account1", "pool1", "volume1", "snapshot1", map[string]any{}, 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.Snapshot = armnetapp.Snapshot{ - // Name: to.Ptr("account1/pool1/volume1/snapshot1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.SnapshotProperties{ - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // SnapshotID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca3333"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Delete.json -func ExampleSnapshotsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSnapshotsClient().BeginDelete(ctx, "myRG", "account1", "pool1", "volume1", "snapshot1", 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_SingleFileRestore.json -func ExampleSnapshotsClient_BeginRestoreFiles() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSnapshotsClient().BeginRestoreFiles(ctx, "myRG", "account1", "pool1", "volume1", "snapshot1", armnetapp.SnapshotRestoreFiles{ - FilePaths: []*string{ - to.Ptr("/dir1/customer1.db"), - to.Ptr("/dir1/customer2.db")}, - }, 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/netapp/armnetapp/subvolumes_client.go b/sdk/resourcemanager/netapp/armnetapp/subvolumes_client.go index d69d25acd66c..cbbe3716e6a2 100644 --- a/sdk/resourcemanager/netapp/armnetapp/subvolumes_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/subvolumes_client.go @@ -46,7 +46,7 @@ func NewSubvolumesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreate - Creates a subvolume in the path or clones the subvolume mentioned in the parentPath // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -75,7 +75,7 @@ func (client *SubvolumesClient) BeginCreate(ctx context.Context, resourceGroupNa // Create - Creates a subvolume in the path or clones the subvolume mentioned in the parentPath // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SubvolumesClient) create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumeInfo, options *SubvolumesClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "SubvolumesClient.BeginCreate" @@ -129,7 +129,7 @@ func (client *SubvolumesClient) createCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -141,7 +141,7 @@ func (client *SubvolumesClient) createCreateRequest(ctx context.Context, resourc // BeginDelete - Delete subvolume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -169,7 +169,7 @@ func (client *SubvolumesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Delete subvolume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SubvolumesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "SubvolumesClient.BeginDelete" @@ -223,7 +223,7 @@ func (client *SubvolumesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +232,7 @@ func (client *SubvolumesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Returns the path associated with the subvolumeName provided // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -293,7 +293,7 @@ func (client *SubvolumesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ func (client *SubvolumesClient) getHandleResponse(resp *http.Response) (Subvolum // BeginGetMetadata - Get details of the specified subvolume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -340,7 +340,7 @@ func (client *SubvolumesClient) BeginGetMetadata(ctx context.Context, resourceGr // GetMetadata - Get details of the specified subvolume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SubvolumesClient) getMetadata(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginGetMetadataOptions) (*http.Response, error) { var err error const operationName = "SubvolumesClient.BeginGetMetadata" @@ -394,7 +394,7 @@ func (client *SubvolumesClient) getMetadataCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -402,7 +402,7 @@ func (client *SubvolumesClient) getMetadataCreateRequest(ctx context.Context, re // NewListByVolumePager - Returns a list of the subvolumes in the volume // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -460,7 +460,7 @@ func (client *SubvolumesClient) listByVolumeCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -478,7 +478,7 @@ func (client *SubvolumesClient) listByVolumeHandleResponse(resp *http.Response) // BeginUpdate - Patch a subvolume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -507,7 +507,7 @@ func (client *SubvolumesClient) BeginUpdate(ctx context.Context, resourceGroupNa // Update - Patch a subvolume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *SubvolumesClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumePatchRequest, options *SubvolumesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "SubvolumesClient.BeginUpdate" @@ -561,7 +561,7 @@ func (client *SubvolumesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/subvolumes_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/subvolumes_client_example_test.go deleted file mode 100644 index 3572ef45a768..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/subvolumes_client_example_test.go +++ /dev/null @@ -1,220 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_List.json -func ExampleSubvolumesClient_NewListByVolumePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSubvolumesClient().NewListByVolumePager("myRG", "account1", "pool1", "volume1", 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.SubvolumesList = armnetapp.SubvolumesList{ - // Value: []*armnetapp.SubvolumeInfo{ - // { - // Name: to.Ptr("account1/pool1/volume1/subvolume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/subvolumes"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/subvolumes/subvolume1"), - // Properties: &armnetapp.SubvolumeProperties{ - // Path: to.Ptr("/pathToSubvol"), - // Size: to.Ptr[int64](0), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Get.json -func ExampleSubvolumesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSubvolumesClient().Get(ctx, "myRG", "account1", "pool1", "volume1", "subvolume1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SubvolumeInfo = armnetapp.SubvolumeInfo{ - // Name: to.Ptr("account1/pool1/volume1/subvolume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/subvolumes"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/subvolumes/subvolume1"), - // Properties: &armnetapp.SubvolumeProperties{ - // Path: to.Ptr("/pathToSubvol"), - // Size: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Create.json -func ExampleSubvolumesClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSubvolumesClient().BeginCreate(ctx, "myRG", "account1", "pool1", "volume1", "subvolume1", armnetapp.SubvolumeInfo{ - Properties: &armnetapp.SubvolumeProperties{ - Path: to.Ptr("/subvolumePath"), - }, - }, 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.SubvolumeInfo = armnetapp.SubvolumeInfo{ - // Name: to.Ptr("account1/pool1/volume1/subvolume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/subvolumes"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/subvolumes/subvolume1"), - // Properties: &armnetapp.SubvolumeProperties{ - // Path: to.Ptr("/subvolumePath"), - // ProvisioningState: to.Ptr("Succeeded"), - // Size: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Update.json -func ExampleSubvolumesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSubvolumesClient().BeginUpdate(ctx, "myRG", "account1", "pool1", "volume1", "subvolume1", armnetapp.SubvolumePatchRequest{ - Properties: &armnetapp.SubvolumePatchParams{ - Path: to.Ptr("/subvolumePath"), - }, - }, 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.SubvolumeInfo = armnetapp.SubvolumeInfo{ - // Name: to.Ptr("account1/pool1/volume1/subvolume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/subvolume1"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/subvolumes/subvolume1"), - // Properties: &armnetapp.SubvolumeProperties{ - // Path: to.Ptr("/subvolumePath"), - // Size: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Delete.json -func ExampleSubvolumesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSubvolumesClient().BeginDelete(ctx, "myRG", "account1", "pool1", "volume1", "subvolume1", 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Metadata.json -func ExampleSubvolumesClient_BeginGetMetadata() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSubvolumesClient().BeginGetMetadata(ctx, "myRG", "account1", "pool1", "volume1", "subvolume1", 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.SubvolumeModel = armnetapp.SubvolumeModel{ - // Name: to.Ptr("account1/pool1/volume1/subvolume1/metadata"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/subvolumes/metadata"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/subvolumes/subvolume1/metadata"), - // Properties: &armnetapp.SubvolumeModelProperties{ - // Path: to.Ptr("/pathToSubvol"), - // AccessedTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // BytesUsed: to.Ptr[int64](5), - // ChangedTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // CreationTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // ModifiedTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), - // Permissions: to.Ptr("777"), - // Size: to.Ptr[int64](5), - // }, - // } -} diff --git a/sdk/resourcemanager/netapp/armnetapp/volumegroups_client.go b/sdk/resourcemanager/netapp/armnetapp/volumegroups_client.go index 1ba98b0f8e93..66696b53ed24 100644 --- a/sdk/resourcemanager/netapp/armnetapp/volumegroups_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/volumegroups_client.go @@ -46,7 +46,7 @@ func NewVolumeGroupsClient(subscriptionID string, credential azcore.TokenCredent // BeginCreate - Create a volume group along with specified volumes // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - volumeGroupName - The name of the volumeGroup @@ -73,7 +73,7 @@ func (client *VolumeGroupsClient) BeginCreate(ctx context.Context, resourceGroup // Create - Create a volume group along with specified volumes // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumeGroupsClient) create(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, body VolumeGroupDetails, options *VolumeGroupsClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "VolumeGroupsClient.BeginCreate" @@ -119,7 +119,7 @@ func (client *VolumeGroupsClient) createCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -131,7 +131,7 @@ func (client *VolumeGroupsClient) createCreateRequest(ctx context.Context, resou // BeginDelete - Delete the specified volume group only if there are no volumes under volume group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - volumeGroupName - The name of the volumeGroup @@ -157,7 +157,7 @@ func (client *VolumeGroupsClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Delete the specified volume group only if there are no volumes under volume group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumeGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, options *VolumeGroupsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "VolumeGroupsClient.BeginDelete" @@ -203,7 +203,7 @@ func (client *VolumeGroupsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,7 +212,7 @@ func (client *VolumeGroupsClient) deleteCreateRequest(ctx context.Context, resou // Get - Get details of the specified volume group // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - volumeGroupName - The name of the volumeGroup @@ -263,7 +263,7 @@ func (client *VolumeGroupsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -280,7 +280,7 @@ func (client *VolumeGroupsClient) getHandleResponse(resp *http.Response) (Volume // NewListByNetAppAccountPager - List all volume groups for given account // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - options - VolumeGroupsClientListByNetAppAccountOptions contains the optional parameters for the VolumeGroupsClient.NewListByNetAppAccountPager @@ -329,7 +329,7 @@ func (client *VolumeGroupsClient) listByNetAppAccountCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/netapp/armnetapp/volumegroups_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/volumegroups_client_example_test.go deleted file mode 100644 index 7e8d18fbd0f5..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/volumegroups_client_example_test.go +++ /dev/null @@ -1,1474 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_List_Oracle.json -func ExampleVolumeGroupsClient_NewListByNetAppAccountPager_volumeGroupsListOracle() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewVolumeGroupsClient().NewListByNetAppAccountPager("myRG", "account1", 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.VolumeGroupList = armnetapp.VolumeGroupList{ - // Value: []*armnetapp.VolumeGroup{ - // { - // Name: to.Ptr("group1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/volumeGroups"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/volumeGroups/group1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeGroupListProperties{ - // GroupMetaData: &armnetapp.VolumeGroupMetaData{ - // ApplicationIdentifier: to.Ptr("DEV"), - // ApplicationType: to.Ptr(armnetapp.ApplicationTypeORACLE), - // GroupDescription: to.Ptr("Volume group"), - // VolumesCount: to.Ptr[int64](12), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_List_SapHana.json -func ExampleVolumeGroupsClient_NewListByNetAppAccountPager_volumeGroupsListSapHana() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewVolumeGroupsClient().NewListByNetAppAccountPager("myRG", "account1", 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.VolumeGroupList = armnetapp.VolumeGroupList{ - // Value: []*armnetapp.VolumeGroup{ - // { - // Name: to.Ptr("group1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/volumeGroups"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/volumeGroups/group1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeGroupListProperties{ - // GroupMetaData: &armnetapp.VolumeGroupMetaData{ - // ApplicationIdentifier: to.Ptr("SH9"), - // ApplicationType: to.Ptr(armnetapp.ApplicationTypeSAPHANA), - // GroupDescription: to.Ptr("Volume group"), - // VolumesCount: to.Ptr[int64](5), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Get_Oracle.json -func ExampleVolumeGroupsClient_Get_volumeGroupsGetOracle() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVolumeGroupsClient().Get(ctx, "myRG", "account1", "group1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.VolumeGroupDetails = armnetapp.VolumeGroupDetails{ - // Name: to.Ptr("group1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/volumeGroups"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/volumeGroups/group1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeGroupProperties{ - // GroupMetaData: &armnetapp.VolumeGroupMetaData{ - // ApplicationIdentifier: to.Ptr("OR2"), - // ApplicationType: to.Ptr(armnetapp.ApplicationTypeORACLE), - // GroupDescription: to.Ptr("Volume group"), - // VolumesCount: to.Ptr[int64](12), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // Volumes: []*armnetapp.VolumeGroupVolumeProperties{ - // { - // Name: to.Ptr("account1/pool1/test-ora-data1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data1"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-data1"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-data1"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-data2"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data2"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-data2"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-data2"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-data3"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data3"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-data3"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-data3"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-data4"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data4"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-data4"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-data4"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-data5"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data5"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-data5"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-data5"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-data6"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data6"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-data6"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-data6"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-data7"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data7"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-data7"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-data7"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-data8"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data8"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-data8"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-data8"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-log"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-log"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-log"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-log"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-log-mirror"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-log-mirror"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-log-mirror"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-log-mirror"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-binary"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-binary"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-binary"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-binary"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }, - // { - // Name: to.Ptr("account1/pool1/test-ora-backup"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-backup"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-ora-backup"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("ora-backup"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Get_SapHana.json -func ExampleVolumeGroupsClient_Get_volumeGroupsGetSapHana() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVolumeGroupsClient().Get(ctx, "myRG", "account1", "group1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.VolumeGroupDetails = armnetapp.VolumeGroupDetails{ - // Name: to.Ptr("group1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/volumeGroups"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/volumeGroups/group1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeGroupProperties{ - // GroupMetaData: &armnetapp.VolumeGroupMetaData{ - // ApplicationIdentifier: to.Ptr("SH9"), - // ApplicationType: to.Ptr(armnetapp.ApplicationTypeSAPHANA), - // GroupDescription: to.Ptr("Volume group"), - // VolumesCount: to.Ptr[int64](5), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // Volumes: []*armnetapp.VolumeGroupVolumeProperties{ - // { - // Name: to.Ptr("account1/pool1/test-data-mnt00001"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-data-mnt00001"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-data-mnt00001"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("data"), - // }, - // }, - // { - // Name: to.Ptr("account1/pool1/test-log-mnt00001"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-log-mnt00001"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-log-mnt00001"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("log"), - // }, - // }, - // { - // Name: to.Ptr("account1/pool1/test-shared"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-shared"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-shared"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("shared"), - // }, - // }, - // { - // Name: to.Ptr("account1/pool1/test-data-backup"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-data-backup"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-data-backup"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("data-backup"), - // }, - // }, - // { - // Name: to.Ptr("account1/pool1/test-log-backup"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-log-backup"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("test-log-backup"), - // ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - // Rules: []*armnetapp.ExportPolicyRule{ - // { - // AllowedClients: to.Ptr("0.0.0.0/0"), - // Cifs: to.Ptr(false), - // HasRootAccess: to.Ptr(true), - // Kerberos5ReadOnly: to.Ptr(false), - // Kerberos5ReadWrite: to.Ptr(false), - // Kerberos5IReadOnly: to.Ptr(false), - // Kerberos5IReadWrite: to.Ptr(false), - // Kerberos5PReadOnly: to.Ptr(false), - // Kerberos5PReadWrite: to.Ptr(false), - // Nfsv3: to.Ptr(false), - // Nfsv41: to.Ptr(true), - // RuleIndex: to.Ptr[int32](1), - // UnixReadOnly: to.Ptr(true), - // UnixReadWrite: to.Ptr(true), - // }}, - // }, - // ProtocolTypes: []*string{ - // to.Ptr("NFSv4.1")}, - // ProvisioningState: to.Ptr("Succeeded"), - // ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](10), - // UsageThreshold: to.Ptr[int64](107374182400), - // VolumeSpecName: to.Ptr("log-backup"), - // }, - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Create_Oracle.json -func ExampleVolumeGroupsClient_BeginCreate_volumeGroupsCreateOracle() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumeGroupsClient().BeginCreate(ctx, "myRG", "account1", "group1", armnetapp.VolumeGroupDetails{ - Location: to.Ptr("westus"), - Properties: &armnetapp.VolumeGroupProperties{ - GroupMetaData: &armnetapp.VolumeGroupMetaData{ - ApplicationIdentifier: to.Ptr("OR2"), - ApplicationType: to.Ptr(armnetapp.ApplicationTypeORACLE), - GroupDescription: to.Ptr("Volume group"), - }, - Volumes: []*armnetapp.VolumeGroupVolumeProperties{ - { - Name: to.Ptr("test-ora-data1"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-data1"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-data1"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-data2"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-data2"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-data2"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-data3"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-data3"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-data3"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-data4"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-data4"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-data4"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-data5"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-data5"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-data5"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-data6"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-data6"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-data6"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-data7"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-data7"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-data7"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-data8"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-data8"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-data8"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-log"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-log"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-log"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-log-mirror"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-log-mirror"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-log-mirror"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-binary"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-binary"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-binary"), - }, - Zones: []*string{ - to.Ptr("1")}, - }, - { - Name: to.Ptr("test-ora-backup"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-ora-backup"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("ora-backup"), - }, - Zones: []*string{ - to.Ptr("1")}, - }}, - }, - }, 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Create_SapHana.json -func ExampleVolumeGroupsClient_BeginCreate_volumeGroupsCreateSapHana() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumeGroupsClient().BeginCreate(ctx, "myRG", "account1", "group1", armnetapp.VolumeGroupDetails{ - Location: to.Ptr("westus"), - Properties: &armnetapp.VolumeGroupProperties{ - GroupMetaData: &armnetapp.VolumeGroupMetaData{ - ApplicationIdentifier: to.Ptr("SH9"), - ApplicationType: to.Ptr(armnetapp.ApplicationTypeSAPHANA), - GroupDescription: to.Ptr("Volume group"), - }, - Volumes: []*armnetapp.VolumeGroupVolumeProperties{ - { - Name: to.Ptr("test-data-mnt00001"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-data-mnt00001"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("data"), - }, - }, - { - Name: to.Ptr("test-log-mnt00001"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-log-mnt00001"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("log"), - }, - }, - { - Name: to.Ptr("test-shared"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-shared"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("shared"), - }, - }, - { - Name: to.Ptr("test-data-backup"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-data-backup"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("data-backup"), - }, - }, - { - Name: to.Ptr("test-log-backup"), - Properties: &armnetapp.VolumeProperties{ - CapacityPoolResourceID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - CreationToken: to.Ptr("test-log-backup"), - ExportPolicy: &armnetapp.VolumePropertiesExportPolicy{ - Rules: []*armnetapp.ExportPolicyRule{ - { - AllowedClients: to.Ptr("0.0.0.0/0"), - Cifs: to.Ptr(false), - HasRootAccess: to.Ptr(true), - Kerberos5ReadOnly: to.Ptr(false), - Kerberos5ReadWrite: to.Ptr(false), - Kerberos5IReadOnly: to.Ptr(false), - Kerberos5IReadWrite: to.Ptr(false), - Kerberos5PReadOnly: to.Ptr(false), - Kerberos5PReadWrite: to.Ptr(false), - Nfsv3: to.Ptr(false), - Nfsv41: to.Ptr(true), - RuleIndex: to.Ptr[int32](1), - UnixReadOnly: to.Ptr(true), - UnixReadWrite: to.Ptr(true), - }}, - }, - ProtocolTypes: []*string{ - to.Ptr("NFSv4.1")}, - ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - ThroughputMibps: to.Ptr[float32](10), - UsageThreshold: to.Ptr[int64](107374182400), - VolumeSpecName: to.Ptr("log-backup"), - }, - }}, - }, - }, 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Delete.json -func ExampleVolumeGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumeGroupsClient().BeginDelete(ctx, "myRG", "account1", "group1", 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/netapp/armnetapp/volumequotarules_client.go b/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client.go index e2b05e43f310..c9d0737c9855 100644 --- a/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client.go @@ -46,7 +46,7 @@ func NewVolumeQuotaRulesClient(subscriptionID string, credential azcore.TokenCre // BeginCreate - Create the specified quota rule within the given volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -76,7 +76,7 @@ func (client *VolumeQuotaRulesClient) BeginCreate(ctx context.Context, resourceG // Create - Create the specified quota rule within the given volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumeQuotaRulesClient) create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, body VolumeQuotaRule, options *VolumeQuotaRulesClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "VolumeQuotaRulesClient.BeginCreate" @@ -130,7 +130,7 @@ func (client *VolumeQuotaRulesClient) createCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -142,7 +142,7 @@ func (client *VolumeQuotaRulesClient) createCreateRequest(ctx context.Context, r // BeginDelete - Delete quota rule // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -171,7 +171,7 @@ func (client *VolumeQuotaRulesClient) BeginDelete(ctx context.Context, resourceG // Delete - Delete quota rule // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumeQuotaRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, options *VolumeQuotaRulesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "VolumeQuotaRulesClient.BeginDelete" @@ -225,7 +225,7 @@ func (client *VolumeQuotaRulesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +234,7 @@ func (client *VolumeQuotaRulesClient) deleteCreateRequest(ctx context.Context, r // Get - Get details of the specified quota rule // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -295,7 +295,7 @@ func (client *VolumeQuotaRulesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -312,7 +312,7 @@ func (client *VolumeQuotaRulesClient) getHandleResponse(resp *http.Response) (Vo // NewListByVolumePager - List all quota rules associated with the volume // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -371,7 +371,7 @@ func (client *VolumeQuotaRulesClient) listByVolumeCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -389,7 +389,7 @@ func (client *VolumeQuotaRulesClient) listByVolumeHandleResponse(resp *http.Resp // BeginUpdate - Patch a quota rule // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -419,7 +419,7 @@ func (client *VolumeQuotaRulesClient) BeginUpdate(ctx context.Context, resourceG // Update - Patch a quota rule // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumeQuotaRulesClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, body VolumeQuotaRulePatch, options *VolumeQuotaRulesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "VolumeQuotaRulesClient.BeginUpdate" @@ -473,7 +473,7 @@ func (client *VolumeQuotaRulesClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client_example_test.go deleted file mode 100644 index d6c55aa92bf3..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client_example_test.go +++ /dev/null @@ -1,195 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_List.json -func ExampleVolumeQuotaRulesClient_NewListByVolumePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewVolumeQuotaRulesClient().NewListByVolumePager("myRG", "account-9957", "pool-5210", "volume-6387", 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.VolumeQuotaRulesList = armnetapp.VolumeQuotaRulesList{ - // Value: []*armnetapp.VolumeQuotaRule{ - // { - // Name: to.Ptr("account-9957/pool-5210/volume-6387/rule-0004"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/volumeQuotaRules"), - // ID: to.Ptr("/subscriptions/5275316f-a498-48d6-b324-2cbfdc4311b9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account-9957/capacityPools/pool-5210/volumes/volume-6387/volumeQuotaRules/rule-0004"), - // Location: to.Ptr("westus"), - // Properties: &armnetapp.VolumeQuotaRulesProperties{ - // ProvisioningState: to.Ptr(armnetapp.ProvisioningStateSucceeded), - // QuotaSizeInKiBs: to.Ptr[int64](100005), - // QuotaTarget: to.Ptr("1821"), - // QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Get.json -func ExampleVolumeQuotaRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVolumeQuotaRulesClient().Get(ctx, "myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.VolumeQuotaRule = armnetapp.VolumeQuotaRule{ - // Name: to.Ptr("account-9957/pool-5210/volume-6387/rule-0004"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/volumeQuotaRules"), - // ID: to.Ptr("/subscriptions/5275316f-a498-48d6-b324-2cbfdc4311b9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account-9957/capacityPools/pool-5210/volumes/volume-6387/volumeQuotaRules/rule-0004"), - // Location: to.Ptr("westus"), - // Properties: &armnetapp.VolumeQuotaRulesProperties{ - // ProvisioningState: to.Ptr(armnetapp.ProvisioningStateSucceeded), - // QuotaSizeInKiBs: to.Ptr[int64](100005), - // QuotaTarget: to.Ptr("1821"), - // QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Create.json -func ExampleVolumeQuotaRulesClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumeQuotaRulesClient().BeginCreate(ctx, "myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", armnetapp.VolumeQuotaRule{ - Location: to.Ptr("westus"), - Properties: &armnetapp.VolumeQuotaRulesProperties{ - QuotaSizeInKiBs: to.Ptr[int64](100005), - QuotaTarget: to.Ptr("1821"), - QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), - }, - }, 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.VolumeQuotaRule = armnetapp.VolumeQuotaRule{ - // Name: to.Ptr("account-9957/pool-5210/volume-6387/rule-0004"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/volumeQuotaRules"), - // ID: to.Ptr("/subscriptions/5275316f-a498-48d6-b324-2cbfdc4311b9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account-9957/capacityPools/pool-5210/volumes/volume-6387/volumeQuotaRules/rule-0004"), - // Location: to.Ptr("westus"), - // Properties: &armnetapp.VolumeQuotaRulesProperties{ - // ProvisioningState: to.Ptr(armnetapp.ProvisioningStateSucceeded), - // QuotaSizeInKiBs: to.Ptr[int64](100005), - // QuotaTarget: to.Ptr("1821"), - // QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Update.json -func ExampleVolumeQuotaRulesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumeQuotaRulesClient().BeginUpdate(ctx, "myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", armnetapp.VolumeQuotaRulePatch{ - Properties: &armnetapp.VolumeQuotaRulesProperties{ - QuotaSizeInKiBs: to.Ptr[int64](100009), - }, - }, 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.VolumeQuotaRule = armnetapp.VolumeQuotaRule{ - // Name: to.Ptr("account-9957/pool-5210/volume-6387/rule-0004"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/volumeQuotaRules"), - // ID: to.Ptr("/subscriptions/5275316f-a498-48d6-b324-2cbfdc4311b9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account-9957/capacityPools/pool-5210/volumes/volume-6387/volumeQuotaRules/rule-0004"), - // Location: to.Ptr("westus"), - // Properties: &armnetapp.VolumeQuotaRulesProperties{ - // ProvisioningState: to.Ptr(armnetapp.ProvisioningStateSucceeded), - // QuotaSizeInKiBs: to.Ptr[int64](100005), - // QuotaTarget: to.Ptr("1821"), - // QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Delete.json -func ExampleVolumeQuotaRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumeQuotaRulesClient().BeginDelete(ctx, "myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", 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/netapp/armnetapp/volumes_client.go b/sdk/resourcemanager/netapp/armnetapp/volumes_client.go index 1704a31b938d..f0f707f83bf1 100644 --- a/sdk/resourcemanager/netapp/armnetapp/volumes_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/volumes_client.go @@ -47,7 +47,7 @@ func NewVolumesClient(subscriptionID string, credential azcore.TokenCredential, // BeginAuthorizeReplication - Authorize the replication connection on the source volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -76,7 +76,7 @@ func (client *VolumesClient) BeginAuthorizeReplication(ctx context.Context, reso // AuthorizeReplication - Authorize the replication connection on the source volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) authorizeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body AuthorizeRequest, options *VolumesClientBeginAuthorizeReplicationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginAuthorizeReplication" @@ -126,7 +126,7 @@ func (client *VolumesClient) authorizeReplicationCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -138,7 +138,7 @@ func (client *VolumesClient) authorizeReplicationCreateRequest(ctx context.Conte // BeginBreakFileLocks - Break all the file locks on a volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -166,7 +166,7 @@ func (client *VolumesClient) BeginBreakFileLocks(ctx context.Context, resourceGr // BreakFileLocks - Break all the file locks on a volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) breakFileLocks(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakFileLocksOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginBreakFileLocks" @@ -216,7 +216,7 @@ func (client *VolumesClient) breakFileLocksCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { @@ -231,7 +231,7 @@ func (client *VolumesClient) breakFileLocksCreateRequest(ctx context.Context, re // BeginBreakReplication - Break the replication connection on the destination volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -259,7 +259,7 @@ func (client *VolumesClient) BeginBreakReplication(ctx context.Context, resource // BreakReplication - Break the replication connection on the destination volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) breakReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakReplicationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginBreakReplication" @@ -309,7 +309,7 @@ func (client *VolumesClient) breakReplicationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { @@ -321,10 +321,99 @@ func (client *VolumesClient) breakReplicationCreateRequest(ctx context.Context, return req, nil } +// BeginCreateOnPremMigrationReplication - Starts SVM peering and returns a command to be run on the external ONTAP to accept +// it. Once the SVMs have been peered a SnapMirror will be created +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginCreateOnPremMigrationReplicationOptions contains the optional parameters for the VolumesClient.BeginCreateOnPremMigrationReplication +// method. +func (client *VolumesClient) BeginCreateOnPremMigrationReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginCreateOnPremMigrationReplicationOptions) (*runtime.Poller[VolumesClientCreateOnPremMigrationReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOnPremMigrationReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientCreateOnPremMigrationReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientCreateOnPremMigrationReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOnPremMigrationReplication - Starts SVM peering and returns a command to be run on the external ONTAP to accept it. +// Once the SVMs have been peered a SnapMirror will be created +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +func (client *VolumesClient) createOnPremMigrationReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginCreateOnPremMigrationReplicationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginCreateOnPremMigrationReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOnPremMigrationReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOnPremMigrationReplicationCreateRequest creates the CreateOnPremMigrationReplication request. +func (client *VolumesClient) createOnPremMigrationReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginCreateOnPremMigrationReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/createOnPremMigrationReplication" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // BeginCreateOrUpdate - Create or update the specified volume within the capacity pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -353,7 +442,7 @@ func (client *VolumesClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // CreateOrUpdate - Create or update the specified volume within the capacity pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body Volume, options *VolumesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginCreateOrUpdate" @@ -403,7 +492,7 @@ func (client *VolumesClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -415,7 +504,7 @@ func (client *VolumesClient) createOrUpdateCreateRequest(ctx context.Context, re // BeginDelete - Delete the specified volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -442,7 +531,7 @@ func (client *VolumesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete the specified volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginDelete" @@ -492,7 +581,7 @@ func (client *VolumesClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") if options != nil && options.ForceDelete != nil { reqQP.Set("forceDelete", strconv.FormatBool(*options.ForceDelete)) } @@ -504,7 +593,7 @@ func (client *VolumesClient) deleteCreateRequest(ctx context.Context, resourceGr // BeginDeleteReplication - Delete the replication connection on the destination volume, and send release to the source replication // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -532,7 +621,7 @@ func (client *VolumesClient) BeginDeleteReplication(ctx context.Context, resourc // DeleteReplication - Delete the replication connection on the destination volume, and send release to the source replication // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) deleteReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteReplicationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginDeleteReplication" @@ -582,7 +671,96 @@ func (client *VolumesClient) deleteReplicationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginFinalizeOnPremMigration - Finalizes the migration of a volume by performing a final sync on the replication, breaking +// and releasing the replication, and breaking the cluster peering if no other migration is active. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginFinalizeOnPremMigrationOptions contains the optional parameters for the VolumesClient.BeginFinalizeOnPremMigration +// method. +func (client *VolumesClient) BeginFinalizeOnPremMigration(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginFinalizeOnPremMigrationOptions) (*runtime.Poller[VolumesClientFinalizeOnPremMigrationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.finalizeOnPremMigration(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientFinalizeOnPremMigrationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientFinalizeOnPremMigrationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FinalizeOnPremMigration - Finalizes the migration of a volume by performing a final sync on the replication, breaking and +// releasing the replication, and breaking the cluster peering if no other migration is active. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +func (client *VolumesClient) finalizeOnPremMigration(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginFinalizeOnPremMigrationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginFinalizeOnPremMigration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.finalizeOnPremMigrationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// finalizeOnPremMigrationCreateRequest creates the FinalizeOnPremMigration request. +func (client *VolumesClient) finalizeOnPremMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginFinalizeOnPremMigrationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeOnPremMigration" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -591,7 +769,7 @@ func (client *VolumesClient) deleteReplicationCreateRequest(ctx context.Context, // BeginFinalizeRelocation - Finalizes the relocation of the volume and cleans up the old volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -618,7 +796,7 @@ func (client *VolumesClient) BeginFinalizeRelocation(ctx context.Context, resour // FinalizeRelocation - Finalizes the relocation of the volume and cleans up the old volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) finalizeRelocation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginFinalizeRelocationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginFinalizeRelocation" @@ -668,7 +846,7 @@ func (client *VolumesClient) finalizeRelocationCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -677,7 +855,7 @@ func (client *VolumesClient) finalizeRelocationCreateRequest(ctx context.Context // Get - Get the details of the specified volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -733,7 +911,7 @@ func (client *VolumesClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -750,7 +928,7 @@ func (client *VolumesClient) getHandleResponse(resp *http.Response) (VolumesClie // NewListPager - List all volumes within the capacity pool // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -802,7 +980,7 @@ func (client *VolumesClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -820,7 +998,7 @@ func (client *VolumesClient) listHandleResponse(resp *http.Response) (VolumesCli // BeginListGetGroupIDListForLdapUser - Returns the list of group Ids for a specific LDAP User // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -849,7 +1027,7 @@ func (client *VolumesClient) BeginListGetGroupIDListForLdapUser(ctx context.Cont // ListGetGroupIDListForLdapUser - Returns the list of group Ids for a specific LDAP User // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) listGetGroupIDListForLdapUser(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body GetGroupIDListForLDAPUserRequest, options *VolumesClientBeginListGetGroupIDListForLdapUserOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginListGetGroupIDListForLdapUser" @@ -899,7 +1077,7 @@ func (client *VolumesClient) listGetGroupIDListForLdapUserCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -910,7 +1088,7 @@ func (client *VolumesClient) listGetGroupIDListForLdapUserCreateRequest(ctx cont // NewListReplicationsPager - List all replications for a specified volume // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -969,7 +1147,7 @@ func (client *VolumesClient) listReplicationsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -984,10 +1162,188 @@ func (client *VolumesClient) listReplicationsHandleResponse(resp *http.Response) return result, nil } +// BeginPeerClusterForOnPremMigration - Starts peering the cluster for this migration volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - Cluster peer request object supplied in the body of the operation. +// - options - VolumesClientBeginPeerClusterForOnPremMigrationOptions contains the optional parameters for the VolumesClient.BeginPeerClusterForOnPremMigration +// method. +func (client *VolumesClient) BeginPeerClusterForOnPremMigration(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PeerClusterForVolumeMigrationRequest, options *VolumesClientBeginPeerClusterForOnPremMigrationOptions) (*runtime.Poller[VolumesClientPeerClusterForOnPremMigrationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.peerClusterForOnPremMigration(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientPeerClusterForOnPremMigrationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientPeerClusterForOnPremMigrationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PeerClusterForOnPremMigration - Starts peering the cluster for this migration volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +func (client *VolumesClient) peerClusterForOnPremMigration(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PeerClusterForVolumeMigrationRequest, options *VolumesClientBeginPeerClusterForOnPremMigrationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginPeerClusterForOnPremMigration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.peerClusterForOnPremMigrationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// peerClusterForOnPremMigrationCreateRequest creates the PeerClusterForOnPremMigration request. +func (client *VolumesClient) peerClusterForOnPremMigrationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PeerClusterForVolumeMigrationRequest, options *VolumesClientBeginPeerClusterForOnPremMigrationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/peerClusterForOnPremMigration" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginPerformReplicationTransfer - Performs an adhoc replication transfer on a volume with volumeType Migration +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginPerformReplicationTransferOptions contains the optional parameters for the VolumesClient.BeginPerformReplicationTransfer +// method. +func (client *VolumesClient) BeginPerformReplicationTransfer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginPerformReplicationTransferOptions) (*runtime.Poller[VolumesClientPerformReplicationTransferResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.performReplicationTransfer(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientPerformReplicationTransferResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientPerformReplicationTransferResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PerformReplicationTransfer - Performs an adhoc replication transfer on a volume with volumeType Migration +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +func (client *VolumesClient) performReplicationTransfer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginPerformReplicationTransferOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginPerformReplicationTransfer" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.performReplicationTransferCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// performReplicationTransferCreateRequest creates the PerformReplicationTransfer request. +func (client *VolumesClient) performReplicationTransferCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginPerformReplicationTransferOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/performReplicationTransfer" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // BeginPoolChange - Moves volume to another pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1015,7 +1371,7 @@ func (client *VolumesClient) BeginPoolChange(ctx context.Context, resourceGroupN // PoolChange - Moves volume to another pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) poolChange(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PoolChangeRequest, options *VolumesClientBeginPoolChangeOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginPoolChange" @@ -1065,7 +1421,7 @@ func (client *VolumesClient) poolChangeCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -1077,7 +1433,7 @@ func (client *VolumesClient) poolChangeCreateRequest(ctx context.Context, resour // BeginPopulateAvailabilityZone - This operation will populate availability zone information for a volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1105,7 +1461,7 @@ func (client *VolumesClient) BeginPopulateAvailabilityZone(ctx context.Context, // PopulateAvailabilityZone - This operation will populate availability zone information for a volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) populateAvailabilityZone(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginPopulateAvailabilityZoneOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginPopulateAvailabilityZone" @@ -1155,7 +1511,7 @@ func (client *VolumesClient) populateAvailabilityZoneCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1164,7 +1520,7 @@ func (client *VolumesClient) populateAvailabilityZoneCreateRequest(ctx context.C // BeginReInitializeReplication - Re-Initializes the replication connection on the destination volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1192,7 +1548,7 @@ func (client *VolumesClient) BeginReInitializeReplication(ctx context.Context, r // ReInitializeReplication - Re-Initializes the replication connection on the destination volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) reInitializeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginReInitializeReplicationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginReInitializeReplication" @@ -1242,7 +1598,7 @@ func (client *VolumesClient) reInitializeReplicationCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1252,7 +1608,7 @@ func (client *VolumesClient) reInitializeReplicationCreateRequest(ctx context.Co // or policy-based snapshots // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1282,7 +1638,7 @@ func (client *VolumesClient) BeginReestablishReplication(ctx context.Context, re // snapshots // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) reestablishReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body ReestablishReplicationRequest, options *VolumesClientBeginReestablishReplicationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginReestablishReplication" @@ -1332,7 +1688,7 @@ func (client *VolumesClient) reestablishReplicationCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -1344,7 +1700,7 @@ func (client *VolumesClient) reestablishReplicationCreateRequest(ctx context.Con // BeginRelocate - Relocates volume to a new stamp // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1370,7 +1726,7 @@ func (client *VolumesClient) BeginRelocate(ctx context.Context, resourceGroupNam // Relocate - Relocates volume to a new stamp // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) relocate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginRelocateOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginRelocate" @@ -1420,7 +1776,7 @@ func (client *VolumesClient) relocateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { @@ -1435,7 +1791,7 @@ func (client *VolumesClient) relocateCreateRequest(ctx context.Context, resource // ReplicationStatus - Get the status of the replication // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1492,7 +1848,7 @@ func (client *VolumesClient) replicationStatusCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1510,7 +1866,7 @@ func (client *VolumesClient) replicationStatusHandleResponse(resp *http.Response // BeginResetCifsPassword - Reset cifs password from volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1537,7 +1893,7 @@ func (client *VolumesClient) BeginResetCifsPassword(ctx context.Context, resourc // ResetCifsPassword - Reset cifs password from volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) resetCifsPassword(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginResetCifsPasswordOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginResetCifsPassword" @@ -1587,7 +1943,7 @@ func (client *VolumesClient) resetCifsPasswordCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1597,7 +1953,7 @@ func (client *VolumesClient) resetCifsPasswordCreateRequest(ctx context.Context, // it will reverse-resync the connection and sync from destination to source. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1626,7 +1982,7 @@ func (client *VolumesClient) BeginResyncReplication(ctx context.Context, resourc // reverse-resync the connection and sync from destination to source. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) resyncReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginResyncReplicationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginResyncReplication" @@ -1676,7 +2032,7 @@ func (client *VolumesClient) resyncReplicationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1685,7 +2041,7 @@ func (client *VolumesClient) resyncReplicationCreateRequest(ctx context.Context, // BeginRevert - Revert a volume to the snapshot specified in the body // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1713,7 +2069,7 @@ func (client *VolumesClient) BeginRevert(ctx context.Context, resourceGroupName // Revert - Revert a volume to the snapshot specified in the body // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) revert(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumeRevert, options *VolumesClientBeginRevertOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginRevert" @@ -1763,7 +2119,7 @@ func (client *VolumesClient) revertCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -1776,7 +2132,7 @@ func (client *VolumesClient) revertCreateRequest(ctx context.Context, resourceGr // volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1804,7 +2160,7 @@ func (client *VolumesClient) BeginRevertRelocation(ctx context.Context, resource // volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) revertRelocation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginRevertRelocationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginRevertRelocation" @@ -1854,7 +2210,94 @@ func (client *VolumesClient) revertRelocationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginSplitCloneFromParent - Split operation to convert clone volume to an independent volume. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginSplitCloneFromParentOptions contains the optional parameters for the VolumesClient.BeginSplitCloneFromParent +// method. +func (client *VolumesClient) BeginSplitCloneFromParent(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginSplitCloneFromParentOptions) (*runtime.Poller[VolumesClientSplitCloneFromParentResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.splitCloneFromParent(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientSplitCloneFromParentResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientSplitCloneFromParentResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SplitCloneFromParent - Split operation to convert clone volume to an independent volume. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01-preview +func (client *VolumesClient) splitCloneFromParent(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginSplitCloneFromParentOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginSplitCloneFromParent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.splitCloneFromParentCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// splitCloneFromParentCreateRequest creates the SplitCloneFromParent request. +func (client *VolumesClient) splitCloneFromParentCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginSplitCloneFromParentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/splitCloneFromParent" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1863,7 +2306,7 @@ func (client *VolumesClient) revertRelocationCreateRequest(ctx context.Context, // BeginUpdate - Patch the specified volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - poolName - The name of the capacity pool @@ -1891,7 +2334,7 @@ func (client *VolumesClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Patch the specified volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-01 +// Generated from API version 2023-11-01-preview func (client *VolumesClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumePatch, options *VolumesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginUpdate" @@ -1941,7 +2384,7 @@ func (client *VolumesClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-01") + reqQP.Set("api-version", "2023-11-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/volumes_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/volumes_client_example_test.go deleted file mode 100644 index dc35d19ad87b..000000000000 --- a/sdk/resourcemanager/netapp/armnetapp/volumes_client_example_test.go +++ /dev/null @@ -1,640 +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 armnetapp_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/netapp/armnetapp/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_List.json -func ExampleVolumesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewVolumesClient().NewListPager("myRG", "account1", "pool1", 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.VolumeList = armnetapp.VolumeList{ - // Value: []*armnetapp.Volume{ - // { - // Name: to.Ptr("account1/pool1/volume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("some-amazing-filepath"), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // NetworkFeatures: to.Ptr(armnetapp.NetworkFeaturesStandard), - // NetworkSiblingSetID: to.Ptr("0f434a03-ce0b-4935-81af-d98652ffb1c4"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // StorageToNetworkProximity: to.Ptr(armnetapp.VolumeStorageToNetworkProximityT2), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](128), - // UsageThreshold: to.Ptr[int64](107374182400), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Get.json -func ExampleVolumesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVolumesClient().Get(ctx, "myRG", "account1", "pool1", "volume1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Volume = armnetapp.Volume{ - // Name: to.Ptr("account1/pool1/volume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("some-amazing-filepath"), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // NetworkFeatures: to.Ptr(armnetapp.NetworkFeaturesStandard), - // NetworkSiblingSetID: to.Ptr("0f434a03-ce0b-4935-81af-d98652ffb1c4"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // StorageToNetworkProximity: to.Ptr(armnetapp.VolumeStorageToNetworkProximityT2), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](128), - // UsageThreshold: to.Ptr[int64](107374182400), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_CreateOrUpdate.json -func ExampleVolumesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginCreateOrUpdate(ctx, "myRG", "account1", "pool1", "volume1", armnetapp.Volume{ - Location: to.Ptr("eastus"), - Properties: &armnetapp.VolumeProperties{ - CreationToken: to.Ptr("my-unique-file-path"), - ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - UsageThreshold: to.Ptr[int64](107374182400), - }, - }, 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.Volume = armnetapp.Volume{ - // Name: to.Ptr("account1/pool1/volume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("some-amazing-filepath"), - // EncryptionKeySource: to.Ptr(armnetapp.EncryptionKeySourceMicrosoftNetApp), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](128), - // UsageThreshold: to.Ptr[int64](107374182400), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Update.json -func ExampleVolumesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginUpdate(ctx, "myRG", "account1", "pool1", "volume1", armnetapp.VolumePatch{}, 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.Volume = armnetapp.Volume{ - // Name: to.Ptr("account1/pool1/volume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("some-amazing-filepath"), - // DataProtection: &armnetapp.VolumePropertiesDataProtection{ - // Snapshot: &armnetapp.VolumeSnapshotProperties{ - // SnapshotPolicyID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRP/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1"), - // }, - // }, - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // NetworkFeatures: to.Ptr(armnetapp.NetworkFeaturesStandard), - // NetworkSiblingSetID: to.Ptr("0f434a03-ce0b-4935-81af-d98652ffb1c4"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // StorageToNetworkProximity: to.Ptr(armnetapp.VolumeStorageToNetworkProximityT2), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](128), - // UsageThreshold: to.Ptr[int64](107374182400), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Delete.json -func ExampleVolumesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginDelete(ctx, "myRG", "account1", "pool1", "volume1", &armnetapp.VolumesClientBeginDeleteOptions{ForceDelete: 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_PopulateAvailabilityZones.json -func ExampleVolumesClient_BeginPopulateAvailabilityZone() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginPopulateAvailabilityZone(ctx, "myRG", "account1", "pool1", "volume1", 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.Volume = armnetapp.Volume{ - // Name: to.Ptr("account1/pool1/volume1"), - // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"), - // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), - // Location: to.Ptr("eastus"), - // Properties: &armnetapp.VolumeProperties{ - // CreationToken: to.Ptr("some-amazing-filepath"), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), - // NetworkFeatures: to.Ptr(armnetapp.NetworkFeaturesStandard), - // NetworkSiblingSetID: to.Ptr("0f434a03-ce0b-4935-81af-d98652ffb1c4"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), - // StorageToNetworkProximity: to.Ptr(armnetapp.VolumeStorageToNetworkProximityT2), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - // ThroughputMibps: to.Ptr[float32](128), - // UsageThreshold: to.Ptr[int64](107374182400), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Revert.json -func ExampleVolumesClient_BeginRevert() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginRevert(ctx, "myRG", "account1", "pool1", "volume1", armnetapp.VolumeRevert{ - SnapshotID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), - }, 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ResetCifsPassword.json -func ExampleVolumesClient_BeginResetCifsPassword() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginResetCifsPassword(ctx, "myRG", "account1", "pool1", "volume1", 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_BreakFileLocks.json -func ExampleVolumesClient_BeginBreakFileLocks() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginBreakFileLocks(ctx, "myRG", "account1", "pool1", "volume1", &armnetapp.VolumesClientBeginBreakFileLocksOptions{Body: &armnetapp.BreakFileLocksRequest{ - ClientIP: to.Ptr("101.102.103.104"), - ConfirmRunningDisruptiveOperation: to.Ptr(true), - }, - }) - 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/GroupIdListForLDAPUser.json -func ExampleVolumesClient_BeginListGetGroupIDListForLdapUser() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginListGetGroupIDListForLdapUser(ctx, "myRG", "account1", "pool1", "volume1", armnetapp.GetGroupIDListForLDAPUserRequest{ - Username: to.Ptr("user1"), - }, 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.GetGroupIDListForLDAPUserResponse = armnetapp.GetGroupIDListForLDAPUserResponse{ - // GroupIDsForLdapUser: []*string{ - // to.Ptr("123"), - // to.Ptr("224")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_BreakReplication.json -func ExampleVolumesClient_BeginBreakReplication() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginBreakReplication(ctx, "myRG", "account1", "pool1", "volume1", &armnetapp.VolumesClientBeginBreakReplicationOptions{Body: &armnetapp.BreakReplicationRequest{ - ForceBreakReplication: to.Ptr(false), - }, - }) - 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ReestablishReplication.json -func ExampleVolumesClient_BeginReestablishReplication() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginReestablishReplication(ctx, "myRG", "account1", "pool1", "volume1", armnetapp.ReestablishReplicationRequest{ - SourceVolumeID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/mySourceRG/providers/Microsoft.NetApp/netAppAccounts/sourceAccount1/capacityPools/sourcePool1/volumes/sourceVolume1"), - }, 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ReplicationStatus.json -func ExampleVolumesClient_ReplicationStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVolumesClient().ReplicationStatus(ctx, "myRG", "account1", "pool1", "volume1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ReplicationStatus = armnetapp.ReplicationStatus{ - // ErrorMessage: to.Ptr(""), - // Healthy: to.Ptr(true), - // MirrorState: to.Ptr(armnetapp.MirrorStateMirrored), - // RelationshipStatus: to.Ptr(armnetapp.RelationshipStatusIdle), - // TotalProgress: to.Ptr("1048576"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ListReplications.json -func ExampleVolumesClient_NewListReplicationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewVolumesClient().NewListReplicationsPager("myRG", "account1", "pool1", "volume1", 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.ListReplications = armnetapp.ListReplications{ - // Value: []*armnetapp.Replication{ - // { - // RemoteVolumeRegion: to.Ptr("westus"), - // RemoteVolumeResourceID: to.Ptr("/subscriptions/36e85c76-e720-473e-881f-e2fe72f462d0/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account-5999/capacityPools/pool-0977/volumes/volume-4508"), - // ReplicationSchedule: to.Ptr(armnetapp.ReplicationScheduleDaily), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ResyncReplication.json -func ExampleVolumesClient_BeginResyncReplication() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginResyncReplication(ctx, "myRG", "account1", "pool1", "volume1", 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_DeleteReplication.json -func ExampleVolumesClient_BeginDeleteReplication() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginDeleteReplication(ctx, "myRG", "account1", "pool1", "volume1", 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_AuthorizeReplication.json -func ExampleVolumesClient_BeginAuthorizeReplication() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginAuthorizeReplication(ctx, "myRG", "account1", "pool1", "volume1", armnetapp.AuthorizeRequest{ - RemoteVolumeResourceID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRemoteRG/providers/Microsoft.NetApp/netAppAccounts/remoteAccount1/capacityPools/remotePool1/volumes/remoteVolume1"), - }, 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ReInitializeReplication.json -func ExampleVolumesClient_BeginReInitializeReplication() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginReInitializeReplication(ctx, "myRG", "account1", "pool1", "volume1", 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_PoolChange.json -func ExampleVolumesClient_BeginPoolChange() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginPoolChange(ctx, "myRG", "account1", "pool1", "volume1", armnetapp.PoolChangeRequest{ - NewPoolResourceID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - }, 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Relocate.json -func ExampleVolumesClient_BeginRelocate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginRelocate(ctx, "myRG", "account1", "pool1", "volume1", &armnetapp.VolumesClientBeginRelocateOptions{Body: &armnetapp.RelocateVolumeRequest{}}) - 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_FinalizeRelocation.json -func ExampleVolumesClient_BeginFinalizeRelocation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginFinalizeRelocation(ctx, "myRG", "account1", "pool1", "volume1", 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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_RevertRelocation.json -func ExampleVolumesClient_BeginRevertRelocation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armnetapp.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewVolumesClient().BeginRevertRelocation(ctx, "myRG", "account1", "pool1", "volume1", 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) - } -}