From 97085b4dfbb63114cbe489c1ebe55bc424e32fc5 Mon Sep 17 00:00:00 2001 From: ReleaseHelper Date: Fri, 26 Sep 2025 01:13:07 +0000 Subject: [PATCH] [Release] sdk/resourcemanager/netapp/armnetapp/8.0.0-beta.2 generation from spec commit: 8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6 --- .../netapp/armnetapp/CHANGELOG.md | 22 + .../netapp/armnetapp/README.md | 2 +- .../netapp/armnetapp/accounts_client.go | 54 +- .../armnetapp/accounts_client_example_test.go | 26 +- .../netapp/armnetapp/autorest.md | 8 +- .../netapp/armnetapp/backuppolicies_client.go | 26 +- .../backuppolicies_client_example_test.go | 12 +- .../netapp/armnetapp/backups_client.go | 34 +- .../armnetapp/backups_client_example_test.go | 20 +- .../armnetapp/backupsunderaccount_client.go | 6 +- ...backupsunderaccount_client_example_test.go | 4 +- .../backupsunderbackupvault_client.go | 6 +- ...upsunderbackupvault_client_example_test.go | 4 +- .../armnetapp/backupsundervolume_client.go | 6 +- .../backupsundervolume_client_example_test.go | 4 +- .../netapp/armnetapp/backupvaults_client.go | 26 +- .../backupvaults_client_example_test.go | 12 +- .../netapp/armnetapp/buckets_client.go | 565 +++++++++++++ .../armnetapp/buckets_client_example_test.go | 278 ++++++ .../netapp/armnetapp/client_factory.go | 16 + .../netapp/armnetapp/constants.go | 416 ++++++++- .../netapp/armnetapp/fake/accounts_server.go | 2 +- .../armnetapp/fake/backuppolicies_server.go | 2 +- .../netapp/armnetapp/fake/backups_server.go | 2 +- .../fake/backupsunderaccount_server.go | 2 +- .../fake/backupsunderbackupvault_server.go | 2 +- .../fake/backupsundervolume_server.go | 2 +- .../armnetapp/fake/backupvaults_server.go | 2 +- .../netapp/armnetapp/fake/buckets_server.go | 449 ++++++++++ .../armnetapp/fake/operations_server.go | 2 +- .../netapp/armnetapp/fake/pools_server.go | 2 +- .../netapp/armnetapp/fake/resource_server.go | 2 +- .../fake/resourcequotalimits_server.go | 4 +- .../fake/resourcequotalimitsaccount_server.go | 178 ++++ .../fake/resourceregioninfos_server.go | 2 +- .../armnetapp/fake/resourceusages_server.go | 2 +- .../netapp/armnetapp/fake/server_factory.go | 58 +- .../armnetapp/fake/snapshotpolicies_server.go | 2 +- .../netapp/armnetapp/fake/snapshots_server.go | 2 +- .../armnetapp/fake/subvolumes_server.go | 2 +- .../armnetapp/fake/volumegroups_server.go | 2 +- .../armnetapp/fake/volumequotarules_server.go | 2 +- .../netapp/armnetapp/fake/volumes_server.go | 68 +- sdk/resourcemanager/netapp/armnetapp/go.mod | 16 +- sdk/resourcemanager/netapp/armnetapp/go.sum | 24 +- .../netapp/armnetapp/models.go | 341 +++++++- .../netapp/armnetapp/models_serde.go | 797 +++++++++++++++--- .../netapp/armnetapp/operations_client.go | 4 +- .../operations_client_example_test.go | 4 +- .../netapp/armnetapp/options.go | 51 ++ .../netapp/armnetapp/pools_client.go | 26 +- .../armnetapp/pools_client_example_test.go | 34 +- .../netapp/armnetapp/resource_client.go | 26 +- .../armnetapp/resource_client_example_test.go | 40 +- .../armnetapp/resourcequotalimits_client.go | 12 +- ...resourcequotalimits_client_example_test.go | 30 +- .../resourcequotalimitsaccount_client.go | 177 ++++ ...equotalimitsaccount_client_example_test.go | 86 ++ .../armnetapp/resourceregioninfos_client.go | 8 +- ...resourceregioninfos_client_example_test.go | 6 +- .../netapp/armnetapp/resourceusages_client.go | 8 +- .../resourceusages_client_example_test.go | 6 +- .../netapp/armnetapp/responses.go | 64 +- .../armnetapp/snapshotpolicies_client.go | 28 +- .../snapshotpolicies_client_example_test.go | 18 +- .../netapp/armnetapp/snapshots_client.go | 32 +- .../snapshots_client_example_test.go | 14 +- .../netapp/armnetapp/subvolumes_client.go | 32 +- .../subvolumes_client_example_test.go | 14 +- .../netapp/armnetapp/version.go | 2 +- .../netapp/armnetapp/volumegroups_client.go | 20 +- .../volumegroups_client_example_test.go | 16 +- .../armnetapp/volumequotarules_client.go | 26 +- .../volumequotarules_client_example_test.go | 20 +- .../netapp/armnetapp/volumes_client.go | 243 ++++-- .../armnetapp/volumes_client_example_test.go | 146 +++- 76 files changed, 3993 insertions(+), 716 deletions(-) create mode 100644 sdk/resourcemanager/netapp/armnetapp/buckets_client.go create mode 100644 sdk/resourcemanager/netapp/armnetapp/buckets_client_example_test.go create mode 100644 sdk/resourcemanager/netapp/armnetapp/fake/buckets_server.go create mode 100644 sdk/resourcemanager/netapp/armnetapp/fake/resourcequotalimitsaccount_server.go create mode 100644 sdk/resourcemanager/netapp/armnetapp/resourcequotalimitsaccount_client.go create mode 100644 sdk/resourcemanager/netapp/armnetapp/resourcequotalimitsaccount_client_example_test.go diff --git a/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md b/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md index 3a1b88c328a5..c3fb048c0c71 100644 --- a/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md +++ b/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md @@ -1,5 +1,27 @@ # Release History +## 8.0.0-beta.2 (2025-10-24) +### Breaking Changes + +- Type of `BucketPatchProperties.ProvisioningState` has been changed from `*NetappProvisioningState` to `*NetAppProvisioningState` +- Type of `BucketProperties.ProvisioningState` has been changed from `*NetappProvisioningState` to `*NetAppProvisioningState` +- Type of `VolumeQuotaRulesProperties.ProvisioningState` has been changed from `*ProvisioningState` to `*NetAppProvisioningState` +- `RelationshipStatusFailed`, `RelationshipStatusUnknown` from enum `RelationshipStatus` has been removed +- Enum `NetappProvisioningState` has been removed +- Enum `ProvisioningState` has been removed +- Field `NextLink` of struct `ListQuotaReportResponse` has been removed + +### Features Added + +- New enum type `BucketPatchPermissions` with values `BucketPatchPermissionsReadOnly`, `BucketPatchPermissionsReadWrite` +- New enum type `BucketPermissions` with values `BucketPermissionsReadOnly`, `BucketPermissionsReadWrite` +- New enum type `NetAppProvisioningState` with values `NetAppProvisioningStateAccepted`, `NetAppProvisioningStateCanceled`, `NetAppProvisioningStateDeleting`, `NetAppProvisioningStateFailed`, `NetAppProvisioningStateMoving`, `NetAppProvisioningStateProvisioning`, `NetAppProvisioningStateSucceeded`, `NetAppProvisioningStateUpdating` +- New field `Permissions` in struct `BucketPatchProperties` +- New field `Permissions` in struct `BucketProperties` +- New field `MirrorState`, `RelationshipStatus` in struct `ReplicationObject` +- New anonymous field `Volume` in struct `VolumesClientSplitCloneFromParentResponse` + + ## 7.7.0 (2025-08-13) ### Features Added diff --git a/sdk/resourcemanager/netapp/armnetapp/README.md b/sdk/resourcemanager/netapp/armnetapp/README.md index 1525acdd8600..872e09e93bbf 100644 --- a/sdk/resourcemanager/netapp/armnetapp/README.md +++ b/sdk/resourcemanager/netapp/armnetapp/README.md @@ -18,7 +18,7 @@ This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for ve Install the Azure NetApp Files module: ```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7 +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8 ``` ## Authorization diff --git a/sdk/resourcemanager/netapp/armnetapp/accounts_client.go b/sdk/resourcemanager/netapp/armnetapp/accounts_client.go index 913573d54c1e..de286ea4e4e5 100644 --- a/sdk/resourcemanager/netapp/armnetapp/accounts_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/accounts_client.go @@ -44,7 +44,7 @@ func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, // HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -71,7 +71,7 @@ func (client *AccountsClient) BeginChangeKeyVault(ctx context.Context, resourceG // to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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" @@ -113,7 +113,7 @@ func (client *AccountsClient) changeKeyVaultCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { @@ -128,7 +128,7 @@ func (client *AccountsClient) changeKeyVaultCreateRequest(ctx context.Context, r // 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 2025-06-01 +// Generated from API version 2025-07-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. @@ -155,7 +155,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -197,7 +197,7 @@ func (client *AccountsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -209,7 +209,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 2025-06-01 +// Generated from API version 2025-07-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. @@ -234,7 +234,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -276,7 +276,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -285,7 +285,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 2025-06-01 +// Generated from API version 2025-07-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. @@ -331,7 +331,7 @@ func (client *AccountsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -351,7 +351,7 @@ func (client *AccountsClient) getHandleResponse(resp *http.Response) (AccountsCl // request body for POST request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -379,7 +379,7 @@ func (client *AccountsClient) BeginGetChangeKeyVaultInformation(ctx context.Cont // request body for POST request. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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" @@ -421,7 +421,7 @@ func (client *AccountsClient) getChangeKeyVaultInformationCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -429,7 +429,7 @@ func (client *AccountsClient) getChangeKeyVaultInformationCreateRequest(ctx cont // NewListPager - List and describe all NetApp accounts in the resource group. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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] { @@ -471,7 +471,7 @@ func (client *AccountsClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -488,7 +488,7 @@ func (client *AccountsClient) listHandleResponse(resp *http.Response) (AccountsC // NewListBySubscriptionPager - List and describe all NetApp accounts in the subscription. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview // - options - AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager // method. func (client *AccountsClient) NewListBySubscriptionPager(options *AccountsClientListBySubscriptionOptions) *runtime.Pager[AccountsClientListBySubscriptionResponse] { @@ -526,7 +526,7 @@ func (client *AccountsClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -546,7 +546,7 @@ func (client *AccountsClient) listBySubscriptionHandleResponse(resp *http.Respon // operation will fix it. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -574,7 +574,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -616,7 +616,7 @@ func (client *AccountsClient) renewCredentialsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -627,7 +627,7 @@ func (client *AccountsClient) renewCredentialsCreateRequest(ctx context.Context, // another account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of the NetApp account // - options - AccountsClientBeginTransitionToCmkOptions contains the optional parameters for the AccountsClient.BeginTransitionToCmk @@ -655,7 +655,7 @@ func (client *AccountsClient) BeginTransitionToCmk(ctx context.Context, resource // another account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview func (client *AccountsClient) transitionToCmk(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginTransitionToCmkOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginTransitionToCmk" @@ -697,7 +697,7 @@ func (client *AccountsClient) transitionToCmkCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { @@ -712,7 +712,7 @@ func (client *AccountsClient) transitionToCmkCreateRequest(ctx context.Context, // BeginUpdate - Patch the specified NetApp account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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. @@ -738,7 +738,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -780,7 +780,7 @@ func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 0ae5571aec5b..82908f111cbe 100644 --- a/sdk/resourcemanager/netapp/armnetapp/accounts_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/accounts_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_ListBySubscription.json func ExampleAccountsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -55,7 +55,7 @@ func ExampleAccountsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_List.json func ExampleAccountsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -92,7 +92,7 @@ func ExampleAccountsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_Get.json func ExampleAccountsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -135,7 +135,7 @@ func ExampleAccountsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_CreateOrUpdate.json func ExampleAccountsClient_BeginCreateOrUpdate_accountsCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -171,7 +171,7 @@ func ExampleAccountsClient_BeginCreateOrUpdate_accountsCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_CreateOrUpdateAD.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_CreateOrUpdateAD.json func ExampleAccountsClient_BeginCreateOrUpdate_accountsCreateOrUpdateWithActiveDirectory() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -193,7 +193,7 @@ func ExampleAccountsClient_BeginCreateOrUpdate_accountsCreateOrUpdateWithActiveD LdapOverTLS: to.Ptr(false), LdapSigning: to.Ptr(false), OrganizationalUnit: to.Ptr("OU=Engineering"), - Password: to.Ptr("ad_password"), + Password: to.Ptr(""), Site: to.Ptr("SiteName"), SmbServerName: to.Ptr("SMBServer"), Username: to.Ptr("ad_user_name"), @@ -234,7 +234,7 @@ func ExampleAccountsClient_BeginCreateOrUpdate_accountsCreateOrUpdateWithActiveD // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_Delete.json func ExampleAccountsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -255,7 +255,7 @@ func ExampleAccountsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_Update.json func ExampleAccountsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -292,7 +292,7 @@ func ExampleAccountsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_RenewCredentials.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_RenewCredentials.json func ExampleAccountsClient_BeginRenewCredentials() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -313,7 +313,7 @@ func ExampleAccountsClient_BeginRenewCredentials() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_TransitionEncryptionKey.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_TransitionEncryptionKey.json func ExampleAccountsClient_BeginTransitionToCmk() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -338,7 +338,7 @@ func ExampleAccountsClient_BeginTransitionToCmk() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_GetChangeKeyVaultInformation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_GetChangeKeyVaultInformation.json func ExampleAccountsClient_BeginGetChangeKeyVaultInformation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -374,7 +374,7 @@ func ExampleAccountsClient_BeginGetChangeKeyVaultInformation() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Accounts_ChangeKeyVault.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Accounts_ChangeKeyVault.json func ExampleAccountsClient_BeginChangeKeyVault() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/autorest.md b/sdk/resourcemanager/netapp/armnetapp/autorest.md index e238859e330f..125e91d002c9 100644 --- a/sdk/resourcemanager/netapp/armnetapp/autorest.md +++ b/sdk/resourcemanager/netapp/armnetapp/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 7.7.0 -tag: package-2025-06-01 +module-version: 8.0.0-beta.2 +tag: package-preview-2025-07-01-preview ``` \ 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 04fc64ecacf8..37644f735c75 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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. @@ -71,7 +71,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -117,7 +117,7 @@ func (client *BackupPoliciesClient) createCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -129,7 +129,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 2025-06-01 +// Generated from API version 2025-07-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. @@ -156,7 +156,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -202,7 +202,7 @@ func (client *BackupPoliciesClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -211,7 +211,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 2025-06-01 +// Generated from API version 2025-07-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. @@ -262,7 +262,7 @@ func (client *BackupPoliciesClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,7 +279,7 @@ func (client *BackupPoliciesClient) getHandleResponse(resp *http.Response) (Back // NewListPager - List backup policies for Netapp Account // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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. @@ -327,7 +327,7 @@ func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -345,7 +345,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 2025-06-01 +// Generated from API version 2025-07-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. @@ -373,7 +373,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -419,7 +419,7 @@ func (client *BackupPoliciesClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 85964d7990f7..6eee59624c4d 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/backuppolicies_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupPolicies_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupPolicies_List.json func ExampleBackupPoliciesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,7 +59,7 @@ func ExampleBackupPoliciesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupPolicies_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupPolicies_Get.json func ExampleBackupPoliciesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,7 +98,7 @@ func ExampleBackupPoliciesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupPolicies_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupPolicies_Create.json func ExampleBackupPoliciesClient_BeginCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -143,7 +143,7 @@ func ExampleBackupPoliciesClient_BeginCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupPolicies_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupPolicies_Update.json func ExampleBackupPoliciesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -195,7 +195,7 @@ func ExampleBackupPoliciesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupPolicies_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupPolicies_Delete.json func ExampleBackupPoliciesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backups_client.go b/sdk/resourcemanager/netapp/armnetapp/backups_client.go index 74bf9af55875..20682e3d939e 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backups_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backups_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -71,7 +71,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -121,7 +121,7 @@ func (client *BackupsClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -133,7 +133,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -160,7 +160,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -210,7 +210,7 @@ func (client *BackupsClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -219,7 +219,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -275,7 +275,7 @@ func (client *BackupsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -293,7 +293,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -349,7 +349,7 @@ func (client *BackupsClient) getLatestStatusCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -367,7 +367,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -424,7 +424,7 @@ func (client *BackupsClient) getVolumeLatestRestoreStatusCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -441,7 +441,7 @@ func (client *BackupsClient) getVolumeLatestRestoreStatusHandleResponse(resp *ht // NewListByVaultPager - List all backups Under a Backup Vault // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -496,7 +496,7 @@ func (client *BackupsClient) listByVaultCreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -514,7 +514,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -542,7 +542,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -592,7 +592,7 @@ func (client *BackupsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 9bc15f150bde..d8e9fcedff7f 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backups_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/backups_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_LatestBackupStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_LatestBackupStatus.json func ExampleBackupsClient_GetLatestStatus() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -48,7 +48,7 @@ func ExampleBackupsClient_GetLatestStatus() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_LatestRestoreStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_LatestRestoreStatus.json func ExampleBackupsClient_GetVolumeLatestRestoreStatus() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -76,7 +76,7 @@ func ExampleBackupsClient_GetVolumeLatestRestoreStatus() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupsUnderBackupVault_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupsUnderBackupVault_List.json func ExampleBackupsClient_NewListByVaultPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -107,12 +107,10 @@ func ExampleBackupsClient_NewListByVaultPager() { // Properties: &armnetapp.BackupProperties{ // BackupPolicyResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolicies/policy1"), // BackupType: to.Ptr(armnetapp.BackupTypeManual), - // CompletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), // 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), - // SnapshotCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), // SnapshotName: to.Ptr("backup1"), // VolumeResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1"), // }, @@ -121,7 +119,7 @@ func ExampleBackupsClient_NewListByVaultPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupsUnderBackupVault_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupsUnderBackupVault_Get.json func ExampleBackupsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -146,19 +144,17 @@ func ExampleBackupsClient_Get() { // Properties: &armnetapp.BackupProperties{ // BackupPolicyResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolicies/policy1"), // BackupType: to.Ptr(armnetapp.BackupTypeManual), - // CompletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), // 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), - // SnapshotCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T13:23:33.000Z"); return t}()), // SnapshotName: to.Ptr("backup1"), // VolumeResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupsUnderBackupVault_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupsUnderBackupVault_Create.json func ExampleBackupsClient_BeginCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -201,7 +197,7 @@ func ExampleBackupsClient_BeginCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupsUnderBackupVault_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupsUnderBackupVault_Update.json func ExampleBackupsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -239,7 +235,7 @@ func ExampleBackupsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupsUnderBackupVault_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupsUnderBackupVault_Delete.json func ExampleBackupsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client.go b/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client.go index fe014bd7bc87..8407a4e69da8 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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. @@ -70,7 +70,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -112,7 +112,7 @@ func (client *BackupsUnderAccountClient) migrateBackupsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 3e56c6a61d65..066ef60cf574 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupsunderaccount_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupsUnderAccount_Migrate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupsUnderAccount_Migrate.json func ExampleBackupsUnderAccountClient_BeginMigrateBackups() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client.go b/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client.go index a1b98fd4d92a..d0ca43f5981c 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -72,7 +72,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -122,7 +122,7 @@ func (client *BackupsUnderBackupVaultClient) restoreFilesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index a4a02b2d8692..5d2c853d9f22 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupsunderbackupvault_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupsUnderBackupVault_SingleFileRestore.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupsUnderBackupVault_SingleFileRestore.json func ExampleBackupsUnderBackupVaultClient_BeginRestoreFiles() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client.go b/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client.go index 9088826bb7dc..1b320be4258d 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -72,7 +72,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -122,7 +122,7 @@ func (client *BackupsUnderVolumeClient) migrateBackupsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index deca5e8e21eb..1099b7a2f8e0 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupsundervolume_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupsUnderVolume_Migrate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupsUnderVolume_Migrate.json func ExampleBackupsUnderVolumeClient_BeginMigrateBackups() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/backupvaults_client.go b/sdk/resourcemanager/netapp/armnetapp/backupvaults_client.go index 3bea8eb7a687..5b715607011d 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupvaults_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupvaults_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -71,7 +71,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -117,7 +117,7 @@ func (client *BackupVaultsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -129,7 +129,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -156,7 +156,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -202,7 +202,7 @@ func (client *BackupVaultsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -211,7 +211,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -262,7 +262,7 @@ func (client *BackupVaultsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,7 +279,7 @@ func (client *BackupVaultsClient) getHandleResponse(resp *http.Response) (Backup // NewListByNetAppAccountPager - List and describe all Backup Vaults in the NetApp account. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -327,7 +327,7 @@ func (client *BackupVaultsClient) listByNetAppAccountCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -345,7 +345,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -373,7 +373,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -419,7 +419,7 @@ func (client *BackupVaultsClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 0bb9d1680416..d3371168451e 100644 --- a/sdk/resourcemanager/netapp/armnetapp/backupvaults_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/backupvaults_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupVaults_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupVaults_List.json func ExampleBackupVaultsClient_NewListByNetAppAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -58,7 +58,7 @@ func ExampleBackupVaultsClient_NewListByNetAppAccountPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupVaults_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupVaults_Get.json func ExampleBackupVaultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -90,7 +90,7 @@ func ExampleBackupVaultsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupVaults_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupVaults_Create.json func ExampleBackupVaultsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -125,7 +125,7 @@ func ExampleBackupVaultsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupVaults_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupVaults_Update.json func ExampleBackupVaultsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -165,7 +165,7 @@ func ExampleBackupVaultsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/BackupVaults_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/BackupVaults_Delete.json func ExampleBackupVaultsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/buckets_client.go b/sdk/resourcemanager/netapp/armnetapp/buckets_client.go new file mode 100644 index 000000000000..d31e53edfff9 --- /dev/null +++ b/sdk/resourcemanager/netapp/armnetapp/buckets_client.go @@ -0,0 +1,565 @@ +// 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. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BucketsClient contains the methods for the Buckets group. +// Don't use this type directly, use NewBucketsClient() instead. +type BucketsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBucketsClient creates a new instance of BucketsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBucketsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BucketsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BucketsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, +// connect to the volume data contained in those buckets. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-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 +// - bucketName - The name of the bucket +// - body - The bucket details including user details, and the volume path that should be mounted inside the bucket. +// - options - BucketsClientBeginCreateOrUpdateOptions contains the optional parameters for the BucketsClient.BeginCreateOrUpdate +// method. +func (client *BucketsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body Bucket, options *BucketsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BucketsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, accountName, poolName, volumeName, bucketName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BucketsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BucketsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect +// to the volume data contained in those buckets. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-01-preview +func (client *BucketsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body Bucket, options *BucketsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BucketsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, bucketName, 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.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BucketsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body Bucket, _ *BucketsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}" + 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)) + if bucketName == "" { + return nil, errors.New("parameter bucketName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bucketName}", url.PathEscape(bucketName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-07-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 +} + +// BeginDelete - Delete a volume's bucket. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-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 +// - bucketName - The name of the bucket +// - options - BucketsClientBeginDeleteOptions contains the optional parameters for the BucketsClient.BeginDelete method. +func (client *BucketsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, options *BucketsClientBeginDeleteOptions) (*runtime.Poller[BucketsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, volumeName, bucketName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BucketsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BucketsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a volume's bucket. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-01-preview +func (client *BucketsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, options *BucketsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BucketsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, bucketName, 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, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BucketsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, _ *BucketsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}" + 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)) + if bucketName == "" { + return nil, errors.New("parameter bucketName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bucketName}", url.PathEscape(bucketName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-07-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GenerateCredentials - Generate the access key and secret key used for accessing the specified volume bucket. Also return +// expiry date and time of key pair (in UTC). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-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 +// - bucketName - The name of the bucket +// - body - The bucket's Access and Secret key pair expiry time expressed as the number of days from now. +// - options - BucketsClientGenerateCredentialsOptions contains the optional parameters for the BucketsClient.GenerateCredentials +// method. +func (client *BucketsClient) GenerateCredentials(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body BucketCredentialsExpiry, options *BucketsClientGenerateCredentialsOptions) (BucketsClientGenerateCredentialsResponse, error) { + var err error + const operationName = "BucketsClient.GenerateCredentials" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateCredentialsCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, bucketName, body, options) + if err != nil { + return BucketsClientGenerateCredentialsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BucketsClientGenerateCredentialsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BucketsClientGenerateCredentialsResponse{}, err + } + resp, err := client.generateCredentialsHandleResponse(httpResp) + return resp, err +} + +// generateCredentialsCreateRequest creates the GenerateCredentials request. +func (client *BucketsClient) generateCredentialsCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body BucketCredentialsExpiry, _ *BucketsClientGenerateCredentialsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials" + 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)) + if bucketName == "" { + return nil, errors.New("parameter bucketName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bucketName}", url.PathEscape(bucketName)) + 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", "2025-07-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 +} + +// generateCredentialsHandleResponse handles the GenerateCredentials response. +func (client *BucketsClient) generateCredentialsHandleResponse(resp *http.Response) (BucketsClientGenerateCredentialsResponse, error) { + result := BucketsClientGenerateCredentialsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BucketGenerateCredentials); err != nil { + return BucketsClientGenerateCredentialsResponse{}, err + } + return result, nil +} + +// Get - Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, connect +// to the volume data contained in those buckets. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-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 +// - bucketName - The name of the bucket +// - options - BucketsClientGetOptions contains the optional parameters for the BucketsClient.Get method. +func (client *BucketsClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, options *BucketsClientGetOptions) (BucketsClientGetResponse, error) { + var err error + const operationName = "BucketsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, bucketName, options) + if err != nil { + return BucketsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BucketsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BucketsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BucketsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, _ *BucketsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}" + 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)) + if bucketName == "" { + return nil, errors.New("parameter bucketName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bucketName}", url.PathEscape(bucketName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-07-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BucketsClient) getHandleResponse(resp *http.Response) (BucketsClientGetResponse, error) { + result := BucketsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Bucket); err != nil { + return BucketsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect +// to the volume data contained in those buckets. +// +// Generated from API version 2025-07-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 - BucketsClientListOptions contains the optional parameters for the BucketsClient.NewListPager method. +func (client *BucketsClient) NewListPager(resourceGroupName string, accountName string, poolName string, volumeName string, options *BucketsClientListOptions) *runtime.Pager[BucketsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BucketsClientListResponse]{ + More: func(page BucketsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BucketsClientListResponse) (BucketsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BucketsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + }, nil) + if err != nil { + return BucketsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BucketsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *BucketsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets" + 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.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-07-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BucketsClient) listHandleResponse(resp *http.Response) (BucketsClientListResponse, error) { + result := BucketsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BucketList); err != nil { + return BucketsClientListResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates the details of a volume bucket. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-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 +// - bucketName - The name of the bucket +// - body - The bucket details including user details, and the volume path that should be mounted inside the bucket. +// - options - BucketsClientBeginUpdateOptions contains the optional parameters for the BucketsClient.BeginUpdate method. +func (client *BucketsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body BucketPatch, options *BucketsClientBeginUpdateOptions) (*runtime.Poller[BucketsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, poolName, volumeName, bucketName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BucketsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BucketsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates the details of a volume bucket. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-01-preview +func (client *BucketsClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body BucketPatch, options *BucketsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BucketsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, bucketName, 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 +} + +// updateCreateRequest creates the Update request. +func (client *BucketsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body BucketPatch, _ *BucketsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}" + 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)) + if bucketName == "" { + return nil, errors.New("parameter bucketName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bucketName}", url.PathEscape(bucketName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-07-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 +} diff --git a/sdk/resourcemanager/netapp/armnetapp/buckets_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/buckets_client_example_test.go new file mode 100644 index 000000000000..33106a055f26 --- /dev/null +++ b/sdk/resourcemanager/netapp/armnetapp/buckets_client_example_test.go @@ -0,0 +1,278 @@ +//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/v8" +) + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Buckets_List.json +func ExampleBucketsClient_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.NewBucketsClient().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.BucketList = armnetapp.BucketList{ + // Value: []*armnetapp.Bucket{ + // { + // Name: to.Ptr("account1/pool1/volume1/bucket1"), + // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/buckets"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/buckets/bucket1"), + // Properties: &armnetapp.BucketProperties{ + // Path: to.Ptr("/path"), + // FileSystemUser: &armnetapp.FileSystemUser{ + // NfsUser: &armnetapp.NfsUser{ + // GroupID: to.Ptr[int64](1000), + // UserID: to.Ptr[int64](1001), + // }, + // }, + // Permissions: to.Ptr(armnetapp.BucketPermissionsReadOnly), + // ProvisioningState: to.Ptr(armnetapp.NetAppProvisioningStateSucceeded), + // Server: &armnetapp.BucketServerProperties{ + // CertificateCommonName: to.Ptr("www.example.com"), + // CertificateExpiryDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2027-08-15T13:23:32.000Z"); return t}()), + // Fqdn: to.Ptr("fullyqualified.domainname.com"), + // IPAddress: to.Ptr("1.2.3.4"), + // }, + // Status: to.Ptr(armnetapp.CredentialsStatusActive), + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Buckets_Get.json +func ExampleBucketsClient_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.NewBucketsClient().Get(ctx, "myRG", "account1", "pool1", "volume1", "bucket1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.Bucket = armnetapp.Bucket{ + // Name: to.Ptr("account1/pool1/volume1/bucket1"), + // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/buckets"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/buckets/bucket1"), + // Properties: &armnetapp.BucketProperties{ + // Path: to.Ptr("/path"), + // FileSystemUser: &armnetapp.FileSystemUser{ + // NfsUser: &armnetapp.NfsUser{ + // GroupID: to.Ptr[int64](1000), + // UserID: to.Ptr[int64](1001), + // }, + // }, + // Permissions: to.Ptr(armnetapp.BucketPermissionsReadOnly), + // ProvisioningState: to.Ptr(armnetapp.NetAppProvisioningStateSucceeded), + // Server: &armnetapp.BucketServerProperties{ + // CertificateCommonName: to.Ptr("www.example.com"), + // CertificateExpiryDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2027-08-15T13:23:32.000Z"); return t}()), + // Fqdn: to.Ptr("fullyqualified.domainname.com"), + // IPAddress: to.Ptr("1.2.3.4"), + // }, + // Status: to.Ptr(armnetapp.CredentialsStatusCredentialsExpired), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Buckets_CreateOrUpdate.json +func ExampleBucketsClient_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.NewBucketsClient().BeginCreateOrUpdate(ctx, "myRG", "account1", "pool1", "volume1", "bucket1", armnetapp.Bucket{ + Properties: &armnetapp.BucketProperties{ + Path: to.Ptr("/path"), + FileSystemUser: &armnetapp.FileSystemUser{ + NfsUser: &armnetapp.NfsUser{ + GroupID: to.Ptr[int64](1000), + UserID: to.Ptr[int64](1001), + }, + }, + Permissions: to.Ptr(armnetapp.BucketPermissionsReadOnly), + Server: &armnetapp.BucketServerProperties{ + CertificateObject: to.Ptr(""), + Fqdn: to.Ptr("fullyqualified.domainname.com"), + }, + }, + }, 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.Bucket = armnetapp.Bucket{ + // Name: to.Ptr("account1/pool1/volume1/bucket1"), + // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/buckets"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/buckets/bucket1"), + // Properties: &armnetapp.BucketProperties{ + // Path: to.Ptr("/path"), + // FileSystemUser: &armnetapp.FileSystemUser{ + // NfsUser: &armnetapp.NfsUser{ + // GroupID: to.Ptr[int64](1000), + // UserID: to.Ptr[int64](1001), + // }, + // }, + // Permissions: to.Ptr(armnetapp.BucketPermissionsReadOnly), + // ProvisioningState: to.Ptr(armnetapp.NetAppProvisioningStateSucceeded), + // Server: &armnetapp.BucketServerProperties{ + // CertificateCommonName: to.Ptr("www.example.com"), + // CertificateExpiryDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2027-08-15T13:23:32.000Z"); return t}()), + // Fqdn: to.Ptr("fullyqualified.domainname.com"), + // IPAddress: to.Ptr("1.2.3.4"), + // }, + // Status: to.Ptr(armnetapp.CredentialsStatusNoCredentialsSet), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Buckets_Update.json +func ExampleBucketsClient_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.NewBucketsClient().BeginUpdate(ctx, "myRG", "account1", "pool1", "volume1", "bucket1", armnetapp.BucketPatch{ + Properties: &armnetapp.BucketPatchProperties{ + Permissions: to.Ptr(armnetapp.BucketPatchPermissionsReadWrite), + Server: &armnetapp.BucketServerPatchProperties{ + CertificateObject: to.Ptr(""), + Fqdn: to.Ptr("fullyqualified.domainname.com"), + }, + }, + }, 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.Bucket = armnetapp.Bucket{ + // Name: to.Ptr("account1/pool1/volume1/bucket1"), + // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/buckets"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/buckets/bucket1"), + // Properties: &armnetapp.BucketProperties{ + // Path: to.Ptr("/path"), + // FileSystemUser: &armnetapp.FileSystemUser{ + // NfsUser: &armnetapp.NfsUser{ + // GroupID: to.Ptr[int64](1000), + // UserID: to.Ptr[int64](1001), + // }, + // }, + // Permissions: to.Ptr(armnetapp.BucketPermissionsReadWrite), + // ProvisioningState: to.Ptr(armnetapp.NetAppProvisioningStateSucceeded), + // Server: &armnetapp.BucketServerProperties{ + // CertificateCommonName: to.Ptr("www.example.com"), + // CertificateExpiryDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2027-08-15T13:23:32.000Z"); return t}()), + // Fqdn: to.Ptr("fullyqualified.domainname.com"), + // IPAddress: to.Ptr("1.2.3.4"), + // }, + // Status: to.Ptr(armnetapp.CredentialsStatusActive), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Buckets_Delete.json +func ExampleBucketsClient_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.NewBucketsClient().BeginDelete(ctx, "myRG", "account1", "pool1", "volume1", "bucket1", 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/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Buckets_GenerateCredentials.json +func ExampleBucketsClient_GenerateCredentials() { + 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.NewBucketsClient().GenerateCredentials(ctx, "myRG", "account1", "pool1", "volume1", "bucket1", armnetapp.BucketCredentialsExpiry{ + KeyPairExpiryDays: 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.BucketGenerateCredentials = armnetapp.BucketGenerateCredentials{ + // AccessKey: to.Ptr(""), + // KeyPairExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2027-08-15T13:23:33.000Z"); return t}()), + // SecretKey: to.Ptr(""), + // } +} diff --git a/sdk/resourcemanager/netapp/armnetapp/client_factory.go b/sdk/resourcemanager/netapp/armnetapp/client_factory.go index 71ec8d8328a9..f6d465abb011 100644 --- a/sdk/resourcemanager/netapp/armnetapp/client_factory.go +++ b/sdk/resourcemanager/netapp/armnetapp/client_factory.go @@ -89,6 +89,14 @@ func (c *ClientFactory) NewBackupsUnderVolumeClient() *BackupsUnderVolumeClient } } +// NewBucketsClient creates a new instance of BucketsClient. +func (c *ClientFactory) NewBucketsClient() *BucketsClient { + return &BucketsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + // NewOperationsClient creates a new instance of OperationsClient. func (c *ClientFactory) NewOperationsClient() *OperationsClient { return &OperationsClient{ @@ -112,6 +120,14 @@ func (c *ClientFactory) NewResourceClient() *ResourceClient { } } +// NewResourceQuotaLimitsAccountClient creates a new instance of ResourceQuotaLimitsAccountClient. +func (c *ClientFactory) NewResourceQuotaLimitsAccountClient() *ResourceQuotaLimitsAccountClient { + return &ResourceQuotaLimitsAccountClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + // NewResourceQuotaLimitsClient creates a new instance of ResourceQuotaLimitsClient. func (c *ClientFactory) NewResourceQuotaLimitsClient() *ResourceQuotaLimitsClient { return &ResourceQuotaLimitsClient{ diff --git a/sdk/resourcemanager/netapp/armnetapp/constants.go b/sdk/resourcemanager/netapp/armnetapp/constants.go index 8f6ee36d1ae3..75d99e6a5123 100644 --- a/sdk/resourcemanager/netapp/armnetapp/constants.go +++ b/sdk/resourcemanager/netapp/armnetapp/constants.go @@ -105,6 +105,43 @@ func PossibleBackupTypeValues() []BackupType { } } +// BucketPatchPermissions - Access permissions for the bucket. Either ReadOnly or ReadWrite. +type BucketPatchPermissions string + +const ( + // BucketPatchPermissionsReadOnly - Read-only access to bucket. + BucketPatchPermissionsReadOnly BucketPatchPermissions = "ReadOnly" + // BucketPatchPermissionsReadWrite - Read-write access to bucket. + BucketPatchPermissionsReadWrite BucketPatchPermissions = "ReadWrite" +) + +// PossibleBucketPatchPermissionsValues returns the possible values for the BucketPatchPermissions const type. +func PossibleBucketPatchPermissionsValues() []BucketPatchPermissions { + return []BucketPatchPermissions{ + BucketPatchPermissionsReadOnly, + BucketPatchPermissionsReadWrite, + } +} + +// BucketPermissions - Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value +// is provided during bucket creation. +type BucketPermissions string + +const ( + // BucketPermissionsReadOnly - Read-only access to bucket. + BucketPermissionsReadOnly BucketPermissions = "ReadOnly" + // BucketPermissionsReadWrite - Read-write access to bucket. + BucketPermissionsReadWrite BucketPermissions = "ReadWrite" +) + +// PossibleBucketPermissionsValues returns the possible values for the BucketPermissions const type. +func PossibleBucketPermissionsValues() []BucketPermissions { + return []BucketPermissions{ + BucketPermissionsReadOnly, + BucketPermissionsReadWrite, + } +} + // CheckNameResourceTypes - Resource type used for verification. type CheckNameResourceTypes string @@ -224,6 +261,30 @@ func PossibleCreatedByTypeValues() []CreatedByType { } } +// CredentialsStatus - The bucket credentials status. There states: +// "NoCredentialsSet": Access and Secret key pair have not been generated. "CredentialsExpired": Access and Secret key pair +// have expired. "Active": The certificate has been installed and credentials are +// unexpired. +type CredentialsStatus string + +const ( + // CredentialsStatusActive - The certificate has been installed on the bucket server and the bucket credentials are unexpired. + CredentialsStatusActive CredentialsStatus = "Active" + // CredentialsStatusCredentialsExpired - Access and Secret key pair have expired. + CredentialsStatusCredentialsExpired CredentialsStatus = "CredentialsExpired" + // CredentialsStatusNoCredentialsSet - Access and Secret key pair have not been generated. + CredentialsStatusNoCredentialsSet CredentialsStatus = "NoCredentialsSet" +) + +// PossibleCredentialsStatusValues returns the possible values for the CredentialsStatus const type. +func PossibleCredentialsStatusValues() []CredentialsStatus { + return []CredentialsStatus{ + CredentialsStatusActive, + CredentialsStatusCredentialsExpired, + CredentialsStatusNoCredentialsSet, + } +} + // EnableSubvolumes - Flag indicating whether subvolume operations are enabled on the volume type EnableSubvolumes string @@ -297,6 +358,39 @@ func PossibleEndpointTypeValues() []EndpointType { } } +// ExternalReplicationSetupStatus - Property that only applies to external replications. Provides a machine-readable value +// for the status of the external replication setup. +type ExternalReplicationSetupStatus string + +const ( + // ExternalReplicationSetupStatusClusterPeerPending - The peering needs to be accepted on your cluster before the setup can + // proceed + ExternalReplicationSetupStatusClusterPeerPending ExternalReplicationSetupStatus = "ClusterPeerPending" + // ExternalReplicationSetupStatusClusterPeerRequired - Your cluster needs to be peered by using the 'peerExternalCluster' + // action + ExternalReplicationSetupStatusClusterPeerRequired ExternalReplicationSetupStatus = "ClusterPeerRequired" + // ExternalReplicationSetupStatusNoActionRequired - External Replication setup is complete, you can now monitor the 'mirrorState' + // in the replication status for the health of the replication + ExternalReplicationSetupStatusNoActionRequired ExternalReplicationSetupStatus = "NoActionRequired" + // ExternalReplicationSetupStatusReplicationCreateRequired - Need to call 'authorizeExternalReplication' to finish setting + // up the external replication + ExternalReplicationSetupStatusReplicationCreateRequired ExternalReplicationSetupStatus = "ReplicationCreateRequired" + // ExternalReplicationSetupStatusVServerPeerRequired - Need to call 'authorizeExternalReplication' and accept the returned + // 'vserver peer accept' command on your cluster to finish setting up the external replication + ExternalReplicationSetupStatusVServerPeerRequired ExternalReplicationSetupStatus = "VServerPeerRequired" +) + +// PossibleExternalReplicationSetupStatusValues returns the possible values for the ExternalReplicationSetupStatus const type. +func PossibleExternalReplicationSetupStatusValues() []ExternalReplicationSetupStatus { + return []ExternalReplicationSetupStatus{ + ExternalReplicationSetupStatusClusterPeerPending, + ExternalReplicationSetupStatusClusterPeerRequired, + ExternalReplicationSetupStatusNoActionRequired, + ExternalReplicationSetupStatusReplicationCreateRequired, + ExternalReplicationSetupStatusVServerPeerRequired, + } +} + // FileAccessLogs - Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings // present on the volume. type FileAccessLogs string @@ -378,6 +472,24 @@ func PossibleKeyVaultStatusValues() []KeyVaultStatus { } } +// LdapServerType - The type of the LDAP server +type LdapServerType string + +const ( + // LdapServerTypeActiveDirectory - The volume should use Active Directory for LDAP connections. + LdapServerTypeActiveDirectory LdapServerType = "ActiveDirectory" + // LdapServerTypeOpenLDAP - The volume should use OpenLDAP for LDAP connections. + LdapServerTypeOpenLDAP LdapServerType = "OpenLDAP" +) + +// PossibleLdapServerTypeValues returns the possible values for the LdapServerType const type. +func PossibleLdapServerTypeValues() []LdapServerType { + return []LdapServerType{ + LdapServerTypeActiveDirectory, + LdapServerTypeOpenLDAP, + } +} + // ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). type ManagedServiceIdentityType string @@ -411,12 +523,17 @@ func PossibleMetricAggregationTypeValues() []MetricAggregationType { } } -// MirrorState - The status of the replication +// MirrorState - The mirror state property describes the current status of data replication for a resource. It provides insight +// into whether the data is actively being mirrored, if the replication process has been +// paused, or if it has yet to be initialized. type MirrorState string const ( - MirrorStateBroken MirrorState = "Broken" - MirrorStateMirrored MirrorState = "Mirrored" + // MirrorStateBroken - The mirror state is broken + MirrorStateBroken MirrorState = "Broken" + // MirrorStateMirrored - The mirror state is mirrored + MirrorStateMirrored MirrorState = "Mirrored" + // MirrorStateUninitialized - The mirror state is still uninitialized MirrorStateUninitialized MirrorState = "Uninitialized" ) @@ -447,6 +564,42 @@ func PossibleMultiAdStatusValues() []MultiAdStatus { } } +// NetAppProvisioningState - Provisioning state of the resource +type NetAppProvisioningState string + +const ( + // NetAppProvisioningStateAccepted - Resource has been accepted + NetAppProvisioningStateAccepted NetAppProvisioningState = "Accepted" + // NetAppProvisioningStateCanceled - Resource creation was canceled. + NetAppProvisioningStateCanceled NetAppProvisioningState = "Canceled" + // NetAppProvisioningStateDeleting - Resource is getting deleted + NetAppProvisioningStateDeleting NetAppProvisioningState = "Deleting" + // NetAppProvisioningStateFailed - Resource creation failed. + NetAppProvisioningStateFailed NetAppProvisioningState = "Failed" + // NetAppProvisioningStateMoving - Resource is getting moved + NetAppProvisioningStateMoving NetAppProvisioningState = "Moving" + // NetAppProvisioningStateProvisioning - Resource is getting provisioned + NetAppProvisioningStateProvisioning NetAppProvisioningState = "Provisioning" + // NetAppProvisioningStateSucceeded - Resource has been created. + NetAppProvisioningStateSucceeded NetAppProvisioningState = "Succeeded" + // NetAppProvisioningStateUpdating - Resource is updating + NetAppProvisioningStateUpdating NetAppProvisioningState = "Updating" +) + +// PossibleNetAppProvisioningStateValues returns the possible values for the NetAppProvisioningState const type. +func PossibleNetAppProvisioningStateValues() []NetAppProvisioningState { + return []NetAppProvisioningState{ + NetAppProvisioningStateAccepted, + NetAppProvisioningStateCanceled, + NetAppProvisioningStateDeleting, + NetAppProvisioningStateFailed, + NetAppProvisioningStateMoving, + NetAppProvisioningStateProvisioning, + NetAppProvisioningStateSucceeded, + NetAppProvisioningStateUpdating, + } +} + // NetworkFeatures - Network features available to the volume, or current state of update. type NetworkFeatures string @@ -491,32 +644,6 @@ func PossibleNetworkSiblingSetProvisioningStateValues() []NetworkSiblingSetProvi } } -// ProvisioningState - Gets the status of the VolumeQuotaRule at the time the operation was called. -type ProvisioningState string - -const ( - ProvisioningStateAccepted ProvisioningState = "Accepted" - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateMoving ProvisioningState = "Moving" - ProvisioningStatePatching ProvisioningState = "Patching" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateAccepted, - ProvisioningStateCreating, - ProvisioningStateDeleting, - ProvisioningStateFailed, - ProvisioningStateMoving, - ProvisioningStatePatching, - ProvisioningStateSucceeded, - } -} - // QosType - The qos type of the pool type QosType string @@ -571,23 +698,21 @@ func PossibleRegionStorageToNetworkProximityValues() []RegionStorageToNetworkPro } } -// RelationshipStatus - Status of the mirror relationship +// RelationshipStatus - The status of the Volume Replication type RelationshipStatus string const ( - RelationshipStatusFailed RelationshipStatus = "Failed" - RelationshipStatusIdle RelationshipStatus = "Idle" + // RelationshipStatusIdle - No data is currently being transferred between volumes + RelationshipStatusIdle RelationshipStatus = "Idle" + // RelationshipStatusTransferring - Data is being transferred between volumes RelationshipStatusTransferring RelationshipStatus = "Transferring" - RelationshipStatusUnknown RelationshipStatus = "Unknown" ) // PossibleRelationshipStatusValues returns the possible values for the RelationshipStatus const type. func PossibleRelationshipStatusValues() []RelationshipStatus { return []RelationshipStatus{ - RelationshipStatusFailed, RelationshipStatusIdle, RelationshipStatusTransferring, - RelationshipStatusUnknown, } } @@ -707,7 +832,7 @@ func PossibleSmbNonBrowsableValues() []SmbNonBrowsable { } } -// Type - Type of quota +// Type - Type of quota rule type Type string const ( @@ -731,6 +856,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 6afcdd7b9a51..2e4da5b660bb 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/accounts_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/accounts_server.go @@ -13,7 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "reflect" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/backuppolicies_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/backuppolicies_server.go index c9497ec682b0..cccd44aed478 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/backuppolicies_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/backuppolicies_server.go @@ -12,7 +12,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/backups_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/backups_server.go index fd6da253efc0..61d68a062ebc 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/backups_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/backups_server.go @@ -13,7 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/backupsunderaccount_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/backupsunderaccount_server.go index 3a250025167c..aa097a87ee44 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/backupsunderaccount_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/backupsunderaccount_server.go @@ -12,7 +12,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/backupsunderbackupvault_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/backupsunderbackupvault_server.go index 451310468ed0..6d27d0e6c119 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/backupsunderbackupvault_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/backupsunderbackupvault_server.go @@ -12,7 +12,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/backupsundervolume_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/backupsundervolume_server.go index 71f6d165f48b..4f3fe0ee2984 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/backupsundervolume_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/backupsundervolume_server.go @@ -12,7 +12,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/backupvaults_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/backupvaults_server.go index 742b0a009009..f25b1e55b0d8 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/backupvaults_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/backupvaults_server.go @@ -13,7 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/buckets_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/buckets_server.go new file mode 100644 index 000000000000..cfa1c6c2ec3a --- /dev/null +++ b/sdk/resourcemanager/netapp/armnetapp/fake/buckets_server.go @@ -0,0 +1,449 @@ +// 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. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" + "net/http" + "net/url" + "regexp" +) + +// BucketsServer is a fake server for instances of the armnetapp.BucketsClient type. +type BucketsServer struct { + // BeginCreateOrUpdate is the fake for method BucketsClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body armnetapp.Bucket, options *armnetapp.BucketsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armnetapp.BucketsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // BeginDelete is the fake for method BucketsClient.BeginDelete + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDelete func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, options *armnetapp.BucketsClientBeginDeleteOptions) (resp azfake.PollerResponder[armnetapp.BucketsClientDeleteResponse], errResp azfake.ErrorResponder) + + // GenerateCredentials is the fake for method BucketsClient.GenerateCredentials + // HTTP status codes to indicate success: http.StatusOK + GenerateCredentials func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body armnetapp.BucketCredentialsExpiry, options *armnetapp.BucketsClientGenerateCredentialsOptions) (resp azfake.Responder[armnetapp.BucketsClientGenerateCredentialsResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method BucketsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, options *armnetapp.BucketsClientGetOptions) (resp azfake.Responder[armnetapp.BucketsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method BucketsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.BucketsClientListOptions) (resp azfake.PagerResponder[armnetapp.BucketsClientListResponse]) + + // BeginUpdate is the fake for method BucketsClient.BeginUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginUpdate func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, bucketName string, body armnetapp.BucketPatch, options *armnetapp.BucketsClientBeginUpdateOptions) (resp azfake.PollerResponder[armnetapp.BucketsClientUpdateResponse], errResp azfake.ErrorResponder) +} + +// NewBucketsServerTransport creates a new instance of BucketsServerTransport with the provided implementation. +// The returned BucketsServerTransport instance is connected to an instance of armnetapp.BucketsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewBucketsServerTransport(srv *BucketsServer) *BucketsServerTransport { + return &BucketsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetapp.BucketsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetapp.BucketsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetapp.BucketsClientListResponse]](), + beginUpdate: newTracker[azfake.PollerResponder[armnetapp.BucketsClientUpdateResponse]](), + } +} + +// BucketsServerTransport connects instances of armnetapp.BucketsClient to instances of BucketsServer. +// Don't use this type directly, use NewBucketsServerTransport instead. +type BucketsServerTransport struct { + srv *BucketsServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetapp.BucketsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetapp.BucketsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetapp.BucketsClientListResponse]] + beginUpdate *tracker[azfake.PollerResponder[armnetapp.BucketsClientUpdateResponse]] +} + +// Do implements the policy.Transporter interface for BucketsServerTransport. +func (b *BucketsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + return b.dispatchToMethodFake(req, method) +} + +func (b *BucketsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { + resultChan := make(chan result) + defer close(resultChan) + + go func() { + var intercepted bool + var res result + if bucketsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = bucketsServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "BucketsClient.BeginCreateOrUpdate": + res.resp, res.err = b.dispatchBeginCreateOrUpdate(req) + case "BucketsClient.BeginDelete": + res.resp, res.err = b.dispatchBeginDelete(req) + case "BucketsClient.GenerateCredentials": + res.resp, res.err = b.dispatchGenerateCredentials(req) + case "BucketsClient.Get": + res.resp, res.err = b.dispatchGet(req) + case "BucketsClient.NewListPager": + res.resp, res.err = b.dispatchNewListPager(req) + case "BucketsClient.BeginUpdate": + res.resp, res.err = b.dispatchBeginUpdate(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() + + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } +} + +func (b *BucketsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if b.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := b.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == 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~%@]+)/buckets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 7 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetapp.Bucket](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 + } + bucketNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bucketName")]) + if err != nil { + return nil, err + } + respr, errRespr := b.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, bucketNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + b.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + b.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + b.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (b *BucketsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { + if b.srv.BeginDelete == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} + } + beginDelete := b.beginDelete.get(req) + if beginDelete == 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~%@]+)/buckets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 7 { + 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 + } + bucketNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bucketName")]) + if err != nil { + return nil, err + } + respr, errRespr := b.srv.BeginDelete(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, bucketNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDelete = &respr + b.beginDelete.add(req, beginDelete) + } + + resp, err := server.PollerResponderNext(beginDelete, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + b.beginDelete.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDelete) { + b.beginDelete.remove(req) + } + + return resp, nil +} + +func (b *BucketsServerTransport) dispatchGenerateCredentials(req *http.Request) (*http.Response, error) { + if b.srv.GenerateCredentials == nil { + return nil, &nonRetriableError{errors.New("fake for method GenerateCredentials not implemented")} + } + 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~%@]+)/buckets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generateCredentials` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 7 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetapp.BucketCredentialsExpiry](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 + } + bucketNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bucketName")]) + if err != nil { + return nil, err + } + respr, errRespr := b.srv.GenerateCredentials(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, bucketNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BucketGenerateCredentials, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (b *BucketsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if b.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + 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~%@]+)/buckets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 7 { + 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 + } + bucketNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bucketName")]) + if err != nil { + return nil, err + } + respr, errRespr := b.srv.Get(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, bucketNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Bucket, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (b *BucketsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if b.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := b.newListPager.get(req) + if newListPager == 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~%@]+)/buckets` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 6 { + 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 + } + resp := b.srv.NewListPager(resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, nil) + newListPager = &resp + b.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetapp.BucketsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + b.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + b.newListPager.remove(req) + } + return resp, nil +} + +func (b *BucketsServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response, error) { + if b.srv.BeginUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginUpdate not implemented")} + } + beginUpdate := b.beginUpdate.get(req) + if beginUpdate == 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~%@]+)/buckets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 7 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetapp.BucketPatch](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 + } + bucketNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bucketName")]) + if err != nil { + return nil, err + } + respr, errRespr := b.srv.BeginUpdate(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, bucketNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginUpdate = &respr + b.beginUpdate.add(req, beginUpdate) + } + + resp, err := server.PollerResponderNext(beginUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + b.beginUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginUpdate) { + b.beginUpdate.remove(req) + } + + return resp, nil +} + +// set this to conditionally intercept incoming requests to BucketsServerTransport +var bucketsServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/operations_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/operations_server.go index f82b504c9e94..f9d135881a92 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/operations_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/operations_server.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" ) diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/pools_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/pools_server.go index 898c73c6dd31..6f240f19f257 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/pools_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/pools_server.go @@ -13,7 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/resource_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/resource_server.go index 0c5c89bb38f1..2c78c69d84aa 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/resource_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/resource_server.go @@ -12,7 +12,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/resourcequotalimits_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/resourcequotalimits_server.go index 22a378bdf9d4..2c13f8594feb 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/resourcequotalimits_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/resourcequotalimits_server.go @@ -13,7 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" @@ -119,7 +119,7 @@ func (r *ResourceQuotaLimitsServerTransport) dispatchGet(req *http.Request) (*ht if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SubscriptionQuotaItem, req) + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).QuotaItem, req) if err != nil { return nil, err } diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/resourcequotalimitsaccount_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/resourcequotalimitsaccount_server.go new file mode 100644 index 000000000000..27933f30e091 --- /dev/null +++ b/sdk/resourcemanager/netapp/armnetapp/fake/resourcequotalimitsaccount_server.go @@ -0,0 +1,178 @@ +// 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. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" + "net/http" + "net/url" + "regexp" +) + +// ResourceQuotaLimitsAccountServer is a fake server for instances of the armnetapp.ResourceQuotaLimitsAccountClient type. +type ResourceQuotaLimitsAccountServer struct { + // Get is the fake for method ResourceQuotaLimitsAccountClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, accountName string, quotaLimitName string, options *armnetapp.ResourceQuotaLimitsAccountClientGetOptions) (resp azfake.Responder[armnetapp.ResourceQuotaLimitsAccountClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method ResourceQuotaLimitsAccountClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, accountName string, options *armnetapp.ResourceQuotaLimitsAccountClientListOptions) (resp azfake.PagerResponder[armnetapp.ResourceQuotaLimitsAccountClientListResponse]) +} + +// NewResourceQuotaLimitsAccountServerTransport creates a new instance of ResourceQuotaLimitsAccountServerTransport with the provided implementation. +// The returned ResourceQuotaLimitsAccountServerTransport instance is connected to an instance of armnetapp.ResourceQuotaLimitsAccountClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewResourceQuotaLimitsAccountServerTransport(srv *ResourceQuotaLimitsAccountServer) *ResourceQuotaLimitsAccountServerTransport { + return &ResourceQuotaLimitsAccountServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetapp.ResourceQuotaLimitsAccountClientListResponse]](), + } +} + +// ResourceQuotaLimitsAccountServerTransport connects instances of armnetapp.ResourceQuotaLimitsAccountClient to instances of ResourceQuotaLimitsAccountServer. +// Don't use this type directly, use NewResourceQuotaLimitsAccountServerTransport instead. +type ResourceQuotaLimitsAccountServerTransport struct { + srv *ResourceQuotaLimitsAccountServer + newListPager *tracker[azfake.PagerResponder[armnetapp.ResourceQuotaLimitsAccountClientListResponse]] +} + +// Do implements the policy.Transporter interface for ResourceQuotaLimitsAccountServerTransport. +func (r *ResourceQuotaLimitsAccountServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + return r.dispatchToMethodFake(req, method) +} + +func (r *ResourceQuotaLimitsAccountServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { + resultChan := make(chan result) + defer close(resultChan) + + go func() { + var intercepted bool + var res result + if resourceQuotaLimitsAccountServerTransportInterceptor != nil { + res.resp, res.err, intercepted = resourceQuotaLimitsAccountServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "ResourceQuotaLimitsAccountClient.Get": + res.resp, res.err = r.dispatchGet(req) + case "ResourceQuotaLimitsAccountClient.NewListPager": + res.resp, res.err = r.dispatchNewListPager(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() + + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } +} + +func (r *ResourceQuotaLimitsAccountServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if r.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/quotaLimits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if 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 + } + quotaLimitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("quotaLimitName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameParam, accountNameParam, quotaLimitNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).QuotaItem, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *ResourceQuotaLimitsAccountServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if r.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := r.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetApp/netAppAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/quotaLimits` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + 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 + } + resp := r.srv.NewListPager(resourceGroupNameParam, accountNameParam, nil) + newListPager = &resp + r.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetapp.ResourceQuotaLimitsAccountClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + r.newListPager.remove(req) + } + return resp, nil +} + +// set this to conditionally intercept incoming requests to ResourceQuotaLimitsAccountServerTransport +var resourceQuotaLimitsAccountServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/resourceregioninfos_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/resourceregioninfos_server.go index 91d268f9a6f3..4d58c449e4bf 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/resourceregioninfos_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/resourceregioninfos_server.go @@ -13,7 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/resourceusages_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/resourceusages_server.go index 55b99724741e..ff993f5e05db 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/resourceusages_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/resourceusages_server.go @@ -13,7 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/server_factory.go b/sdk/resourcemanager/netapp/armnetapp/fake/server_factory.go index ef17a11355fd..c95a1ed95e6c 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/server_factory.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/server_factory.go @@ -37,6 +37,9 @@ type ServerFactory struct { // BackupsUnderVolumeServer contains the fakes for client BackupsUnderVolumeClient BackupsUnderVolumeServer BackupsUnderVolumeServer + // BucketsServer contains the fakes for client BucketsClient + BucketsServer BucketsServer + // OperationsServer contains the fakes for client OperationsClient OperationsServer OperationsServer @@ -46,6 +49,9 @@ type ServerFactory struct { // ResourceServer contains the fakes for client ResourceClient ResourceServer ResourceServer + // ResourceQuotaLimitsAccountServer contains the fakes for client ResourceQuotaLimitsAccountClient + ResourceQuotaLimitsAccountServer ResourceQuotaLimitsAccountServer + // ResourceQuotaLimitsServer contains the fakes for client ResourceQuotaLimitsClient ResourceQuotaLimitsServer ResourceQuotaLimitsServer @@ -86,27 +92,29 @@ func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { // ServerFactoryTransport connects instances of armnetapp.ClientFactory to instances of ServerFactory. // Don't use this type directly, use NewServerFactoryTransport instead. type ServerFactoryTransport struct { - srv *ServerFactory - trMu sync.Mutex - trAccountsServer *AccountsServerTransport - trBackupPoliciesServer *BackupPoliciesServerTransport - trBackupVaultsServer *BackupVaultsServerTransport - trBackupsServer *BackupsServerTransport - trBackupsUnderAccountServer *BackupsUnderAccountServerTransport - trBackupsUnderBackupVaultServer *BackupsUnderBackupVaultServerTransport - trBackupsUnderVolumeServer *BackupsUnderVolumeServerTransport - trOperationsServer *OperationsServerTransport - trPoolsServer *PoolsServerTransport - trResourceServer *ResourceServerTransport - trResourceQuotaLimitsServer *ResourceQuotaLimitsServerTransport - trResourceRegionInfosServer *ResourceRegionInfosServerTransport - trResourceUsagesServer *ResourceUsagesServerTransport - trSnapshotPoliciesServer *SnapshotPoliciesServerTransport - trSnapshotsServer *SnapshotsServerTransport - trSubvolumesServer *SubvolumesServerTransport - trVolumeGroupsServer *VolumeGroupsServerTransport - trVolumeQuotaRulesServer *VolumeQuotaRulesServerTransport - trVolumesServer *VolumesServerTransport + srv *ServerFactory + trMu sync.Mutex + trAccountsServer *AccountsServerTransport + trBackupPoliciesServer *BackupPoliciesServerTransport + trBackupVaultsServer *BackupVaultsServerTransport + trBackupsServer *BackupsServerTransport + trBackupsUnderAccountServer *BackupsUnderAccountServerTransport + trBackupsUnderBackupVaultServer *BackupsUnderBackupVaultServerTransport + trBackupsUnderVolumeServer *BackupsUnderVolumeServerTransport + trBucketsServer *BucketsServerTransport + trOperationsServer *OperationsServerTransport + trPoolsServer *PoolsServerTransport + trResourceServer *ResourceServerTransport + trResourceQuotaLimitsAccountServer *ResourceQuotaLimitsAccountServerTransport + trResourceQuotaLimitsServer *ResourceQuotaLimitsServerTransport + trResourceRegionInfosServer *ResourceRegionInfosServerTransport + trResourceUsagesServer *ResourceUsagesServerTransport + trSnapshotPoliciesServer *SnapshotPoliciesServerTransport + trSnapshotsServer *SnapshotsServerTransport + trSubvolumesServer *SubvolumesServerTransport + trVolumeGroupsServer *VolumeGroupsServerTransport + trVolumeQuotaRulesServer *VolumeQuotaRulesServerTransport + trVolumesServer *VolumesServerTransport } // Do implements the policy.Transporter interface for ServerFactoryTransport. @@ -151,6 +159,9 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { return NewBackupsUnderVolumeServerTransport(&s.srv.BackupsUnderVolumeServer) }) resp, err = s.trBackupsUnderVolumeServer.Do(req) + case "BucketsClient": + initServer(s, &s.trBucketsServer, func() *BucketsServerTransport { return NewBucketsServerTransport(&s.srv.BucketsServer) }) + resp, err = s.trBucketsServer.Do(req) case "OperationsClient": initServer(s, &s.trOperationsServer, func() *OperationsServerTransport { return NewOperationsServerTransport(&s.srv.OperationsServer) }) resp, err = s.trOperationsServer.Do(req) @@ -160,6 +171,11 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { case "ResourceClient": initServer(s, &s.trResourceServer, func() *ResourceServerTransport { return NewResourceServerTransport(&s.srv.ResourceServer) }) resp, err = s.trResourceServer.Do(req) + case "ResourceQuotaLimitsAccountClient": + initServer(s, &s.trResourceQuotaLimitsAccountServer, func() *ResourceQuotaLimitsAccountServerTransport { + return NewResourceQuotaLimitsAccountServerTransport(&s.srv.ResourceQuotaLimitsAccountServer) + }) + resp, err = s.trResourceQuotaLimitsAccountServer.Do(req) case "ResourceQuotaLimitsClient": initServer(s, &s.trResourceQuotaLimitsServer, func() *ResourceQuotaLimitsServerTransport { return NewResourceQuotaLimitsServerTransport(&s.srv.ResourceQuotaLimitsServer) diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/snapshotpolicies_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/snapshotpolicies_server.go index d79f88f21aea..16a68583f067 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/snapshotpolicies_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/snapshotpolicies_server.go @@ -12,7 +12,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/snapshots_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/snapshots_server.go index b0147d4c5de5..39a273a3179d 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/snapshots_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/snapshots_server.go @@ -12,7 +12,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/subvolumes_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/subvolumes_server.go index 1e3aafad40f7..0d447b2205d5 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/subvolumes_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/subvolumes_server.go @@ -13,7 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/volumegroups_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/volumegroups_server.go index 6d34c8b9638b..1f43e895abcf 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/volumegroups_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/volumegroups_server.go @@ -12,7 +12,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/volumequotarules_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/volumequotarules_server.go index 419b6b3b71bd..620a9f851002 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/volumequotarules_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/volumequotarules_server.go @@ -12,7 +12,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/netapp/armnetapp/fake/volumes_server.go b/sdk/resourcemanager/netapp/armnetapp/fake/volumes_server.go index eb2dde0cbf44..3116d2c6cf7c 100644 --- a/sdk/resourcemanager/netapp/armnetapp/fake/volumes_server.go +++ b/sdk/resourcemanager/netapp/armnetapp/fake/volumes_server.go @@ -13,7 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" "net/http" "net/url" "reflect" @@ -71,6 +71,10 @@ type VolumesServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginListGetGroupIDListForLdapUser func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body armnetapp.GetGroupIDListForLDAPUserRequest, options *armnetapp.VolumesClientBeginListGetGroupIDListForLdapUserOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientListGetGroupIDListForLdapUserResponse], errResp azfake.ErrorResponder) + // BeginListQuotaReport is the fake for method VolumesClient.BeginListQuotaReport + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginListQuotaReport func(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *armnetapp.VolumesClientBeginListQuotaReportOptions) (resp azfake.PollerResponder[armnetapp.VolumesClientListQuotaReportResponse], errResp azfake.ErrorResponder) + // NewListReplicationsPager is the fake for method VolumesClient.NewListReplicationsPager // 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]) @@ -124,7 +128,7 @@ type VolumesServer struct { 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.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, 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 @@ -149,6 +153,7 @@ func NewVolumesServerTransport(srv *VolumesServer) *VolumesServerTransport { beginFinalizeRelocation: newTracker[azfake.PollerResponder[armnetapp.VolumesClientFinalizeRelocationResponse]](), newListPager: newTracker[azfake.PagerResponder[armnetapp.VolumesClientListResponse]](), beginListGetGroupIDListForLdapUser: newTracker[azfake.PollerResponder[armnetapp.VolumesClientListGetGroupIDListForLdapUserResponse]](), + beginListQuotaReport: newTracker[azfake.PollerResponder[armnetapp.VolumesClientListQuotaReportResponse]](), newListReplicationsPager: newTracker[azfake.PagerResponder[armnetapp.VolumesClientListReplicationsResponse]](), beginPeerExternalCluster: newTracker[azfake.PollerResponder[armnetapp.VolumesClientPeerExternalClusterResponse]](), beginPerformReplicationTransfer: newTracker[azfake.PollerResponder[armnetapp.VolumesClientPerformReplicationTransferResponse]](), @@ -181,6 +186,7 @@ type VolumesServerTransport struct { beginFinalizeRelocation *tracker[azfake.PollerResponder[armnetapp.VolumesClientFinalizeRelocationResponse]] newListPager *tracker[azfake.PagerResponder[armnetapp.VolumesClientListResponse]] beginListGetGroupIDListForLdapUser *tracker[azfake.PollerResponder[armnetapp.VolumesClientListGetGroupIDListForLdapUserResponse]] + beginListQuotaReport *tracker[azfake.PollerResponder[armnetapp.VolumesClientListQuotaReportResponse]] newListReplicationsPager *tracker[azfake.PagerResponder[armnetapp.VolumesClientListReplicationsResponse]] beginPeerExternalCluster *tracker[azfake.PollerResponder[armnetapp.VolumesClientPeerExternalClusterResponse]] beginPerformReplicationTransfer *tracker[azfake.PollerResponder[armnetapp.VolumesClientPerformReplicationTransferResponse]] @@ -244,6 +250,8 @@ func (v *VolumesServerTransport) dispatchToMethodFake(req *http.Request, method res.resp, res.err = v.dispatchNewListPager(req) case "VolumesClient.BeginListGetGroupIDListForLdapUser": res.resp, res.err = v.dispatchBeginListGetGroupIDListForLdapUser(req) + case "VolumesClient.BeginListQuotaReport": + res.resp, res.err = v.dispatchBeginListQuotaReport(req) case "VolumesClient.NewListReplicationsPager": res.resp, res.err = v.dispatchNewListReplicationsPager(req) case "VolumesClient.BeginPeerExternalCluster": @@ -946,6 +954,58 @@ func (v *VolumesServerTransport) dispatchBeginListGetGroupIDListForLdapUser(req return resp, nil } +func (v *VolumesServerTransport) dispatchBeginListQuotaReport(req *http.Request) (*http.Response, error) { + if v.srv.BeginListQuotaReport == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginListQuotaReport not implemented")} + } + beginListQuotaReport := v.beginListQuotaReport.get(req) + if beginListQuotaReport == 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~%@]+)/listQuotaReport` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 6 { + 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.BeginListQuotaReport(req.Context(), resourceGroupNameParam, accountNameParam, poolNameParam, volumeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginListQuotaReport = &respr + v.beginListQuotaReport.add(req, beginListQuotaReport) + } + + resp, err := server.PollerResponderNext(beginListQuotaReport, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginListQuotaReport.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginListQuotaReport) { + v.beginListQuotaReport.remove(req) + } + + return resp, nil +} + func (v *VolumesServerTransport) dispatchNewListReplicationsPager(req *http.Request) (*http.Response, error) { if v.srv.NewListReplicationsPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListReplicationsPager not implemented")} @@ -1672,9 +1732,9 @@ func (v *VolumesServerTransport) dispatchBeginSplitCloneFromParent(req *http.Req return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { v.beginSplitCloneFromParent.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginSplitCloneFromParent) { v.beginSplitCloneFromParent.remove(req) diff --git a/sdk/resourcemanager/netapp/armnetapp/go.mod b/sdk/resourcemanager/netapp/armnetapp/go.mod index 19c6a58009c2..7cee3ea3aece 100644 --- a/sdk/resourcemanager/netapp/armnetapp/go.mod +++ b/sdk/resourcemanager/netapp/armnetapp/go.mod @@ -1,9 +1,11 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8 -go 1.23.0 +go 1.24.0 + +toolchain go1.24.7 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 ) @@ -14,8 +16,8 @@ require ( 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.41.0 // indirect - golang.org/x/net v0.43.0 // indirect - golang.org/x/sys v0.35.0 // indirect - golang.org/x/text v0.28.0 // indirect + golang.org/x/crypto v0.42.0 // indirect + golang.org/x/net v0.44.0 // indirect + golang.org/x/sys v0.36.0 // indirect + golang.org/x/text v0.29.0 // indirect ) diff --git a/sdk/resourcemanager/netapp/armnetapp/go.sum b/sdk/resourcemanager/netapp/armnetapp/go.sum index c5d2a558dc8f..7ea74e74b83a 100644 --- a/sdk/resourcemanager/netapp/armnetapp/go.sum +++ b/sdk/resourcemanager/netapp/armnetapp/go.sum @@ -1,5 +1,5 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.2 h1:Hr5FTipp7SL07o2FvoVOX9HRiRH3CR3Mj8pxqCcdD5A= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.2/go.mod h1:QyVsSSN64v5TGltphKLQ2sQxe4OBQg0J1eKRcVBnfgE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 h1:5YTBM8QDVIBN3sxBil89WfdAAqDZbyJTgh688DSxX5w= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1/go.mod h1:YD5h/ldMsG0XiIw7PdyNhLxaM317eFh5yNLccNfGdyw= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 h1:B+blDbyVIG3WaikNxPnhPiJ1MThR03b3vKGtER95TP4= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1/go.mod h1:JdM5psgjfBf5fo2uWOZhflPWyDBZ/O/CNAH9CtsuZE4= github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= @@ -30,16 +30,16 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI= github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= -golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= -golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= -golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= +golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= +golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= +golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/netapp/armnetapp/models.go b/sdk/resourcemanager/netapp/armnetapp/models.go index 8b8a26899983..26924c04d1f5 100644 --- a/sdk/resourcemanager/netapp/armnetapp/models.go +++ b/sdk/resourcemanager/netapp/armnetapp/models.go @@ -90,6 +90,9 @@ type AccountProperties struct { // Encryption settings Encryption *AccountEncryption + // LDAP Configuration for the account. + LdapConfiguration *LdapConfiguration + // 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 @@ -370,7 +373,9 @@ type BackupStatus struct { // READ-ONLY; Displays the last transfer type LastTransferType *string - // READ-ONLY; The status of the backup + // READ-ONLY; The mirror state property describes the current status of data replication for a backup. It provides insight + // into whether the data is actively being mirrored, if the replication process has been + // paused, or if it has yet to be initialized. MirrorState *MirrorState // READ-ONLY; Status of the backup mirror relationship @@ -462,6 +467,146 @@ type BreakReplicationRequest struct { ForceBreakReplication *bool } +// Bucket resource +type Bucket struct { + // Bucket properties + Properties *BucketProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// BucketCredentialsExpiry - The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now. +type BucketCredentialsExpiry struct { + // The number of days from now until the newly generated Access and Secret key pair will expire. + KeyPairExpiryDays *int32 +} + +// BucketGenerateCredentials - Bucket Access Key, Secret Key, and Expiry date and time of the key pair +type BucketGenerateCredentials struct { + // READ-ONLY; The Access Key that is required along with the Secret Key to access the bucket. + AccessKey *string + + // READ-ONLY; The bucket's Access and Secret key pair expiry date and time (in UTC). + KeyPairExpiry *time.Time + + // READ-ONLY; The Secret Key that is required along with the Access Key to access the bucket. + SecretKey *string +} + +// BucketList - List of volume bucket resources +type BucketList struct { + // URL to get the next set of results. + NextLink *string + + // List of volume buckets + Value []*Bucket +} + +// BucketPatch - Bucket resource +type BucketPatch struct { + // Bucket properties + Properties *BucketPatchProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// BucketPatchProperties - Bucket resource properties for a Patch operation +type BucketPatchProperties struct { + // File System user having access to volume data. For Unix, this is the user's uid and gid. For Windows, this is the user's + // username. Note that the Unix and Windows user details are mutually exclusive, + // meaning one or other must be supplied, but not both. + FileSystemUser *FileSystemUser + + // The volume path mounted inside the bucket. + Path *string + + // Access permissions for the bucket. Either ReadOnly or ReadWrite. + Permissions *BucketPatchPermissions + + // Properties of the server managing the lifecycle of volume buckets + Server *BucketServerPatchProperties + + // READ-ONLY; Provisioning state of the resource + ProvisioningState *NetAppProvisioningState +} + +// BucketProperties - Bucket resource properties +type BucketProperties struct { + // File System user having access to volume data. For Unix, this is the user's uid and gid. For Windows, this is the user's + // username. Note that the Unix and Windows user details are mutually exclusive, + // meaning one or other must be supplied, but not both. + FileSystemUser *FileSystemUser + + // The volume path mounted inside the bucket. The default is the root path '/' if no value is provided when the bucket is + // created. + Path *string + + // Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value is provided during + // bucket creation. + Permissions *BucketPermissions + + // Properties of the server managing the lifecycle of volume buckets + Server *BucketServerProperties + + // READ-ONLY; Provisioning state of the resource + ProvisioningState *NetAppProvisioningState + + // READ-ONLY; The bucket credentials status. There states: + // "NoCredentialsSet": Access and Secret key pair have not been generated. "CredentialsExpired": Access and Secret key pair + // have expired. "Active": The certificate has been installed and credentials are + // unexpired. + Status *CredentialsStatus +} + +// BucketServerPatchProperties - Properties of the server managing the lifecycle of volume buckets +type BucketServerPatchProperties struct { + // A base64-encoded PEM file, which includes both the bucket server's certificate and private key. It is used to authenticate + // the user and allows access to volume data in a read-only manner. + CertificateObject *string + + // The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + Fqdn *string +} + +// BucketServerProperties - Properties of the server managing the lifecycle of volume buckets +type BucketServerProperties struct { + // A base64-encoded PEM file, which includes both the bucket server's certificate and private key. It is used to authenticate + // the user and allows access to volume data in a read-only manner. + CertificateObject *string + + // The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + Fqdn *string + + // READ-ONLY; Certificate Common Name taken from the certificate installed on the bucket server + CertificateCommonName *string + + // READ-ONLY; The bucket server's certificate expiry date. + CertificateExpiryDate *time.Time + + // READ-ONLY; The bucket server's IPv4 address + IPAddress *string +} + // CapacityPool - Capacity pool resource type CapacityPool struct { // REQUIRED; The geo-location where the resource lives @@ -550,6 +695,12 @@ type CheckAvailabilityResponse struct { Reason *InAvailabilityReasonType } +// CifsUser - The effective CIFS username when accessing the volume data. +type CifsUser struct { + // The CIFS user's username + Username *string +} + // 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 @@ -598,7 +749,7 @@ type Dimension struct { // EncryptionIdentity - Identity used to authenticate with key vault. type EncryptionIdentity struct { - // ClientId of the multi-tenant AAD Application. Used to access cross-tenant keyvaults. + // ClientId of the multi-tenant AAD Application. Used to access cross-tenant KeyVaults. FederatedClientID *string // The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type @@ -681,6 +832,17 @@ type FilePathAvailabilityRequest struct { AvailabilityZone *string } +// FileSystemUser - File System user having access to volume data. For Unix, this is the user's uid and gid. For Windows, +// this is the user's username. Note that the Unix and Windows user details are mutually exclusive, +// meaning one or other must be supplied, but not both. +type FileSystemUser struct { + // The effective CIFS username when accessing the volume data. + CifsUser *CifsUser + + // The effective NFS User ID and Group ID when accessing the volume data. + NfsUser *NfsUser +} + // GetGroupIDListForLDAPUserRequest - Get group Id list for LDAP User request type GetGroupIDListForLDAPUserRequest struct { // REQUIRED; username is required to fetch the group to which user is part of @@ -755,6 +917,24 @@ type KeyVaultProperties struct { Status *KeyVaultStatus } +// LdapConfiguration - LDAP configuration +type LdapConfiguration struct { + // The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name to create DNS host entry. + CertificateCNHost *string + + // Name of the LDAP configuration domain + Domain *string + + // Specifies whether or not the LDAP traffic needs to be secured via TLS. + LdapOverTLS *bool + + // List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + LdapServers []*string + + // When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap servers CA certificate. + ServerCACertificate *string +} + // LdapSearchScopeOpt - LDAP search scope type LdapSearchScopeOpt struct { // This specifies the group DN, which overrides the base DN for group lookups. @@ -767,6 +947,12 @@ type LdapSearchScopeOpt struct { UserDN *string } +// ListQuotaReportResponse - Quota Report for volume +type ListQuotaReportResponse struct { + // List of volume quota report records + Value []*QuotaReport +} + // ListReplications - List Replications type ListReplications struct { // A list of replications @@ -908,6 +1094,15 @@ type NetworkSiblingSet struct { ProvisioningState *NetworkSiblingSetProvisioningState } +// NfsUser - The effective NFS User ID and Group ID when accessing the volume data. +type NfsUser struct { + // The NFS user's GID + GroupID *int64 + + // The NFS user's UID + UserID *int64 +} + // NicInfo - NIC information and list of volumes for which the NIC has the primary mount ip address. type NicInfo struct { // Volume resource Ids @@ -1057,6 +1252,67 @@ type QuotaAvailabilityRequest struct { Type *CheckQuotaNameResourceTypes } +// QuotaItem - Information regarding Quota Item. +type QuotaItem struct { + // QuotaItem properties + Properties *QuotaItemProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// QuotaItemList - List of Quota Items +type QuotaItemList struct { + // URL to get the next set of results. + NextLink *string + + // A list of QuotaItems + Value []*QuotaItem +} + +// QuotaItemProperties - QuotaItem Properties +type QuotaItemProperties struct { + // READ-ONLY; The current quota value. + Current *int32 + + // READ-ONLY; The default quota value. + Default *int32 + + // READ-ONLY; The usage quota value. + Usage *int32 +} + +// QuotaReport - Quota report record properties +type QuotaReport struct { + // Flag to indicate whether the quota is derived from default quota. + IsDerivedQuota *bool + + // Percentage of used size compared to total size. + PercentageUsed *float32 + + // Specifies the total size limit in kibibytes for the user/group quota. + QuotaLimitTotalInKiBs *int64 + + // Specifies the current usage in kibibytes for the user/group quota. + QuotaLimitUsedInKiBs *int64 + + // UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command + // for the user or group and SID can be found by running + QuotaTarget *string + + // Type of quota + QuotaType *Type +} + // ReestablishReplicationRequest - Re-establish request object supplied in the body of the operation. type ReestablishReplicationRequest struct { // Resource id of the source volume for the replication @@ -1163,6 +1419,21 @@ type ReplicationObject struct { // READ-ONLY; Indicates whether the local volume is the source or destination for the Volume Replication EndpointType *EndpointType + // READ-ONLY; Contains human-readable instructions on what the next step is to finish the external replication setup. + ExternalReplicationSetupInfo *string + + // READ-ONLY; Property that only applies to external replications. Provides a machine-readable value for the status of the + // external replication setup. + ExternalReplicationSetupStatus *ExternalReplicationSetupStatus + + // READ-ONLY; The mirror state property describes the current status of data replication for a replication. It provides insight + // into whether the data is actively being mirrored, if the replication process has been + // paused, or if it has yet to be initialized. + MirrorState *MirrorState + + // READ-ONLY; The status of the Volume Replication + RelationshipStatus *RelationshipStatus + // READ-ONLY; Id ReplicationID *string } @@ -1175,14 +1446,16 @@ type ReplicationStatus struct { // Replication health check Healthy *bool - // The status of the replication - MirrorState *MirrorState - // Status of the mirror relationship RelationshipStatus *RelationshipStatus // The progress of the replication TotalProgress *string + + // READ-ONLY; The mirror state property describes the current status of data replication for a replication. It provides insight + // into whether the data is actively being mirrored, if the replication process has been + // paused, or if it has yet to be initialized. + MirrorState *MirrorState } // ResourceNameAvailabilityRequest - Resource name availability request content. @@ -1205,7 +1478,9 @@ type RestoreStatus struct { // READ-ONLY; Restore health status Healthy *bool - // READ-ONLY; The status of the restore + // READ-ONLY; The mirror state property describes the current status of data replication for a restore. It provides insight + // into whether the data is actively being mirrored, if the replication process has been + // paused, or if it has yet to be initialized. MirrorState *MirrorState // READ-ONLY; Status of the restore SnapMirror relationship @@ -1356,42 +1631,6 @@ type SnapshotsList struct { Value []*Snapshot } -// SubscriptionQuotaItem - Information regarding Subscription Quota Item. -type SubscriptionQuotaItem struct { - // SubscriptionQuotaItem properties - Properties *SubscriptionQuotaItemProperties - - // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// SubscriptionQuotaItemList - List of Subscription Quota Items -type SubscriptionQuotaItemList struct { - // URL to get the next set of results. - NextLink *string - - // A list of SubscriptionQuotaItems - Value []*SubscriptionQuotaItem -} - -// SubscriptionQuotaItemProperties - SubscriptionQuotaItem Properties -type SubscriptionQuotaItemProperties struct { - // READ-ONLY; The current quota value. - Current *int32 - - // READ-ONLY; The default quota value. - Default *int32 -} - // SubvolumeInfo - Subvolume Information properties type SubvolumeInfo struct { // Subvolume Properties @@ -1950,9 +2189,15 @@ 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 + // Specifies the type of LDAP server for a given NFS volume. + LdapServerType *LdapServerType + // The original value of the network features type available to the volume at the time it was created. NetworkFeatures *NetworkFeatures @@ -1999,14 +2244,18 @@ type VolumeProperties struct { // (2) and sticky (1) attributes. Second digit selects permission for the owner of // the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth // for other users not in the group. 0755 - gives read/write/execute permissions to - // owner and read/execute to group and other users. + // owner and read/execute to group and other users. Avoid passing null value for unixPermissions in volume update operation, + // As per the behavior, If Null value is passed then user-visible unixPermissions + // value will became null, and user will not be able to get unixPermissions value. On safer side, actual unixPermissions value + // on volume will remain as its last saved value only. UnixPermissions *string // Volume spec name is the application specific designation or identifier for the particular volume in a volume group for // 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 @@ -2144,8 +2393,8 @@ type VolumeQuotaRulesProperties struct { // Type of quota QuotaType *Type - // READ-ONLY; Gets the status of the VolumeQuotaRule at the time the operation was called. - ProvisioningState *ProvisioningState + // READ-ONLY; Provisioning state of the resource + ProvisioningState *NetAppProvisioningState } // VolumeRelocationProperties - Volume relocation properties diff --git a/sdk/resourcemanager/netapp/armnetapp/models_serde.go b/sdk/resourcemanager/netapp/armnetapp/models_serde.go index 42ac26170e7f..5c7da587a7d1 100644 --- a/sdk/resourcemanager/netapp/armnetapp/models_serde.go +++ b/sdk/resourcemanager/netapp/armnetapp/models_serde.go @@ -194,6 +194,7 @@ func (a AccountProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "activeDirectories", a.ActiveDirectories) populate(objectMap, "disableShowmount", a.DisableShowmount) populate(objectMap, "encryption", a.Encryption) + populate(objectMap, "ldapConfiguration", a.LdapConfiguration) populate(objectMap, "multiAdStatus", a.MultiAdStatus) populate(objectMap, "nfsV4IDDomain", a.NfsV4IDDomain) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -218,6 +219,9 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { case "encryption": err = unpopulate(val, "Encryption", &a.Encryption) delete(rawMsg, key) + case "ldapConfiguration": + err = unpopulate(val, "LdapConfiguration", &a.LdapConfiguration) + delete(rawMsg, key) case "multiAdStatus": err = unpopulate(val, "MultiAdStatus", &a.MultiAdStatus) delete(rawMsg, key) @@ -1083,6 +1087,349 @@ func (b *BreakReplicationRequest) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type Bucket. +func (b Bucket) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Bucket. +func (b *Bucket) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BucketCredentialsExpiry. +func (b BucketCredentialsExpiry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyPairExpiryDays", b.KeyPairExpiryDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BucketCredentialsExpiry. +func (b *BucketCredentialsExpiry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyPairExpiryDays": + err = unpopulate(val, "KeyPairExpiryDays", &b.KeyPairExpiryDays) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BucketGenerateCredentials. +func (b BucketGenerateCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessKey", b.AccessKey) + populateDateTimeRFC3339(objectMap, "keyPairExpiry", b.KeyPairExpiry) + populate(objectMap, "secretKey", b.SecretKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BucketGenerateCredentials. +func (b *BucketGenerateCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessKey": + err = unpopulate(val, "AccessKey", &b.AccessKey) + delete(rawMsg, key) + case "keyPairExpiry": + err = unpopulateDateTimeRFC3339(val, "KeyPairExpiry", &b.KeyPairExpiry) + delete(rawMsg, key) + case "secretKey": + err = unpopulate(val, "SecretKey", &b.SecretKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BucketList. +func (b BucketList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BucketList. +func (b *BucketList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BucketPatch. +func (b BucketPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BucketPatch. +func (b *BucketPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BucketPatchProperties. +func (b BucketPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fileSystemUser", b.FileSystemUser) + populate(objectMap, "path", b.Path) + populate(objectMap, "permissions", b.Permissions) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "server", b.Server) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BucketPatchProperties. +func (b *BucketPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fileSystemUser": + err = unpopulate(val, "FileSystemUser", &b.FileSystemUser) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &b.Path) + delete(rawMsg, key) + case "permissions": + err = unpopulate(val, "Permissions", &b.Permissions) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &b.Server) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BucketProperties. +func (b BucketProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fileSystemUser", b.FileSystemUser) + populate(objectMap, "path", b.Path) + populate(objectMap, "permissions", b.Permissions) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "server", b.Server) + populate(objectMap, "status", b.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BucketProperties. +func (b *BucketProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fileSystemUser": + err = unpopulate(val, "FileSystemUser", &b.FileSystemUser) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &b.Path) + delete(rawMsg, key) + case "permissions": + err = unpopulate(val, "Permissions", &b.Permissions) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &b.Server) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &b.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BucketServerPatchProperties. +func (b BucketServerPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateObject", b.CertificateObject) + populate(objectMap, "fqdn", b.Fqdn) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BucketServerPatchProperties. +func (b *BucketServerPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateObject": + err = unpopulate(val, "CertificateObject", &b.CertificateObject) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &b.Fqdn) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BucketServerProperties. +func (b BucketServerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateCommonName", b.CertificateCommonName) + populateDateTimeRFC3339(objectMap, "certificateExpiryDate", b.CertificateExpiryDate) + populate(objectMap, "certificateObject", b.CertificateObject) + populate(objectMap, "fqdn", b.Fqdn) + populate(objectMap, "ipAddress", b.IPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BucketServerProperties. +func (b *BucketServerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateCommonName": + err = unpopulate(val, "CertificateCommonName", &b.CertificateCommonName) + delete(rawMsg, key) + case "certificateExpiryDate": + err = unpopulateDateTimeRFC3339(val, "CertificateExpiryDate", &b.CertificateExpiryDate) + delete(rawMsg, key) + case "certificateObject": + err = unpopulate(val, "CertificateObject", &b.CertificateObject) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &b.Fqdn) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &b.IPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CapacityPool. func (c CapacityPool) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1290,6 +1637,33 @@ func (c *CheckAvailabilityResponse) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CifsUser. +func (c CifsUser) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "username", c.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CifsUser. +func (c *CifsUser) 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 "username": + err = unpopulate(val, "Username", &c.Username) + 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 ClusterPeerCommandResponse. func (c ClusterPeerCommandResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1610,6 +1984,37 @@ func (f *FilePathAvailabilityRequest) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type FileSystemUser. +func (f FileSystemUser) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cifsUser", f.CifsUser) + populate(objectMap, "nfsUser", f.NfsUser) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileSystemUser. +func (f *FileSystemUser) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cifsUser": + err = unpopulate(val, "CifsUser", &f.CifsUser) + delete(rawMsg, key) + case "nfsUser": + err = unpopulate(val, "NfsUser", &f.NfsUser) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type GetGroupIDListForLDAPUserRequest. func (g GetGroupIDListForLDAPUserRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1828,12 +2233,55 @@ func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error { case "keyVaultUri": err = unpopulate(val, "KeyVaultURI", &k.KeyVaultURI) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &k.Status) + case "status": + err = unpopulate(val, "Status", &k.Status) + 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 LdapConfiguration. +func (l LdapConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateCNHost", l.CertificateCNHost) + populate(objectMap, "domain", l.Domain) + populate(objectMap, "ldapOverTLS", l.LdapOverTLS) + populate(objectMap, "ldapServers", l.LdapServers) + populate(objectMap, "serverCACertificate", l.ServerCACertificate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LdapConfiguration. +func (l *LdapConfiguration) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateCNHost": + err = unpopulate(val, "CertificateCNHost", &l.CertificateCNHost) + delete(rawMsg, key) + case "domain": + err = unpopulate(val, "Domain", &l.Domain) + delete(rawMsg, key) + case "ldapOverTLS": + err = unpopulate(val, "LdapOverTLS", &l.LdapOverTLS) + delete(rawMsg, key) + case "ldapServers": + err = unpopulate(val, "LdapServers", &l.LdapServers) + delete(rawMsg, key) + case "serverCACertificate": + err = unpopulate(val, "ServerCACertificate", &l.ServerCACertificate) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil @@ -1874,6 +2322,33 @@ func (l *LdapSearchScopeOpt) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ListQuotaReportResponse. +func (l ListQuotaReportResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListQuotaReportResponse. +func (l *ListQuotaReportResponse) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ListReplications. func (l ListReplications) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2187,6 +2662,37 @@ func (n *NetworkSiblingSet) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type NfsUser. +func (n NfsUser) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", n.GroupID) + populate(objectMap, "userId", n.UserID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NfsUser. +func (n *NfsUser) 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", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &n.GroupID) + delete(rawMsg, key) + case "userId": + err = unpopulate(val, "UserID", &n.UserID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type NicInfo. func (n NicInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2607,6 +3113,162 @@ func (q *QuotaAvailabilityRequest) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type QuotaItem. +func (q QuotaItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", q.ID) + populate(objectMap, "name", q.Name) + populate(objectMap, "properties", q.Properties) + populate(objectMap, "systemData", q.SystemData) + populate(objectMap, "type", q.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaItem. +func (q *QuotaItem) 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", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &q.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &q.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &q.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &q.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &q.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaItemList. +func (q QuotaItemList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", q.NextLink) + populate(objectMap, "value", q.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaItemList. +func (q *QuotaItemList) 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", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &q.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &q.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaItemProperties. +func (q QuotaItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "current", q.Current) + populate(objectMap, "default", q.Default) + populate(objectMap, "usage", q.Usage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaItemProperties. +func (q *QuotaItemProperties) 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", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "current": + err = unpopulate(val, "Current", &q.Current) + delete(rawMsg, key) + case "default": + err = unpopulate(val, "Default", &q.Default) + delete(rawMsg, key) + case "usage": + err = unpopulate(val, "Usage", &q.Usage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaReport. +func (q QuotaReport) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isDerivedQuota", q.IsDerivedQuota) + populate(objectMap, "percentageUsed", q.PercentageUsed) + populate(objectMap, "quotaLimitTotalInKiBs", q.QuotaLimitTotalInKiBs) + populate(objectMap, "quotaLimitUsedInKiBs", q.QuotaLimitUsedInKiBs) + populate(objectMap, "quotaTarget", q.QuotaTarget) + populate(objectMap, "quotaType", q.QuotaType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaReport. +func (q *QuotaReport) 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", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isDerivedQuota": + err = unpopulate(val, "IsDerivedQuota", &q.IsDerivedQuota) + delete(rawMsg, key) + case "percentageUsed": + err = unpopulate(val, "PercentageUsed", &q.PercentageUsed) + delete(rawMsg, key) + case "quotaLimitTotalInKiBs": + err = unpopulate(val, "QuotaLimitTotalInKiBs", &q.QuotaLimitTotalInKiBs) + delete(rawMsg, key) + case "quotaLimitUsedInKiBs": + err = unpopulate(val, "QuotaLimitUsedInKiBs", &q.QuotaLimitUsedInKiBs) + delete(rawMsg, key) + case "quotaTarget": + err = unpopulate(val, "QuotaTarget", &q.QuotaTarget) + delete(rawMsg, key) + case "quotaType": + err = unpopulate(val, "QuotaType", &q.QuotaType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ReestablishReplicationRequest. func (r ReestablishReplicationRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2880,6 +3542,10 @@ func (r ReplicationObject) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "destinationReplications", r.DestinationReplications) populate(objectMap, "endpointType", r.EndpointType) + populate(objectMap, "externalReplicationSetupInfo", r.ExternalReplicationSetupInfo) + populate(objectMap, "externalReplicationSetupStatus", r.ExternalReplicationSetupStatus) + populate(objectMap, "mirrorState", r.MirrorState) + populate(objectMap, "relationshipStatus", r.RelationshipStatus) populate(objectMap, "remotePath", r.RemotePath) populate(objectMap, "remoteVolumeRegion", r.RemoteVolumeRegion) populate(objectMap, "remoteVolumeResourceId", r.RemoteVolumeResourceID) @@ -2903,6 +3569,18 @@ func (r *ReplicationObject) UnmarshalJSON(data []byte) error { case "endpointType": err = unpopulate(val, "EndpointType", &r.EndpointType) delete(rawMsg, key) + case "externalReplicationSetupInfo": + err = unpopulate(val, "ExternalReplicationSetupInfo", &r.ExternalReplicationSetupInfo) + delete(rawMsg, key) + case "externalReplicationSetupStatus": + err = unpopulate(val, "ExternalReplicationSetupStatus", &r.ExternalReplicationSetupStatus) + delete(rawMsg, key) + case "mirrorState": + err = unpopulate(val, "MirrorState", &r.MirrorState) + delete(rawMsg, key) + case "relationshipStatus": + err = unpopulate(val, "RelationshipStatus", &r.RelationshipStatus) + delete(rawMsg, key) case "remotePath": err = unpopulate(val, "RemotePath", &r.RemotePath) delete(rawMsg, key) @@ -3425,111 +4103,6 @@ func (s *SnapshotsList) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaItem. -func (s SubscriptionQuotaItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaItem. -func (s *SubscriptionQuotaItem) 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 "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - 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 SubscriptionQuotaItemList. -func (s SubscriptionQuotaItemList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaItemList. -func (s *SubscriptionQuotaItemList) 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 "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - 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 SubscriptionQuotaItemProperties. -func (s SubscriptionQuotaItemProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "current", s.Current) - populate(objectMap, "default", s.Default) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaItemProperties. -func (s *SubscriptionQuotaItemProperties) 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 "current": - err = unpopulate(val, "Current", &s.Current) - delete(rawMsg, key) - case "default": - err = unpopulate(val, "Default", &s.Default) - 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 SubvolumeInfo. func (s SubvolumeInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4741,7 +5314,9 @@ func (v VolumeProperties) MarshalJSON() ([]byte, error) { 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, "ldapServerType", v.LdapServerType) populate(objectMap, "maximumNumberOfFiles", v.MaximumNumberOfFiles) populate(objectMap, "mountTargets", v.MountTargets) populate(objectMap, "networkFeatures", v.NetworkFeatures) @@ -4871,9 +5446,15 @@ 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) + case "ldapServerType": + err = unpopulate(val, "LdapServerType", &v.LdapServerType) + delete(rawMsg, key) case "maximumNumberOfFiles": err = unpopulate(val, "MaximumNumberOfFiles", &v.MaximumNumberOfFiles) delete(rawMsg, key) diff --git a/sdk/resourcemanager/netapp/armnetapp/operations_client.go b/sdk/resourcemanager/netapp/armnetapp/operations_client.go index 9d46c40fbb58..dea0f8f82f78 100644 --- a/sdk/resourcemanager/netapp/armnetapp/operations_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/operations_client.go @@ -36,7 +36,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Microsoft.NetApp Rest API operations // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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]{ @@ -69,7 +69,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *Operat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 9639f935db9b..bee70b9e1cfe 100644 --- a/sdk/resourcemanager/netapp/armnetapp/operations_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/operations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/OperationList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/OperationList.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/options.go b/sdk/resourcemanager/netapp/armnetapp/options.go index 59edab9405ab..83e1a26a2215 100644 --- a/sdk/resourcemanager/netapp/armnetapp/options.go +++ b/sdk/resourcemanager/netapp/armnetapp/options.go @@ -191,6 +191,39 @@ type BackupsUnderVolumeClientBeginMigrateBackupsOptions struct { ResumeToken string } +// BucketsClientBeginCreateOrUpdateOptions contains the optional parameters for the BucketsClient.BeginCreateOrUpdate method. +type BucketsClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BucketsClientBeginDeleteOptions contains the optional parameters for the BucketsClient.BeginDelete method. +type BucketsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BucketsClientBeginUpdateOptions contains the optional parameters for the BucketsClient.BeginUpdate method. +type BucketsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BucketsClientGenerateCredentialsOptions contains the optional parameters for the BucketsClient.GenerateCredentials method. +type BucketsClientGenerateCredentialsOptions struct { + // placeholder for future optional parameters +} + +// BucketsClientGetOptions contains the optional parameters for the BucketsClient.Get method. +type BucketsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BucketsClientListOptions contains the optional parameters for the BucketsClient.NewListPager method. +type BucketsClientListOptions struct { + // placeholder for future optional parameters +} + // OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters @@ -260,6 +293,18 @@ type ResourceClientQueryRegionInfoOptions struct { // placeholder for future optional parameters } +// ResourceQuotaLimitsAccountClientGetOptions contains the optional parameters for the ResourceQuotaLimitsAccountClient.Get +// method. +type ResourceQuotaLimitsAccountClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceQuotaLimitsAccountClientListOptions contains the optional parameters for the ResourceQuotaLimitsAccountClient.NewListPager +// method. +type ResourceQuotaLimitsAccountClientListOptions struct { + // placeholder for future optional parameters +} + // ResourceQuotaLimitsClientGetOptions contains the optional parameters for the ResourceQuotaLimitsClient.Get method. type ResourceQuotaLimitsClientGetOptions struct { // placeholder for future optional parameters @@ -518,6 +563,12 @@ type VolumesClientBeginListGetGroupIDListForLdapUserOptions struct { ResumeToken string } +// VolumesClientBeginListQuotaReportOptions contains the optional parameters for the VolumesClient.BeginListQuotaReport method. +type VolumesClientBeginListQuotaReportOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + // VolumesClientBeginPeerExternalClusterOptions contains the optional parameters for the VolumesClient.BeginPeerExternalCluster // method. type VolumesClientBeginPeerExternalClusterOptions struct { diff --git a/sdk/resourcemanager/netapp/armnetapp/pools_client.go b/sdk/resourcemanager/netapp/armnetapp/pools_client.go index 6d1c3483d395..490836016d3b 100644 --- a/sdk/resourcemanager/netapp/armnetapp/pools_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/pools_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -71,7 +71,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -117,7 +117,7 @@ func (client *PoolsClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -129,7 +129,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -155,7 +155,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -201,7 +201,7 @@ func (client *PoolsClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -210,7 +210,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -261,7 +261,7 @@ func (client *PoolsClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -278,7 +278,7 @@ func (client *PoolsClient) getHandleResponse(resp *http.Response) (PoolsClientGe // NewListPager - List all capacity pools in the NetApp Account // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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. @@ -325,7 +325,7 @@ func (client *PoolsClient) listCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -343,7 +343,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -370,7 +370,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -416,7 +416,7 @@ func (client *PoolsClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 5697f4d42572..89ad22c5d028 100644 --- a/sdk/resourcemanager/netapp/armnetapp/pools_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/pools_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Pools_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Pools_List.json func ExamplePoolsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -48,7 +48,7 @@ func ExamplePoolsClient_NewListPager() { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), // Location: to.Ptr("eastus"), // Properties: &armnetapp.PoolProperties{ - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // PoolID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr("Succeeded"), // QosType: to.Ptr(armnetapp.QosTypeAuto), // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), @@ -64,7 +64,7 @@ func ExamplePoolsClient_NewListPager() { // Location: to.Ptr("eastus"), // Properties: &armnetapp.PoolProperties{ // CustomThroughputMibps: to.Ptr[float32](128), - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // PoolID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr("Succeeded"), // QosType: to.Ptr(armnetapp.QosTypeManual), // ServiceLevel: to.Ptr(armnetapp.ServiceLevelFlexible), @@ -77,7 +77,7 @@ func ExamplePoolsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Pools_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Pools_Get.json func ExamplePoolsClient_Get_poolsGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -101,7 +101,7 @@ func ExamplePoolsClient_Get_poolsGet() { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), // Location: to.Ptr("eastus"), // Properties: &armnetapp.PoolProperties{ - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // PoolID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr("Succeeded"), // QosType: to.Ptr(armnetapp.QosTypeManual), // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), @@ -112,7 +112,7 @@ func ExamplePoolsClient_Get_poolsGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Pools_Get_CustomThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Pools_Get_CustomThroughput.json func ExamplePoolsClient_Get_poolsGetCustomThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -137,7 +137,7 @@ func ExamplePoolsClient_Get_poolsGetCustomThroughput() { // Location: to.Ptr("eastus"), // Properties: &armnetapp.PoolProperties{ // CustomThroughputMibps: to.Ptr[float32](128), - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // PoolID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr("Succeeded"), // QosType: to.Ptr(armnetapp.QosTypeManual), // ServiceLevel: to.Ptr(armnetapp.ServiceLevelFlexible), @@ -148,7 +148,7 @@ func ExamplePoolsClient_Get_poolsGetCustomThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Pools_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Pools_CreateOrUpdate.json func ExamplePoolsClient_BeginCreateOrUpdate_poolsCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -183,7 +183,7 @@ func ExamplePoolsClient_BeginCreateOrUpdate_poolsCreateOrUpdate() { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), // Location: to.Ptr("eastus"), // Properties: &armnetapp.PoolProperties{ - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // PoolID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr("Succeeded"), // QosType: to.Ptr(armnetapp.QosTypeAuto), // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), @@ -193,7 +193,7 @@ func ExamplePoolsClient_BeginCreateOrUpdate_poolsCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Pools_CreateOrUpdate_CustomThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Pools_CreateOrUpdate_CustomThroughput.json func ExamplePoolsClient_BeginCreateOrUpdate_poolsCreateOrUpdateCustomThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -230,7 +230,7 @@ func ExamplePoolsClient_BeginCreateOrUpdate_poolsCreateOrUpdateCustomThroughput( // Location: to.Ptr("eastus"), // Properties: &armnetapp.PoolProperties{ // CustomThroughputMibps: to.Ptr[float32](128), - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // PoolID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr("Succeeded"), // QosType: to.Ptr(armnetapp.QosTypeManual), // ServiceLevel: to.Ptr(armnetapp.ServiceLevelFlexible), @@ -240,7 +240,7 @@ func ExamplePoolsClient_BeginCreateOrUpdate_poolsCreateOrUpdateCustomThroughput( // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Pools_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Pools_Update.json func ExamplePoolsClient_BeginUpdate_poolsUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -268,7 +268,7 @@ func ExamplePoolsClient_BeginUpdate_poolsUpdate() { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), // Location: to.Ptr("eastus"), // Properties: &armnetapp.PoolProperties{ - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // PoolID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr("Succeeded"), // QosType: to.Ptr(armnetapp.QosTypeManual), // ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium), @@ -279,7 +279,7 @@ func ExamplePoolsClient_BeginUpdate_poolsUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Pools_Update_CustomThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Pools_Update_CustomThroughput.json func ExamplePoolsClient_BeginUpdate_poolsUpdateCustomThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -308,7 +308,7 @@ func ExamplePoolsClient_BeginUpdate_poolsUpdateCustomThroughput() { // Location: to.Ptr("eastus"), // Properties: &armnetapp.PoolProperties{ // CustomThroughputMibps: to.Ptr[float32](128), - // PoolID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // PoolID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr("Succeeded"), // QosType: to.Ptr(armnetapp.QosTypeManual), // ServiceLevel: to.Ptr(armnetapp.ServiceLevelFlexible), @@ -319,7 +319,7 @@ func ExamplePoolsClient_BeginUpdate_poolsUpdateCustomThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Pools_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Pools_Delete.json func ExamplePoolsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/resource_client.go b/sdk/resourcemanager/netapp/armnetapp/resource_client.go index 1dc4a7a4fa8b..f49afc06d3ae 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resource_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/resource_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-01-preview // - location - The name of the Azure region. // - body - File path availability request. // - options - ResourceClientCheckFilePathAvailabilityOptions contains the optional parameters for the ResourceClient.CheckFilePathAvailability @@ -86,7 +86,7 @@ func (client *ResourceClient) checkFilePathAvailabilityCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -107,7 +107,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 2025-06-01 +// Generated from API version 2025-07-01-preview // - location - The name of the Azure region. // - body - Name availability request. // - options - ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability @@ -150,7 +150,7 @@ func (client *ResourceClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -171,7 +171,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 2025-06-01 +// Generated from API version 2025-07-01-preview // - location - The name of the Azure region. // - body - Quota availability request. // - options - ResourceClientCheckQuotaAvailabilityOptions contains the optional parameters for the ResourceClient.CheckQuotaAvailability @@ -214,7 +214,7 @@ func (client *ResourceClient) checkQuotaAvailabilityCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -235,7 +235,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -278,7 +278,7 @@ func (client *ResourceClient) queryNetworkSiblingSetCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -299,7 +299,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 2025-06-01 +// Generated from API version 2025-07-01-preview // - location - The name of the Azure region. // - options - ResourceClientQueryRegionInfoOptions contains the optional parameters for the ResourceClient.QueryRegionInfo // method. @@ -341,7 +341,7 @@ func (client *ResourceClient) queryRegionInfoCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -359,7 +359,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -385,7 +385,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -423,7 +423,7 @@ func (client *ResourceClient) updateNetworkSiblingSetCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index cb043a36628c..7b95bcbac5a1 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resource_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/resource_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/CheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/CheckNameAvailability.json func ExampleResourceClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,7 +45,7 @@ func ExampleResourceClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/CheckFilePathAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/CheckFilePathAvailability.json func ExampleResourceClient_CheckFilePathAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -58,7 +58,7 @@ func ExampleResourceClient_CheckFilePathAvailability() { } 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"), + SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -71,7 +71,7 @@ func ExampleResourceClient_CheckFilePathAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/CheckQuotaAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/CheckQuotaAvailability.json func ExampleResourceClient_CheckQuotaAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,7 +98,7 @@ func ExampleResourceClient_CheckQuotaAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/RegionInfo.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/RegionInfo.json func ExampleResourceClient_QueryRegionInfo() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,7 +126,7 @@ func ExampleResourceClient_QueryRegionInfo() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/NetworkSiblingSet_Query.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/NetworkSiblingSet_Query.json func ExampleResourceClient_QueryNetworkSiblingSet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -139,7 +139,7 @@ func ExampleResourceClient_QueryNetworkSiblingSet() { } 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"), + SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -155,14 +155,14 @@ func ExampleResourceClient_QueryNetworkSiblingSet() { // { // 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")}, + // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume10"), + // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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")}, + // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account2/capacityPools/pool2/volumes/volume20"), + // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account2/capacityPools/pool2/volumes/volume21")}, // }, // { // IPAddress: to.Ptr("1.2.3.9"), @@ -170,11 +170,11 @@ func ExampleResourceClient_QueryNetworkSiblingSet() { // }, // }}, // ProvisioningState: to.Ptr(armnetapp.NetworkSiblingSetProvisioningStateSucceeded), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + // SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/NetworkSiblingSet_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/NetworkSiblingSet_Update.json func ExampleResourceClient_BeginUpdateNetworkSiblingSet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -189,7 +189,7 @@ func ExampleResourceClient_BeginUpdateNetworkSiblingSet() { 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"), + SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -209,14 +209,14 @@ func ExampleResourceClient_BeginUpdateNetworkSiblingSet() { // { // 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")}, + // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume10"), + // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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")}, + // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account2/capacityPools/pool2/volumes/volume20"), + // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account2/capacityPools/pool2/volumes/volume21")}, // }, // { // IPAddress: to.Ptr("1.2.3.9"), @@ -224,6 +224,6 @@ func ExampleResourceClient_BeginUpdateNetworkSiblingSet() { // }, // }}, // ProvisioningState: to.Ptr(armnetapp.NetworkSiblingSetProvisioningStateSucceeded), - // SubnetID: to.Ptr("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + // SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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 125bc7456701..e04e6540e1ee 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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. @@ -89,7 +89,7 @@ func (client *ResourceQuotaLimitsClient) getCreateRequest(ctx context.Context, l return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -98,7 +98,7 @@ func (client *ResourceQuotaLimitsClient) getCreateRequest(ctx context.Context, l // getHandleResponse handles the Get response. func (client *ResourceQuotaLimitsClient) getHandleResponse(resp *http.Response) (ResourceQuotaLimitsClientGetResponse, error) { result := ResourceQuotaLimitsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionQuotaItem); err != nil { + if err := runtime.UnmarshalAsJSON(resp, &result.QuotaItem); err != nil { return ResourceQuotaLimitsClientGetResponse{}, err } return result, nil @@ -106,7 +106,7 @@ func (client *ResourceQuotaLimitsClient) getHandleResponse(resp *http.Response) // NewListPager - Get the default and current limits for quotas // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview // - location - The name of the Azure region. // - options - ResourceQuotaLimitsClientListOptions contains the optional parameters for the ResourceQuotaLimitsClient.NewListPager // method. @@ -149,7 +149,7 @@ func (client *ResourceQuotaLimitsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -158,7 +158,7 @@ func (client *ResourceQuotaLimitsClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *ResourceQuotaLimitsClient) listHandleResponse(resp *http.Response) (ResourceQuotaLimitsClientListResponse, error) { result := ResourceQuotaLimitsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionQuotaItemList); err != nil { + if err := runtime.UnmarshalAsJSON(resp, &result.QuotaItemList); err != nil { return ResourceQuotaLimitsClientListResponse{}, err } return result, nil diff --git a/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client_example_test.go index fc915bcfecc9..22ba6794d896 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimits_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/QuotaLimits_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/QuotaLimits_List.json func ExampleResourceQuotaLimitsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -39,13 +39,13 @@ func ExampleResourceQuotaLimitsClient_NewListPager() { _ = 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{ + // page.QuotaItemList = armnetapp.QuotaItemList{ + // Value: []*armnetapp.QuotaItem{ // { // Name: to.Ptr("eastus/accountsPerSubscription"), // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/quotaLimits/accountsPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ + // Properties: &armnetapp.QuotaItemProperties{ // Default: to.Ptr[int32](10), // Current: to.Ptr[int32](10), // }, @@ -54,7 +54,7 @@ func ExampleResourceQuotaLimitsClient_NewListPager() { // Name: to.Ptr("eastus/poolsPerAccount"), // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/quotaLimits/poolsPerAccount"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ + // Properties: &armnetapp.QuotaItemProperties{ // Default: to.Ptr[int32](25), // Current: to.Ptr[int32](25), // }, @@ -63,7 +63,7 @@ func ExampleResourceQuotaLimitsClient_NewListPager() { // Name: to.Ptr("eastus/volumesPerPool"), // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/quotaLimits/volumesPerPool"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ + // Properties: &armnetapp.QuotaItemProperties{ // Default: to.Ptr[int32](500), // Current: to.Ptr[int32](500), // }, @@ -72,7 +72,7 @@ func ExampleResourceQuotaLimitsClient_NewListPager() { // Name: to.Ptr("eastus/snapshotsPerVolume"), // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/quotaLimits/snapshotsPerVolume"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ + // Properties: &armnetapp.QuotaItemProperties{ // Default: to.Ptr[int32](255), // Current: to.Ptr[int32](255), // }, @@ -81,7 +81,7 @@ func ExampleResourceQuotaLimitsClient_NewListPager() { // Name: to.Ptr("eastus/totalTiBsPerSubscription"), // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalTiBsPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ + // Properties: &armnetapp.QuotaItemProperties{ // Default: to.Ptr[int32](25), // Current: to.Ptr[int32](1000), // }, @@ -90,7 +90,7 @@ func ExampleResourceQuotaLimitsClient_NewListPager() { // Name: to.Ptr("eastus/totalDPVolumesPerSubscription"), // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalDPVolumesPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ + // Properties: &armnetapp.QuotaItemProperties{ // Default: to.Ptr[int32](10), // Current: to.Ptr[int32](10), // }, @@ -99,7 +99,7 @@ func ExampleResourceQuotaLimitsClient_NewListPager() { // Name: to.Ptr("eastus/totalVolumesPerSubscription"), // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalVolumesPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ + // Properties: &armnetapp.QuotaItemProperties{ // Default: to.Ptr[int32](500), // Current: to.Ptr[int32](500), // }, @@ -108,7 +108,7 @@ func ExampleResourceQuotaLimitsClient_NewListPager() { // Name: to.Ptr("eastus/totalCoolAccessVolumesPerSubscription"), // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalCoolAccessVolumesPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ + // Properties: &armnetapp.QuotaItemProperties{ // Default: to.Ptr[int32](10), // Current: to.Ptr[int32](10), // }, @@ -117,7 +117,7 @@ func ExampleResourceQuotaLimitsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/QuotaLimits_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/QuotaLimits_Get.json func ExampleResourceQuotaLimitsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -135,11 +135,11 @@ func ExampleResourceQuotaLimitsClient_Get() { // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your 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{ + // res.QuotaItem = armnetapp.QuotaItem{ // Name: to.Ptr("eastus/totalCoolAccessVolumesPerSubscription"), // Type: to.Ptr("Microsoft.NetApp/locations/quotaLimits"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/quotaLimits/totalCoolAccessVolumesPerSubscription"), - // Properties: &armnetapp.SubscriptionQuotaItemProperties{ + // Properties: &armnetapp.QuotaItemProperties{ // Default: to.Ptr[int32](10), // Current: to.Ptr[int32](10), // }, diff --git a/sdk/resourcemanager/netapp/armnetapp/resourcequotalimitsaccount_client.go b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimitsaccount_client.go new file mode 100644 index 000000000000..34be59e89550 --- /dev/null +++ b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimitsaccount_client.go @@ -0,0 +1,177 @@ +// 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. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceQuotaLimitsAccountClient contains the methods for the NetAppResourceQuotaLimitsAccount group. +// Don't use this type directly, use NewResourceQuotaLimitsAccountClient() instead. +type ResourceQuotaLimitsAccountClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceQuotaLimitsAccountClient creates a new instance of ResourceQuotaLimitsAccountClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceQuotaLimitsAccountClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceQuotaLimitsAccountClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceQuotaLimitsAccountClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get the default, current and usages account quota limit +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - quotaLimitName - The name of the Quota Limit +// - options - ResourceQuotaLimitsAccountClientGetOptions contains the optional parameters for the ResourceQuotaLimitsAccountClient.Get +// method. +func (client *ResourceQuotaLimitsAccountClient) Get(ctx context.Context, resourceGroupName string, accountName string, quotaLimitName string, options *ResourceQuotaLimitsAccountClientGetOptions) (ResourceQuotaLimitsAccountClientGetResponse, error) { + var err error + const operationName = "ResourceQuotaLimitsAccountClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, quotaLimitName, options) + if err != nil { + return ResourceQuotaLimitsAccountClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceQuotaLimitsAccountClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceQuotaLimitsAccountClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ResourceQuotaLimitsAccountClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, quotaLimitName string, _ *ResourceQuotaLimitsAccountClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/quotaLimits/{quotaLimitName}" + 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 quotaLimitName == "" { + return nil, errors.New("parameter quotaLimitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{quotaLimitName}", url.PathEscape(quotaLimitName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-07-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ResourceQuotaLimitsAccountClient) getHandleResponse(resp *http.Response) (ResourceQuotaLimitsAccountClientGetResponse, error) { + result := ResourceQuotaLimitsAccountClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.QuotaItem); err != nil { + return ResourceQuotaLimitsAccountClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of quota limits for all quotas that are under account. Currently PoolsPerAccount is the only +// one. +// +// Generated from API version 2025-07-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - ResourceQuotaLimitsAccountClientListOptions contains the optional parameters for the ResourceQuotaLimitsAccountClient.NewListPager +// method. +func (client *ResourceQuotaLimitsAccountClient) NewListPager(resourceGroupName string, accountName string, options *ResourceQuotaLimitsAccountClientListOptions) *runtime.Pager[ResourceQuotaLimitsAccountClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceQuotaLimitsAccountClientListResponse]{ + More: func(page ResourceQuotaLimitsAccountClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceQuotaLimitsAccountClientListResponse) (ResourceQuotaLimitsAccountClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceQuotaLimitsAccountClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return ResourceQuotaLimitsAccountClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ResourceQuotaLimitsAccountClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *ResourceQuotaLimitsAccountClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/quotaLimits" + 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.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-07-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ResourceQuotaLimitsAccountClient) listHandleResponse(resp *http.Response) (ResourceQuotaLimitsAccountClientListResponse, error) { + result := ResourceQuotaLimitsAccountClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.QuotaItemList); err != nil { + return ResourceQuotaLimitsAccountClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/netapp/armnetapp/resourcequotalimitsaccount_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimitsaccount_client_example_test.go new file mode 100644 index 000000000000..e373d528c0fd --- /dev/null +++ b/sdk/resourcemanager/netapp/armnetapp/resourcequotalimitsaccount_client_example_test.go @@ -0,0 +1,86 @@ +//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/v8" +) + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/QuotaLimitsAccount_List.json +func ExampleResourceQuotaLimitsAccountClient_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.NewResourceQuotaLimitsAccountClient().NewListPager("myRG", "myAccount", 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.QuotaItemList = armnetapp.QuotaItemList{ + // Value: []*armnetapp.QuotaItem{ + // { + // Name: to.Ptr("myAccount/poolsPerAccount"), + // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/quotaLimits"), + // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/myAccount/quotaLimits/poolsPerAccount"), + // Properties: &armnetapp.QuotaItemProperties{ + // Default: to.Ptr[int32](10), + // Current: to.Ptr[int32](10), + // Usage: to.Ptr[int32](10), + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/QuotaLimitsAccount_Get.json +func ExampleResourceQuotaLimitsAccountClient_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.NewResourceQuotaLimitsAccountClient().Get(ctx, "myRG", "myAccount", "poolsPerAccount", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.QuotaItem = armnetapp.QuotaItem{ + // Name: to.Ptr("myAccount/poolsPerAccount"), + // Type: to.Ptr("Microsoft.NetApp/netAppAccounts/quotaLimits"), + // ID: to.Ptr("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/myAccount/quotaLimits/poolsPerAccount"), + // Properties: &armnetapp.QuotaItemProperties{ + // Default: to.Ptr[int32](10), + // Current: to.Ptr[int32](10), + // Usage: to.Ptr[int32](10), + // }, + // } +} diff --git a/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client.go b/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client.go index 9141af4a99ec..3710df79acb4 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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) { @@ -84,7 +84,7 @@ func (client *ResourceRegionInfosClient) getCreateRequest(ctx context.Context, l return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -101,7 +101,7 @@ func (client *ResourceRegionInfosClient) getHandleResponse(resp *http.Response) // NewListPager - Provides region specific information. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview // - location - The name of the Azure region. // - options - ResourceRegionInfosClientListOptions contains the optional parameters for the ResourceRegionInfosClient.NewListPager // method. @@ -144,7 +144,7 @@ func (client *ResourceRegionInfosClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 37c056d12ed1..3beea03ad016 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/resourceregioninfos_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/RegionInfos_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/RegionInfos_List.json func ExampleResourceRegionInfosClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleResourceRegionInfosClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/RegionInfos_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/RegionInfos_Get.json func ExampleResourceRegionInfosClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/resourceusages_client.go b/sdk/resourcemanager/netapp/armnetapp/resourceusages_client.go index afe64af7c869..b42f213921a5 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resourceusages_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/resourceusages_client.go @@ -43,7 +43,7 @@ func NewResourceUsagesClient(subscriptionID string, credential azcore.TokenCrede // Get - Get current subscription usage of the specific type // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview // - location - The name of the Azure region. // - usageType - The type of usage // - options - ResourceUsagesClientGetOptions contains the optional parameters for the ResourceUsagesClient.Get method. @@ -89,7 +89,7 @@ func (client *ResourceUsagesClient) getCreateRequest(ctx context.Context, locati return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,7 +106,7 @@ func (client *ResourceUsagesClient) getHandleResponse(resp *http.Response) (Reso // NewListPager - Get current subscription usages // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview // - location - The name of the Azure region. // - options - ResourceUsagesClientListOptions contains the optional parameters for the ResourceUsagesClient.NewListPager method. func (client *ResourceUsagesClient) NewListPager(location string, options *ResourceUsagesClientListOptions) *runtime.Pager[ResourceUsagesClientListResponse] { @@ -148,7 +148,7 @@ func (client *ResourceUsagesClient) listCreateRequest(ctx context.Context, locat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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/resourceusages_client_example_test.go b/sdk/resourcemanager/netapp/armnetapp/resourceusages_client_example_test.go index ebfe84bdaa8e..f68a302b4982 100644 --- a/sdk/resourcemanager/netapp/armnetapp/resourceusages_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/resourceusages_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Usages_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Usages_List.json func ExampleResourceUsagesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -57,7 +57,7 @@ func ExampleResourceUsagesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Usages_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Usages_Get.json func ExampleResourceUsagesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/responses.go b/sdk/resourcemanager/netapp/armnetapp/responses.go index dac9f02185e6..df388222584f 100644 --- a/sdk/resourcemanager/netapp/armnetapp/responses.go +++ b/sdk/resourcemanager/netapp/armnetapp/responses.go @@ -175,6 +175,41 @@ type BackupsUnderVolumeClientMigrateBackupsResponse struct { // placeholder for future response values } +// BucketsClientCreateOrUpdateResponse contains the response from method BucketsClient.BeginCreateOrUpdate. +type BucketsClientCreateOrUpdateResponse struct { + // Bucket resource + Bucket +} + +// BucketsClientDeleteResponse contains the response from method BucketsClient.BeginDelete. +type BucketsClientDeleteResponse struct { + // placeholder for future response values +} + +// BucketsClientGenerateCredentialsResponse contains the response from method BucketsClient.GenerateCredentials. +type BucketsClientGenerateCredentialsResponse struct { + // Bucket Access Key, Secret Key, and Expiry date and time of the key pair + BucketGenerateCredentials +} + +// BucketsClientGetResponse contains the response from method BucketsClient.Get. +type BucketsClientGetResponse struct { + // Bucket resource + Bucket +} + +// BucketsClientListResponse contains the response from method BucketsClient.NewListPager. +type BucketsClientListResponse struct { + // List of volume bucket resources + BucketList +} + +// BucketsClientUpdateResponse contains the response from method BucketsClient.BeginUpdate. +type BucketsClientUpdateResponse struct { + // Bucket resource + Bucket +} + // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { // Result of the request to list Cloud Volume operations. It contains a list of operations and a URL link to get the next @@ -247,16 +282,28 @@ type ResourceClientUpdateNetworkSiblingSetResponse struct { NetworkSiblingSet } +// ResourceQuotaLimitsAccountClientGetResponse contains the response from method ResourceQuotaLimitsAccountClient.Get. +type ResourceQuotaLimitsAccountClientGetResponse struct { + // Information regarding Quota Item. + QuotaItem +} + +// ResourceQuotaLimitsAccountClientListResponse contains the response from method ResourceQuotaLimitsAccountClient.NewListPager. +type ResourceQuotaLimitsAccountClientListResponse struct { + // List of Quota Items + QuotaItemList +} + // ResourceQuotaLimitsClientGetResponse contains the response from method ResourceQuotaLimitsClient.Get. type ResourceQuotaLimitsClientGetResponse struct { - // Information regarding Subscription Quota Item. - SubscriptionQuotaItem + // Information regarding Quota Item. + QuotaItem } // ResourceQuotaLimitsClientListResponse contains the response from method ResourceQuotaLimitsClient.NewListPager. type ResourceQuotaLimitsClientListResponse struct { - // List of Subscription Quota Items - SubscriptionQuotaItemList + // List of Quota Items + QuotaItemList } // ResourceRegionInfosClientGetResponse contains the response from method ResourceRegionInfosClient.Get. @@ -498,6 +545,12 @@ type VolumesClientListGetGroupIDListForLdapUserResponse struct { GetGroupIDListForLDAPUserResponse } +// VolumesClientListQuotaReportResponse contains the response from method VolumesClient.BeginListQuotaReport. +type VolumesClientListQuotaReportResponse struct { + // Quota Report for volume + ListQuotaReportResponse +} + // VolumesClientListReplicationsResponse contains the response from method VolumesClient.NewListReplicationsPager. type VolumesClientListReplicationsResponse struct { // List Replications @@ -575,7 +628,8 @@ type VolumesClientRevertResponse struct { // VolumesClientSplitCloneFromParentResponse contains the response from method VolumesClient.BeginSplitCloneFromParent. type VolumesClientSplitCloneFromParentResponse struct { - // placeholder for future response values + // Volume resource + Volume } // VolumesClientUpdateResponse contains the response from method VolumesClient.BeginUpdate. diff --git a/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client.go b/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client.go index 27d4cebb275b..55166a312bbc 100644 --- a/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -95,7 +95,7 @@ func (client *SnapshotPoliciesClient) createCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -116,7 +116,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -143,7 +143,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -189,7 +189,7 @@ func (client *SnapshotPoliciesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -249,7 +249,7 @@ func (client *SnapshotPoliciesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -266,7 +266,7 @@ func (client *SnapshotPoliciesClient) getHandleResponse(resp *http.Response) (Sn // NewListPager - List snapshot policy // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -315,7 +315,7 @@ func (client *SnapshotPoliciesClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -333,7 +333,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -385,7 +385,7 @@ func (client *SnapshotPoliciesClient) listVolumesCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -403,7 +403,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -431,7 +431,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -477,7 +477,7 @@ func (client *SnapshotPoliciesClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 38cb3b0620bd..166e4d95fbcb 100644 --- a/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/snapshotpolicies_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/SnapshotPolicies_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/SnapshotPolicies_List.json func ExampleSnapshotPoliciesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -77,7 +77,7 @@ func ExampleSnapshotPoliciesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/SnapshotPolicies_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/SnapshotPolicies_Get.json func ExampleSnapshotPoliciesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -128,7 +128,7 @@ func ExampleSnapshotPoliciesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/SnapshotPolicies_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/SnapshotPolicies_Create.json func ExampleSnapshotPoliciesClient_Create() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -205,7 +205,7 @@ func ExampleSnapshotPoliciesClient_Create() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/SnapshotPolicies_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/SnapshotPolicies_Update.json func ExampleSnapshotPoliciesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -286,7 +286,7 @@ func ExampleSnapshotPoliciesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/SnapshotPolicies_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/SnapshotPolicies_Delete.json func ExampleSnapshotPoliciesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -307,7 +307,7 @@ func ExampleSnapshotPoliciesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/SnapshotPolicies_ListVolumes.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/SnapshotPolicies_ListVolumes.json func ExampleSnapshotPoliciesClient_ListVolumes() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -334,10 +334,10 @@ func ExampleSnapshotPoliciesClient_ListVolumes() { // Location: to.Ptr("eastus"), // Properties: &armnetapp.VolumeProperties{ // CreationToken: to.Ptr("some-amazing-filepath"), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // FileSystemID: to.Ptr("00000000-0000-0000-0000-000000000000"), // 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"), + // SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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 2405f3a8db71..08047eb95257 100644 --- a/sdk/resourcemanager/netapp/armnetapp/snapshots_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/snapshots_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -72,7 +72,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -126,7 +126,7 @@ func (client *SnapshotsClient) createCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 *SnapshotsClient) createCreateRequest(ctx context.Context, resource // BeginDelete - Delete snapshot // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 *SnapshotsClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Delete snapshot // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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" @@ -220,7 +220,7 @@ func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -229,7 +229,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -290,7 +290,7 @@ func (client *SnapshotsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -307,7 +307,7 @@ func (client *SnapshotsClient) getHandleResponse(resp *http.Response) (Snapshots // NewListPager - List all snapshots associated with the volume // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -365,7 +365,7 @@ func (client *SnapshotsClient) listCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -383,7 +383,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -413,7 +413,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -467,7 +467,7 @@ func (client *SnapshotsClient) restoreFilesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -479,7 +479,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -508,7 +508,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -562,7 +562,7 @@ func (client *SnapshotsClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 43538c9ca765..2ed3626c2532 100644 --- a/sdk/resourcemanager/netapp/armnetapp/snapshots_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/snapshots_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Snapshots_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Snapshots_List.json func ExampleSnapshotsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -57,7 +57,7 @@ func ExampleSnapshotsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Snapshots_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Snapshots_Get.json func ExampleSnapshotsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -88,7 +88,7 @@ func ExampleSnapshotsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Snapshots_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Snapshots_Create.json func ExampleSnapshotsClient_BeginCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -111,7 +111,7 @@ func ExampleSnapshotsClient_BeginCreate() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Snapshots_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Snapshots_Update.json func ExampleSnapshotsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -146,7 +146,7 @@ func ExampleSnapshotsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Snapshots_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Snapshots_Delete.json func ExampleSnapshotsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -167,7 +167,7 @@ func ExampleSnapshotsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Snapshots_SingleFileRestore.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Snapshots_SingleFileRestore.json func ExampleSnapshotsClient_BeginRestoreFiles() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/subvolumes_client.go b/sdk/resourcemanager/netapp/armnetapp/subvolumes_client.go index 7549fb87f37a..d38fed5afa1c 100644 --- a/sdk/resourcemanager/netapp/armnetapp/subvolumes_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/subvolumes_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -72,7 +72,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -126,7 +126,7 @@ func (client *SubvolumesClient) createCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 *SubvolumesClient) createCreateRequest(ctx context.Context, resourc // BeginDelete - Delete subvolume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 *SubvolumesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Delete subvolume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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" @@ -220,7 +220,7 @@ func (client *SubvolumesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -229,7 +229,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -290,7 +290,7 @@ func (client *SubvolumesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -308,7 +308,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -337,7 +337,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -391,7 +391,7 @@ func (client *SubvolumesClient) getMetadataCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -399,7 +399,7 @@ func (client *SubvolumesClient) getMetadataCreateRequest(ctx context.Context, re // NewListByVolumePager - Returns a list of the subvolumes in the volume // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -457,7 +457,7 @@ func (client *SubvolumesClient) listByVolumeCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -475,7 +475,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -504,7 +504,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -558,7 +558,7 @@ func (client *SubvolumesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 344af282caf8..8151cb7febc9 100644 --- a/sdk/resourcemanager/netapp/armnetapp/subvolumes_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/subvolumes_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Subvolumes_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Subvolumes_List.json func ExampleSubvolumesClient_NewListByVolumePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -55,7 +55,7 @@ func ExampleSubvolumesClient_NewListByVolumePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Subvolumes_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Subvolumes_Get.json func ExampleSubvolumesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -84,7 +84,7 @@ func ExampleSubvolumesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Subvolumes_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Subvolumes_Create.json func ExampleSubvolumesClient_BeginCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -122,7 +122,7 @@ func ExampleSubvolumesClient_BeginCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Subvolumes_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Subvolumes_Update.json func ExampleSubvolumesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -159,7 +159,7 @@ func ExampleSubvolumesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Subvolumes_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Subvolumes_Delete.json func ExampleSubvolumesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -180,7 +180,7 @@ func ExampleSubvolumesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Subvolumes_Metadata.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Subvolumes_Metadata.json func ExampleSubvolumesClient_BeginGetMetadata() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/version.go b/sdk/resourcemanager/netapp/armnetapp/version.go index 52dae824d55c..bb88198e543c 100644 --- a/sdk/resourcemanager/netapp/armnetapp/version.go +++ b/sdk/resourcemanager/netapp/armnetapp/version.go @@ -6,5 +6,5 @@ package armnetapp const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp" - moduleVersion = "v7.7.0" + moduleVersion = "v8.0.0-beta.2" ) diff --git a/sdk/resourcemanager/netapp/armnetapp/volumegroups_client.go b/sdk/resourcemanager/netapp/armnetapp/volumegroups_client.go index c183cd445a0d..2459695bb17e 100644 --- a/sdk/resourcemanager/netapp/armnetapp/volumegroups_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/volumegroups_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -70,7 +70,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -116,7 +116,7 @@ func (client *VolumeGroupsClient) createCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -128,7 +128,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -154,7 +154,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -200,7 +200,7 @@ func (client *VolumeGroupsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -209,7 +209,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -260,7 +260,7 @@ func (client *VolumeGroupsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -277,7 +277,7 @@ func (client *VolumeGroupsClient) getHandleResponse(resp *http.Response) (Volume // NewListByNetAppAccountPager - List all volume groups for given account // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -326,7 +326,7 @@ func (client *VolumeGroupsClient) listByNetAppAccountCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 8d2418157608..bb4b12036933 100644 --- a/sdk/resourcemanager/netapp/armnetapp/volumegroups_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/volumegroups_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeGroups_List_Oracle.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeGroups_List_Oracle.json func ExampleVolumeGroupsClient_NewListByNetAppAccountPager_volumeGroupsListOracle() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -61,7 +61,7 @@ func ExampleVolumeGroupsClient_NewListByNetAppAccountPager_volumeGroupsListOracl } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeGroups_List_SapHana.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeGroups_List_SapHana.json func ExampleVolumeGroupsClient_NewListByNetAppAccountPager_volumeGroupsListSapHana() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,7 +104,7 @@ func ExampleVolumeGroupsClient_NewListByNetAppAccountPager_volumeGroupsListSapHa } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeGroups_Get_Oracle.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeGroups_Get_Oracle.json func ExampleVolumeGroupsClient_Get_volumeGroupsGetOracle() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -584,7 +584,7 @@ func ExampleVolumeGroupsClient_Get_volumeGroupsGetOracle() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeGroups_Get_SapHana.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeGroups_Get_SapHana.json func ExampleVolumeGroupsClient_Get_volumeGroupsGetSapHana() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -800,7 +800,7 @@ func ExampleVolumeGroupsClient_Get_volumeGroupsGetSapHana() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeGroups_Create_Oracle.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeGroups_Create_Oracle.json func ExampleVolumeGroupsClient_BeginCreate_volumeGroupsCreateOracle() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1251,7 +1251,7 @@ func ExampleVolumeGroupsClient_BeginCreate_volumeGroupsCreateOracle() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeGroups_Create_SapHana.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeGroups_Create_SapHana.json func ExampleVolumeGroupsClient_BeginCreate_volumeGroupsCreateSapHana() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1452,7 +1452,7 @@ func ExampleVolumeGroupsClient_BeginCreate_volumeGroupsCreateSapHana() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeGroups_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeGroups_Delete.json func ExampleVolumeGroupsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client.go b/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client.go index 70a3ae0d78f8..f442a2e7895e 100644 --- a/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client.go @@ -43,7 +43,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -73,7 +73,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -127,7 +127,7 @@ func (client *VolumeQuotaRulesClient) createCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -139,7 +139,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -168,7 +168,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -222,7 +222,7 @@ func (client *VolumeQuotaRulesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -231,7 +231,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -292,7 +292,7 @@ func (client *VolumeQuotaRulesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -309,7 +309,7 @@ func (client *VolumeQuotaRulesClient) getHandleResponse(resp *http.Response) (Vo // NewListByVolumePager - List all quota rules associated with the volume // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 *VolumeQuotaRulesClient) listByVolumeCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -386,7 +386,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 2025-06-01 +// Generated from API version 2025-07-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 *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 2025-06-01 +// Generated from API version 2025-07-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" @@ -470,7 +470,7 @@ func (client *VolumeQuotaRulesClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index ed483bfbc135..68c6b34106ed 100644 --- a/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/volumequotarules_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeQuotaRules_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeQuotaRules_List.json func ExampleVolumeQuotaRulesClient_NewListByVolumePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -48,7 +48,7 @@ func ExampleVolumeQuotaRulesClient_NewListByVolumePager() { // 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), + // ProvisioningState: to.Ptr(armnetapp.NetAppProvisioningStateSucceeded), // QuotaSizeInKiBs: to.Ptr[int64](100005), // QuotaTarget: to.Ptr("1821"), // QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), @@ -58,7 +58,7 @@ func ExampleVolumeQuotaRulesClient_NewListByVolumePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeQuotaRules_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeQuotaRules_Get.json func ExampleVolumeQuotaRulesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -82,7 +82,7 @@ func ExampleVolumeQuotaRulesClient_Get() { // 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), + // ProvisioningState: to.Ptr(armnetapp.NetAppProvisioningStateSucceeded), // QuotaSizeInKiBs: to.Ptr[int64](100005), // QuotaTarget: to.Ptr("1821"), // QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), @@ -90,7 +90,7 @@ func ExampleVolumeQuotaRulesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeQuotaRules_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeQuotaRules_Create.json func ExampleVolumeQuotaRulesClient_BeginCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -125,7 +125,7 @@ func ExampleVolumeQuotaRulesClient_BeginCreate() { // 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), + // ProvisioningState: to.Ptr(armnetapp.NetAppProvisioningStateSucceeded), // QuotaSizeInKiBs: to.Ptr[int64](100005), // QuotaTarget: to.Ptr("1821"), // QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), @@ -133,7 +133,7 @@ func ExampleVolumeQuotaRulesClient_BeginCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeQuotaRules_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeQuotaRules_Update.json func ExampleVolumeQuotaRulesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -165,7 +165,7 @@ func ExampleVolumeQuotaRulesClient_BeginUpdate() { // 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), + // ProvisioningState: to.Ptr(armnetapp.NetAppProvisioningStateSucceeded), // QuotaSizeInKiBs: to.Ptr[int64](100005), // QuotaTarget: to.Ptr("1821"), // QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), @@ -173,7 +173,7 @@ func ExampleVolumeQuotaRulesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/VolumeQuotaRules_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/VolumeQuotaRules_Delete.json func ExampleVolumeQuotaRulesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/netapp/armnetapp/volumes_client.go b/sdk/resourcemanager/netapp/armnetapp/volumes_client.go index 9bc49a6b127e..39d022050f6f 100644 --- a/sdk/resourcemanager/netapp/armnetapp/volumes_client.go +++ b/sdk/resourcemanager/netapp/armnetapp/volumes_client.go @@ -45,7 +45,7 @@ func NewVolumesClient(subscriptionID string, credential azcore.TokenCredential, // it. Once the SVM have been peered a SnapMirror will be created // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 *VolumesClient) BeginAuthorizeExternalReplication(ctx context.Conte // the SVM have been peered a SnapMirror will be created // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview func (client *VolumesClient) authorizeExternalReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginAuthorizeExternalReplicationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginAuthorizeExternalReplication" @@ -124,7 +124,7 @@ func (client *VolumesClient) authorizeExternalReplicationCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -133,7 +133,7 @@ func (client *VolumesClient) authorizeExternalReplicationCreateRequest(ctx conte // BeginAuthorizeReplication - Authorize the replication connection on the source volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -162,7 +162,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -212,7 +212,7 @@ func (client *VolumesClient) authorizeReplicationCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -224,7 +224,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -252,7 +252,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -302,7 +302,7 @@ func (client *VolumesClient) breakFileLocksCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { @@ -317,7 +317,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -345,7 +345,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -395,7 +395,7 @@ func (client *VolumesClient) breakReplicationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { @@ -410,7 +410,7 @@ func (client *VolumesClient) breakReplicationCreateRequest(ctx context.Context, // 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 2025-06-01 +// Generated from API version 2025-07-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 @@ -439,7 +439,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -489,7 +489,7 @@ func (client *VolumesClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -501,7 +501,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -528,7 +528,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -578,7 +578,7 @@ func (client *VolumesClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") if options != nil && options.ForceDelete != nil { reqQP.Set("forceDelete", strconv.FormatBool(*options.ForceDelete)) } @@ -590,7 +590,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 2025-06-01 +// Generated from API version 2025-07-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 +618,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -668,7 +668,7 @@ func (client *VolumesClient) deleteReplicationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -678,7 +678,7 @@ func (client *VolumesClient) deleteReplicationCreateRequest(ctx context.Context, // the external cluster peering if no other migration is active. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -707,7 +707,7 @@ func (client *VolumesClient) BeginFinalizeExternalReplication(ctx context.Contex // external cluster peering if no other migration is active. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview func (client *VolumesClient) finalizeExternalReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginFinalizeExternalReplicationOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginFinalizeExternalReplication" @@ -757,7 +757,7 @@ func (client *VolumesClient) finalizeExternalReplicationCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -766,7 +766,7 @@ func (client *VolumesClient) finalizeExternalReplicationCreateRequest(ctx contex // 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 2025-06-01 +// Generated from API version 2025-07-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 @@ -793,7 +793,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -843,7 +843,7 @@ func (client *VolumesClient) finalizeRelocationCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -852,7 +852,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -908,7 +908,7 @@ func (client *VolumesClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -925,7 +925,7 @@ func (client *VolumesClient) getHandleResponse(resp *http.Response) (VolumesClie // NewListPager - List all volumes within the capacity pool // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -977,7 +977,7 @@ func (client *VolumesClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -995,7 +995,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -1024,7 +1024,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -1074,7 +1074,7 @@ func (client *VolumesClient) listGetGroupIDListForLdapUserCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -1083,9 +1083,96 @@ func (client *VolumesClient) listGetGroupIDListForLdapUserCreateRequest(ctx cont return req, nil } +// BeginListQuotaReport - Returns report of quotas for the volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-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 - VolumesClientBeginListQuotaReportOptions contains the optional parameters for the VolumesClient.BeginListQuotaReport +// method. +func (client *VolumesClient) BeginListQuotaReport(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginListQuotaReportOptions) (*runtime.Poller[VolumesClientListQuotaReportResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listQuotaReport(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientListQuotaReportResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientListQuotaReportResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListQuotaReport - Returns report of quotas for the volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-07-01-preview +func (client *VolumesClient) listQuotaReport(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginListQuotaReportOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginListQuotaReport" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listQuotaReportCreateRequest(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 +} + +// listQuotaReportCreateRequest creates the ListQuotaReport request. +func (client *VolumesClient) listQuotaReportCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginListQuotaReportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listQuotaReport" + 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", "2025-07-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // NewListReplicationsPager - List all replications for a specified volume // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -1144,7 +1231,7 @@ func (client *VolumesClient) listReplicationsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1162,7 +1249,7 @@ func (client *VolumesClient) listReplicationsHandleResponse(resp *http.Response) // BeginPeerExternalCluster - Starts peering the external cluster for this migration volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -1191,7 +1278,7 @@ func (client *VolumesClient) BeginPeerExternalCluster(ctx context.Context, resou // PeerExternalCluster - Starts peering the external cluster for this migration volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-01-preview func (client *VolumesClient) peerExternalCluster(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PeerClusterForVolumeMigrationRequest, options *VolumesClientBeginPeerExternalClusterOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginPeerExternalCluster" @@ -1241,7 +1328,7 @@ func (client *VolumesClient) peerExternalClusterCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -1253,7 +1340,7 @@ func (client *VolumesClient) peerExternalClusterCreateRequest(ctx context.Contex // 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 2025-06-01 +// Generated from API version 2025-07-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 @@ -1281,7 +1368,7 @@ func (client *VolumesClient) BeginPerformReplicationTransfer(ctx context.Context // 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 2025-06-01 +// Generated from API version 2025-07-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" @@ -1331,7 +1418,7 @@ func (client *VolumesClient) performReplicationTransferCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1340,7 +1427,7 @@ func (client *VolumesClient) performReplicationTransferCreateRequest(ctx context // BeginPoolChange - Moves volume to another pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -1368,7 +1455,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -1418,7 +1505,7 @@ func (client *VolumesClient) poolChangeCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -1430,7 +1517,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -1458,7 +1545,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -1508,7 +1595,7 @@ func (client *VolumesClient) populateAvailabilityZoneCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1517,7 +1604,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -1545,7 +1632,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -1595,7 +1682,7 @@ func (client *VolumesClient) reInitializeReplicationCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1605,7 +1692,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -1635,7 +1722,7 @@ func (client *VolumesClient) BeginReestablishReplication(ctx context.Context, re // snapshots // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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" @@ -1685,7 +1772,7 @@ func (client *VolumesClient) reestablishReplicationCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -1697,7 +1784,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -1723,7 +1810,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -1773,7 +1860,7 @@ func (client *VolumesClient) relocateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { @@ -1788,7 +1875,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -1845,7 +1932,7 @@ func (client *VolumesClient) replicationStatusCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1863,7 +1950,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -1890,7 +1977,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -1940,7 +2027,7 @@ func (client *VolumesClient) resetCifsPasswordCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1950,7 +2037,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -1979,7 +2066,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -2029,7 +2116,7 @@ func (client *VolumesClient) resyncReplicationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2038,7 +2125,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 2025-06-01 +// Generated from API version 2025-07-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 @@ -2066,7 +2153,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -2116,7 +2203,7 @@ func (client *VolumesClient) revertCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -2129,7 +2216,7 @@ func (client *VolumesClient) revertCreateRequest(ctx context.Context, resourceGr // volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -2157,7 +2244,7 @@ func (client *VolumesClient) BeginRevertRelocation(ctx context.Context, resource // volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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" @@ -2207,7 +2294,7 @@ func (client *VolumesClient) revertRelocationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2216,7 +2303,7 @@ func (client *VolumesClient) revertRelocationCreateRequest(ctx context.Context, // 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 2025-06-01 +// Generated from API version 2025-07-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 @@ -2244,7 +2331,7 @@ func (client *VolumesClient) BeginSplitCloneFromParent(ctx context.Context, reso // 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 2025-06-01 +// Generated from API version 2025-07-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" @@ -2259,7 +2346,7 @@ func (client *VolumesClient) splitCloneFromParent(ctx context.Context, resourceG if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -2294,7 +2381,7 @@ func (client *VolumesClient) splitCloneFromParentCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2303,7 +2390,7 @@ func (client *VolumesClient) splitCloneFromParentCreateRequest(ctx context.Conte // BeginUpdate - Patch the specified volume // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-06-01 +// Generated from API version 2025-07-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 @@ -2331,7 +2418,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 2025-06-01 +// Generated from API version 2025-07-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" @@ -2381,7 +2468,7 @@ func (client *VolumesClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-06-01") + reqQP.Set("api-version", "2025-07-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 index 1951ea4a227b..78515f20584c 100644 --- a/sdk/resourcemanager/netapp/armnetapp/volumes_client_example_test.go +++ b/sdk/resourcemanager/netapp/armnetapp/volumes_client_example_test.go @@ -15,10 +15,10 @@ import ( "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" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_List.json func ExampleVolumesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -49,13 +49,13 @@ func ExampleVolumesClient_NewListPager() { // Location: to.Ptr("eastus"), // Properties: &armnetapp.VolumeProperties{ // CreationToken: to.Ptr("some-amazing-filepath"), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // FileSystemID: to.Ptr("00000000-0000-0000-0000-000000000000"), // 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"), + // SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), // ThroughputMibps: to.Ptr[float32](128), // UsageThreshold: to.Ptr[int64](107374182400), // }, @@ -64,7 +64,7 @@ func ExampleVolumesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_Get.json func ExampleVolumesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -89,20 +89,20 @@ func ExampleVolumesClient_Get() { // Location: to.Ptr("eastus"), // Properties: &armnetapp.VolumeProperties{ // CreationToken: to.Ptr("some-amazing-filepath"), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // FileSystemID: to.Ptr("00000000-0000-0000-0000-000000000000"), // 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"), + // SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_CreateOrUpdate.json func ExampleVolumesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -118,7 +118,7 @@ func ExampleVolumesClient_BeginCreateOrUpdate() { 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"), + SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), UsageThreshold: to.Ptr[int64](107374182400), }, }, nil) @@ -140,17 +140,17 @@ func ExampleVolumesClient_BeginCreateOrUpdate() { // Properties: &armnetapp.VolumeProperties{ // CreationToken: to.Ptr("some-amazing-filepath"), // EncryptionKeySource: to.Ptr(armnetapp.EncryptionKeySourceMicrosoftNetApp), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // FileSystemID: to.Ptr("00000000-0000-0000-0000-000000000000"), // 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"), + // SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_Update.json func ExampleVolumesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -184,20 +184,20 @@ func ExampleVolumesClient_BeginUpdate() { // SnapshotPolicyID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1"), // }, // }, - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // FileSystemID: to.Ptr("00000000-0000-0000-0000-000000000000"), // 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"), + // SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_Delete.json func ExampleVolumesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -218,7 +218,7 @@ func ExampleVolumesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_PopulateAvailabilityZones.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_PopulateAvailabilityZones.json func ExampleVolumesClient_BeginPopulateAvailabilityZone() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -247,20 +247,20 @@ func ExampleVolumesClient_BeginPopulateAvailabilityZone() { // Location: to.Ptr("eastus"), // Properties: &armnetapp.VolumeProperties{ // CreationToken: to.Ptr("some-amazing-filepath"), - // FileSystemID: to.Ptr("9760acf5-4638-11e7-9bdb-020073ca7778"), + // FileSystemID: to.Ptr("00000000-0000-0000-0000-000000000000"), // 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"), + // SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_Revert.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_Revert.json func ExampleVolumesClient_BeginRevert() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -283,7 +283,7 @@ func ExampleVolumesClient_BeginRevert() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_ResetCifsPassword.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_ResetCifsPassword.json func ExampleVolumesClient_BeginResetCifsPassword() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -304,7 +304,7 @@ func ExampleVolumesClient_BeginResetCifsPassword() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_SplitClone.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_SplitClone.json func ExampleVolumesClient_BeginSplitCloneFromParent() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -319,13 +319,36 @@ func ExampleVolumesClient_BeginSplitCloneFromParent() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, nil) + 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/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), + // Location: to.Ptr("eastus"), + // Properties: &armnetapp.VolumeProperties{ + // AcceptGrowCapacityPoolForShortTermCloneSplit: to.Ptr(armnetapp.AcceptGrowCapacityPoolForShortTermCloneSplitAccepted), + // 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), + // SnapshotID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snap1"), + // StorageToNetworkProximity: to.Ptr(armnetapp.VolumeStorageToNetworkProximityT2), + // SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_BreakFileLocks.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_BreakFileLocks.json func ExampleVolumesClient_BeginBreakFileLocks() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -350,7 +373,7 @@ func ExampleVolumesClient_BeginBreakFileLocks() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/GroupIdListForLDAPUser.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/GroupIdListForLDAPUser.json func ExampleVolumesClient_BeginListGetGroupIDListForLdapUser() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -381,7 +404,50 @@ func ExampleVolumesClient_BeginListGetGroupIDListForLdapUser() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_BreakReplication.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_ListQuotaReport.json +func ExampleVolumesClient_BeginListQuotaReport() { + 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().BeginListQuotaReport(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.ListQuotaReportResponse = armnetapp.ListQuotaReportResponse{ + // Value: []*armnetapp.QuotaReport{ + // { + // IsDerivedQuota: to.Ptr(false), + // PercentageUsed: to.Ptr[float32](5), + // QuotaLimitTotalInKiBs: to.Ptr[int64](204914688), + // QuotaLimitUsedInKiBs: to.Ptr[int64](8192), + // QuotaTarget: to.Ptr("1013"), + // QuotaType: to.Ptr(armnetapp.TypeIndividualUserQuota), + // }, + // { + // IsDerivedQuota: to.Ptr(false), + // PercentageUsed: to.Ptr[float32](5), + // QuotaLimitTotalInKiBs: to.Ptr[int64](204914688), + // QuotaLimitUsedInKiBs: to.Ptr[int64](8192), + // QuotaTarget: to.Ptr("1012"), + // QuotaType: to.Ptr(armnetapp.TypeIndividualGroupQuota), + // }}, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_BreakReplication.json func ExampleVolumesClient_BeginBreakReplication() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -405,7 +471,7 @@ func ExampleVolumesClient_BeginBreakReplication() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_ReestablishReplication.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_ReestablishReplication.json func ExampleVolumesClient_BeginReestablishReplication() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -428,7 +494,7 @@ func ExampleVolumesClient_BeginReestablishReplication() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_ReplicationStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_ReplicationStatus.json func ExampleVolumesClient_ReplicationStatus() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -455,7 +521,7 @@ func ExampleVolumesClient_ReplicationStatus() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_ListReplications.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_ListReplications.json func ExampleVolumesClient_NewListReplicationsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -488,7 +554,7 @@ func ExampleVolumesClient_NewListReplicationsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_ResyncReplication.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_ResyncReplication.json func ExampleVolumesClient_BeginResyncReplication() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -509,7 +575,7 @@ func ExampleVolumesClient_BeginResyncReplication() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_DeleteReplication.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_DeleteReplication.json func ExampleVolumesClient_BeginDeleteReplication() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -530,7 +596,7 @@ func ExampleVolumesClient_BeginDeleteReplication() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_AuthorizeReplication.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_AuthorizeReplication.json func ExampleVolumesClient_BeginAuthorizeReplication() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -553,7 +619,7 @@ func ExampleVolumesClient_BeginAuthorizeReplication() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_ReInitializeReplication.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_ReInitializeReplication.json func ExampleVolumesClient_BeginReInitializeReplication() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -574,7 +640,7 @@ func ExampleVolumesClient_BeginReInitializeReplication() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_PeerExternalCluster.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_PeerExternalCluster.json func ExampleVolumesClient_BeginPeerExternalCluster() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -609,7 +675,7 @@ func ExampleVolumesClient_BeginPeerExternalCluster() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_AuthorizeExternalReplication.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_AuthorizeExternalReplication.json func ExampleVolumesClient_BeginAuthorizeExternalReplication() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -636,7 +702,7 @@ func ExampleVolumesClient_BeginAuthorizeExternalReplication() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_FinalizeExternalReplication.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_FinalizeExternalReplication.json func ExampleVolumesClient_BeginFinalizeExternalReplication() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -657,7 +723,7 @@ func ExampleVolumesClient_BeginFinalizeExternalReplication() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_PerformReplicationTransfer.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_PerformReplicationTransfer.json func ExampleVolumesClient_BeginPerformReplicationTransfer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -678,7 +744,7 @@ func ExampleVolumesClient_BeginPerformReplicationTransfer() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_PoolChange.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_PoolChange.json func ExampleVolumesClient_BeginPoolChange() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -701,7 +767,7 @@ func ExampleVolumesClient_BeginPoolChange() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_Relocate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_Relocate.json func ExampleVolumesClient_BeginRelocate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -722,7 +788,7 @@ func ExampleVolumesClient_BeginRelocate() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_FinalizeRelocation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_FinalizeRelocation.json func ExampleVolumesClient_BeginFinalizeRelocation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -743,7 +809,7 @@ func ExampleVolumesClient_BeginFinalizeRelocation() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba99beec358a40ee08dae7f12f6a989aad6ce6d1/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-06-01/examples/Volumes_RevertRelocation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8a9dbb28e788355a47dc5bad3ea5f8da212b4bf6/specification/netapp/resource-manager/Microsoft.NetApp/preview/2025-07-01-preview/examples/Volumes_RevertRelocation.json func ExampleVolumesClient_BeginRevertRelocation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {